Documentation ¶
Index ¶
- Constants
- func DecodeBigIntHexOrDecimal(s string) (*big.Int, error)
- func DecodeBytes(val *string) ([]byte, error)
- func DecodeInt64orHex(val *string) (int64, error)
- func DecodeUint256orHex(val *string) (*big.Int, error)
- func DecodeUint64orHex(val *string) (uint64, error)
- func EncodeBigInt(b *big.Int) *string
- func EncodeBytes(b []byte) *string
- func EncodeUint64(b uint64) *string
Constants ¶
View Source
const ( // Base10 decimal base Base10 = 10 // TenToThePowerOf18 represents 1000000000000000000 TenToThePowerOf18 = 1000000000000000000 // Gwei represents 1000000000 wei Gwei = 1000000000 // MaxUint256StrNumber represents 2**256 -1 as string MaxUint256StrNumber = "115792089237316195423570985008687907853269984665640564039457584007913129639935" )
Variables ¶
This section is empty.
Functions ¶
func DecodeBigIntHexOrDecimal ¶
DecodeBigIntHexOrDecimal parses a string that can be decimal or hexa (starts with 0x) into a *big.Int
func DecodeBytes ¶
DecodeBytes decodes a hex string into a []byte
func DecodeInt64orHex ¶
DecodeInt64orHex decodes a string int64 or hex string into a int64
func DecodeUint256orHex ¶
DecodeUint256orHex decodes a string uint256 or hex string into a bit.Int
func DecodeUint64orHex ¶
DecodeUint64orHex decodes a string uint64 or hex string into a uint64
func EncodeBigInt ¶
EncodeBigInt encodes a big.Int into a hex string
func EncodeBytes ¶
EncodeBytes encodes a []bytes into a hex string
func EncodeUint64 ¶
EncodeUint64 encodes a uint64 into a hex string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.