|
|
@@ -45,9 +45,8 @@ func BytesToHash(b []byte) Hash {
|
|
|
h.SetBytes(b)
|
|
|
return h
|
|
|
}
|
|
|
-func StringToHash(s string) Hash { return BytesToHash([]byte(s)) }
|
|
|
-func BigToHash(b *big.Int) Hash { return BytesToHash(b.Bytes()) }
|
|
|
-func HexToHash(s string) Hash { return BytesToHash(FromHex(s)) }
|
|
|
+func BigToHash(b *big.Int) Hash { return BytesToHash(b.Bytes()) }
|
|
|
+func HexToHash(s string) Hash { return BytesToHash(FromHex(s)) }
|
|
|
|
|
|
// Get the string representation of the underlying hash
|
|
|
func (h Hash) Str() string { return string(h[:]) }
|
|
|
@@ -143,9 +142,8 @@ func BytesToAddress(b []byte) Address {
|
|
|
a.SetBytes(b)
|
|
|
return a
|
|
|
}
|
|
|
-func StringToAddress(s string) Address { return BytesToAddress([]byte(s)) }
|
|
|
-func BigToAddress(b *big.Int) Address { return BytesToAddress(b.Bytes()) }
|
|
|
-func HexToAddress(s string) Address { return BytesToAddress(FromHex(s)) }
|
|
|
+func BigToAddress(b *big.Int) Address { return BytesToAddress(b.Bytes()) }
|
|
|
+func HexToAddress(s string) Address { return BytesToAddress(FromHex(s)) }
|
|
|
|
|
|
// IsHexAddress verifies whether a string can represent a valid hex-encoded
|
|
|
// Ethereum address or not.
|