Versions in this module Expand all Collapse all v0 v0.4.0 Jun 24, 2026 Changes in this version + func BytesToHex(b []byte) string + func Decode(ts []ParamType, data []byte) ([]any, error) + func Decode1(t ParamType, data []byte) (any, error) + func DecodeSignature(sig string) ([32]byte, error) + func Encode(ts []ParamType, vals []any) []byte + func Encode1(t ParamType, val any) []byte + func HexToBytes(s string) ([]byte, error) + func IsWhitespace(s string) bool + func MustDecodeSignature(sig string) [32]byte + func PaddedLen(n int) int + func ParamNames(ts []ParamType) []string + func ParseHexByte(hi, lo byte) (byte, error) + func ParseHexUint64(s string) (uint64, error) + func PutDecoder(d *Decoder) + func PutEncoder(e *Encoder) + func PutU256(u *U256) + func RAYInt() *uint256.Int + func ReadUint64At(data []byte, offset int) uint64 + type Address [20]byte + func AddressFromUint64(v uint64) Address + func MustParseAddress(s string) Address + func ParseAddress(s string) (Address, error) + func (a Address) Bytes() []byte + func (a Address) Hex() string + func (a Address) IsZero() bool + func (a Address) String() string + type Decoder struct + func GetDecoder() *Decoder + func NewDecoder() *Decoder + func (d *Decoder) DecodeAddress() [20]byte + func (d *Decoder) DecodeBigInt() *big.Int + func (d *Decoder) DecodeBool() bool + func (d *Decoder) DecodeBytes32() [32]byte + func (d *Decoder) DecodeInt256() *big.Int + func (d *Decoder) DecodeUint16() uint16 + func (d *Decoder) DecodeUint256() *U256 + func (d *Decoder) DecodeUint32() uint32 + func (d *Decoder) DecodeUint64() uint64 + func (d *Decoder) DecodeUint8() uint8 + func (d *Decoder) Len() int + func (d *Decoder) Offset() int + func (d *Decoder) Reset() + func (d *Decoder) SetData(data []byte) + func (d *Decoder) Skip(n int) bool + type Encoder struct + func GetEncoder() *Encoder + func NewEncoder() *Encoder + func (e *Encoder) Bytes() []byte + func (e *Encoder) EncodeAddress(addr [20]byte) *Encoder + func (e *Encoder) EncodeBigInt(v *big.Int) *Encoder + func (e *Encoder) EncodeBool(v bool) *Encoder + func (e *Encoder) EncodeBytes32(v [32]byte) *Encoder + func (e *Encoder) EncodeMethodID(id MethodID) *Encoder + func (e *Encoder) EncodeUint16(v uint16) *Encoder + func (e *Encoder) EncodeUint24(v uint32) *Encoder + func (e *Encoder) EncodeUint256(u *U256) *Encoder + func (e *Encoder) EncodeUint32(v uint32) *Encoder + func (e *Encoder) EncodeUint64(v uint64) *Encoder + func (e *Encoder) EncodeUint8(v uint8) *Encoder + func (e *Encoder) Hex() string + func (e *Encoder) Reset() + type Hash [32]byte + func ParseHash(s string) (Hash, error) + func (h Hash) Bytes() []byte + func (h Hash) Hex() string + func (h Hash) IsZero() bool + type Kind uint8 + const KindAddress + const KindArray + const KindBool + const KindBytes + const KindBytes32 + const KindFixedArr + const KindInt128 + const KindInt16 + const KindInt24 + const KindInt256 + const KindInt32 + const KindInt64 + const KindInt8 + const KindString + const KindTuple + const KindUint128 + const KindUint16 + const KindUint24 + const KindUint256 + const KindUint32 + const KindUint64 + const KindUint8 + const KindUnknown + func (k Kind) String() string + type MethodID [4]byte + type ParamType struct + Elem *ParamType + Kind Kind + Name string + Size int + TupleEl []ParamType + func Named(name string, t ParamType) ParamType + func ParseFunction(sig string) (name string, inputs []ParamType, err error) + func ParseType(s string) (ParamType, error) + func ParseTypes(s string) ([]ParamType, error) + func TAddress() ParamType + func TArray(elem ParamType) ParamType + func TBool() ParamType + func TBytes() ParamType + func TBytes32() ParamType + func TFixedArray(elem ParamType, n int) ParamType + func TInt128() ParamType + func TInt16() ParamType + func TInt24() ParamType + func TInt256() ParamType + func TInt32() ParamType + func TInt64() ParamType + func TInt8() ParamType + func TString() ParamType + func TTuple(fields ...ParamType) ParamType + func TUint128() ParamType + func TUint16() ParamType + func TUint24() ParamType + func TUint256() ParamType + func TUint32() ParamType + func TUint64() ParamType + func TUint8() ParamType + func (t ParamType) GoType() string + func (t ParamType) IsDynamic() bool + func (t ParamType) Signature() string + func (t ParamType) StaticSize() int + type U256 struct + func GetU256() *U256 + func HALF_WAD() *U256 + func IntToU256(v int64) *U256 + func MaxU256() *U256 + func NewU256(v uint64) *U256 + func NewU256FromBig(b *big.Int) *U256 + func NewU256FromHex(s string) (*U256, error) + func NewU64(v uint64) *U256 + func WAD() *U256 + func WadDiv(a, b *U256) *U256 + func WadLn(x *U256) *U256 + func WadMul(a, b *U256) *U256 + func (u *U256) Add(b *U256) *U256 + func (u *U256) Bytes() []byte + func (u *U256) Bytes32() [32]byte + func (u *U256) Clone() *U256 + func (u *U256) Cmp(b *U256) int + func (u *U256) Div(b *U256) *U256 + func (u *U256) Eq(b *U256) bool + func (u *U256) Gt(b *U256) bool + func (u *U256) Hex() string + func (u *U256) Inner() *uint256.Int + func (u *U256) IsPositive() bool + func (u *U256) IsZero() bool + func (u *U256) Lt(b *U256) bool + func (u *U256) Mul(b *U256) *U256 + func (u *U256) MulDiv(b, c *U256) *U256 + func (u *U256) MulDivRoundingUp(b, c *U256) *U256 + func (u *U256) Rsh(n uint) *U256 + func (u *U256) Set(b *U256) *U256 + func (u *U256) SetBytes(b []byte) *U256 + func (u *U256) SetBytes32(b [32]byte) *U256 + func (u *U256) SetUint64(v uint64) *U256 + func (u *U256) Sqrt() *U256 + func (u *U256) String() string + func (u *U256) Sub(b *U256) *U256 + func (u *U256) ToBig() *big.Int + func (u *U256) ToUint64() uint64 + func (u *U256) Uint64() uint64