Documentation ¶
Overview ¶
ABI encoding/decoding
Implementation based on the ABI Spec.
Index ¶
- Variables
- func Encode(item *Item) []byte
- type Item
- func Address(a [20]byte) *Item
- func Array(items ...*Item) *Item
- func ArrayK(items ...*Item) *Item
- func BigInt(i big.Int) *Item
- func Bool(b bool) *Item
- func Bytes(d []byte) *Item
- func Bytes32(d [32]byte) *Item
- func Bytes4(d [4]byte) *Item
- func Decode(input []byte, t schema.Type) (*Item, int, error)
- func String(s string) *Item
- func Tuple(items ...*Item) *Item
- func Uint16(i uint16) *Item
- func Uint256(i uint256.Int) *Item
- func Uint32(i uint32) *Item
- func Uint64(i uint64) *Item
- func Uint8(i uint8) *Item
- func (item *Item) Address() [20]byte
- func (it *Item) At(i int) *Item
- func (item *Item) BigInt() *big.Int
- func (item *Item) Bool() bool
- func (it *Item) Bytes() []byte
- func (item *Item) Bytes32() [32]byte
- func (item *Item) Bytes4() [4]byte
- func (item *Item) Done()
- func (item *Item) Equal(other *Item) bool
- func (it *Item) Len() int
- func (item *Item) String() string
- func (item *Item) Uint16() uint16
- func (item *Item) Uint256() uint256.Int
- func (item *Item) Uint32() uint32
- func (item *Item) Uint64() uint64
- func (item *Item) Uint8() uint8
- type Log
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type Item ¶
func Decode ¶
Decodes ABI encoded bytes into an Item according to the 'schema' defined by t. For example:
Decode(b, schema.Tuple(schema.Dynamic(), schema.Static()))
Returns the item and the number of bytes read from input
Click to show internal directories.
Click to hide internal directories.