Documentation
¶
Index ¶
- type ABI
- func (a *ABI) Constructor() *Method
- func (a *ABI) EventByID(id luckyshare.Bytes32) (*Event, bool)
- func (a *ABI) EventByName(name string) (*Event, bool)
- func (a *ABI) Events() []*Event
- func (a *ABI) MethodByID(id MethodID) (*Method, bool)
- func (a *ABI) MethodByInput(input []byte) (*Method, error)
- func (a *ABI) MethodByName(name string) (*Method, bool)
- func (a *ABI) Methods() []*Method
- type Event
- type Method
- func (m *Method) Const() bool
- func (m *Method) DecodeInput(input []byte, v interface{}) error
- func (m *Method) DecodeOutput(output []byte, v interface{}) error
- func (m *Method) EncodeInput(args ...interface{}) ([]byte, error)
- func (m *Method) EncodeOutput(args ...interface{}) ([]byte, error)
- func (m *Method) ID() MethodID
- func (m *Method) Name() string
- type MethodID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ABI ¶
type ABI struct {
// contains filtered or unexported fields
}
ABI holds information about methods and events of contract.
func (*ABI) Constructor ¶
Constructor returns the constructor method if any.
func (*ABI) EventByID ¶
func (a *ABI) EventByID(id luckyshare.Bytes32) (*Event, bool)
EventByID returns the event for the given event id.
func (*ABI) EventByName ¶
EventByName find event for the given event name.
func (*ABI) MethodByID ¶
MethodByID returns method for given method id.
func (*ABI) MethodByInput ¶
MethodByInput find the method for given input. If the input shorter than MethodID, or method not found, an error returned.
func (*ABI) MethodByName ¶
MethodByName find method for the given method name.
type Event ¶
type Event struct {
// contains filtered or unexported fields
}
Event see abi.Event in go-ethereum.
type Method ¶
type Method struct {
// contains filtered or unexported fields
}
Method see abi.Method in go-ethereum.
func (*Method) DecodeInput ¶
DecodeInput decode input data into args.
func (*Method) DecodeOutput ¶
DecodeOutput decode output data.
func (*Method) EncodeInput ¶
EncodeInput encode args to data, and the data is prefixed with method id.
func (*Method) EncodeOutput ¶
EncodeOutput encode output args to data.