Versions in this module Expand all Collapse all v2 v2.3.3 Oct 19, 2023 Changes in this version + const ElementSize + const EventIDSize + const FallbackFunctionName + const FunctionIDSize + func GetPackingTypes(args []Argument) []interface + func Pack(argSpec []Argument, args ...interface{}) ([]byte, error) + func PackEvent(eventSpec *EventSpec, args ...interface{}) ([]binary.Word256, []byte, error) + func Signature(name string, args []Argument) string + func Unpack(argSpec []Argument, data []byte, args ...interface{}) error + func UnpackEvent(eventSpec *EventSpec, topics []binary.Word256, data []byte, ...) error + func UnpackRevert(data []byte) (message *string, err error) + type Argument struct + ArrayLength uint64 + EVM EVMType + Hashed bool + Indexed bool + IsArray bool + Name string + type EVMAddress struct + func (e EVMAddress) Dynamic() bool + func (e EVMAddress) GetSignature() string + func (e EVMAddress) ImplicitCast(o EVMType) bool + func (e EVMAddress) String() string + type EVMBool struct + func (e EVMBool) Dynamic() bool + func (e EVMBool) GetSignature() string + func (e EVMBool) ImplicitCast(o EVMType) bool + func (e EVMBool) String() string + type EVMBytes struct + M uint64 + func (e EVMBytes) Dynamic() bool + func (e EVMBytes) GetSignature() string + func (e EVMBytes) ImplicitCast(o EVMType) bool + func (e EVMBytes) String() string + type EVMFixed struct + M uint64 + N uint64 + func (e EVMFixed) Dynamic() bool + func (e EVMFixed) GetSignature() string + func (e EVMFixed) ImplicitCast(o EVMType) bool + type EVMInt struct + M uint64 + func (e EVMInt) Dynamic() bool + func (e EVMInt) GetSignature() string + func (e EVMInt) ImplicitCast(o EVMType) bool + func (e EVMInt) String() string + type EVMString struct + func (e EVMString) Dynamic() bool + func (e EVMString) GetSignature() string + func (e EVMString) ImplicitCast(o EVMType) bool + func (e EVMString) String() string + type EVMType interface + Dynamic func() bool + GetSignature func() string + ImplicitCast func(o EVMType) bool + type EVMUint struct + M uint64 + func (e EVMUint) Dynamic() bool + func (e EVMUint) GetSignature() string + func (e EVMUint) ImplicitCast(o EVMType) bool + func (e EVMUint) String() string + type EventID [EventIDSize]byte + func GetEventID(signature string) (id EventID) + func (id EventID) Bytes() []byte + func (id EventID) String() string + type EventSpec struct + Anonymous bool + ID EventID + Inputs []Argument + Name string + func (e *EventSpec) Get(key string) (interface{}, bool) + func (e *EventSpec) String() string + func (e *EventSpec) UnmarshalJSON(data []byte) error + type FunctionID [FunctionIDSize]byte + func GetFunctionID(signature string) (id FunctionID) + func (fs FunctionID) Bytes() []byte + type FunctionSpec struct + Constant bool + FunctionID FunctionID + Inputs []Argument + Name string + Outputs []Argument + func EncodeFunctionCall(abiData, funcName string, logger *logging.Logger, args ...interface{}) ([]byte, *FunctionSpec, error) + func EncodeFunctionCallFromFile(abiFileName, abiPath, funcName string, logger *logging.Logger, ...) ([]byte, *FunctionSpec, error) + func NewFunctionSpec(name string, inputs, outputs []Argument) *FunctionSpec + func SpecFromFunctionReflect(fname string, v reflect.Value, skipIn, skipOut int) *FunctionSpec + func SpecFromStructReflect(fname string, args reflect.Type, rets reflect.Type) *FunctionSpec + func (f *FunctionSpec) SetConstant() *FunctionSpec + func (f *FunctionSpec) String() string + type Spec struct + Constructor *FunctionSpec + EventsByID map[EventID]*EventSpec + EventsByName map[string]*EventSpec + Fallback *FunctionSpec + Functions map[string]*FunctionSpec + func LoadPath(abiFileOrDirs ...string) (*Spec, error) + func MergeSpec(abiSpec []*Spec) *Spec + func NewSpec() *Spec + func ReadSpec(specBytes []byte) (*Spec, error) + func ReadSpecFile(filename string) (*Spec, error) + func (spec *Spec) GetEventAbi(id EventID, addresses crypto.Address) (*EventSpec, error) + func (spec *Spec) Pack(fname string, args ...interface{}) ([]byte, *FunctionSpec, error) + func (spec *Spec) Unpack(data []byte, fname string, args ...interface{}) error + func (spec *Spec) UnpackWithID(data []byte, args ...interface{}) error + type Variable struct + Name string + Value string + func DecodeFunctionReturn(abiData, name string, data []byte) ([]*Variable, error) + func DecodeFunctionReturnFromFile(abiLocation, binPath, funcName string, resultRaw []byte, ...) ([]*Variable, error)