evmabi

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2018 License: LGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForEachUnpack

func ForEachUnpack(t abi.Type, output []byte, start, size int) (interface{}, error)

iteratively unpack elements

func LengthPrefixPointsTo

func LengthPrefixPointsTo(cursor int, output []byte) (start int, length int, err error)

// interprets a 32 byte slice as an offset and then determines which indice to look to decode the type.

func LocateMethod

func LocateMethod(abiInst *abi.ABI, methodID []byte) (*abi.Method, error)

func ReadBool

func ReadBool(word []byte) (bool, error)

reads a bool

func ReadFixedBytes

func ReadFixedBytes(t abi.Type, word []byte) (interface{}, error)

through reflection, creates a fixed array to be read from

func ReadFunctionType

func ReadFunctionType(t abi.Type, word []byte) (funcTy [24]byte, err error)

A function type is simply the address with the function selection signature at the end. This enforces that standard by always presenting it as a 24-array (address + sig = 24 bytes)

func ReadInteger

func ReadInteger(kind reflect.Kind, b []byte) interface{}

reads the integer based on its kind

func RequireLengthPrefix

func RequireLengthPrefix(t *abi.Type) bool

func ToGoSlice

func ToGoSlice(i int, t abi.Type, output []byte) (interface{}, error)

func ToGoType

func ToGoType(index int, t abi.Type, data []byte) (interface{}, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL