Documentation
¶
Index ¶
- func EncodeToHex(b []byte) string
- func EncodeUintToHex(i uint64) string
- func Ether(i uint64) *big.Int
- func ParseBigInt(str string) *big.Int
- func ParseHexBytes(str string) ([]byte, error)
- func ParseUint64orHex(str string) (uint64, error)
- type EtherUnit
- type Utils
- func (u *Utils) AbiEncodePacked(args ...interface{}) ([]byte, error)
- func (u *Utils) DecodeParameters(parameters []string, data []byte) ([]interface{}, error)
- func (u *Utils) DifferentAddress(a, b common.Address) bool
- func (u *Utils) EncodeFunctionSignature(funcName string) []byte
- func (u *Utils) EncodeParameters(parameters []string, data []interface{}) ([]byte, error)
- func (u *Utils) FromDecimals(wei *big.Int, decimals int64) *big.Float
- func (u *Utils) FromGWei(wei *big.Int) *big.Float
- func (u *Utils) FromWei(wei *big.Int) *big.Float
- func (u *Utils) FromWeiFloat(wei *big.Float) *big.Float
- func (u *Utils) FromWeiWithUnit(wei *big.Int, unit EtherUnit) *big.Float
- func (u *Utils) HexToUint64(str string) (uint64, error)
- func (u *Utils) LeftPadBytes(slice []byte, l int) []byte
- func (u *Utils) PackCode(signature string, args []string, params []interface{}) []byte
- func (u *Utils) RoundNWei(wei *big.Int, n int) (*big.Int, error)
- func (u *Utils) SameAddress(a, b common.Address) bool
- func (u *Utils) ToDecimals(val uint64, decimals int64) *big.Int
- func (u *Utils) ToGWei(val float64) *big.Int
- func (u *Utils) ToHex(n *big.Int) string
- func (u *Utils) ToWei(val string) *big.Int
- func (u *Utils) ToWeiInt(val int64, denominator int64) *big.Int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeToHex ¶
func EncodeUintToHex ¶
func ParseBigInt ¶
func ParseHexBytes ¶
func ParseUint64orHex ¶
Types ¶
type Utils ¶
type Utils struct{}
func (*Utils) AbiEncodePacked ¶
Equal to solidity `abi.encodePacked(args)`
func (*Utils) DecodeParameters ¶
func (*Utils) EncodeFunctionSignature ¶
func (*Utils) EncodeParameters ¶
func (*Utils) FromWeiWithUnit ¶
Click to show internal directories.
Click to hide internal directories.