Versions in this module Expand all Collapse all v0 v0.0.1 Jun 27, 2024 Changes in this version + 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) + func ToBlockNumArg(number *big.Int) string + type EtherUnit int + const EtherUnitEther + const EtherUnitFinney + const EtherUnitGWei + const EtherUnitKWei + const EtherUnitMWei + const EtherUnitNoEther + const EtherUnitSzabo + const EtherUnitWei + type Utils struct + func NewUtils() *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