Documentation ¶
Index ¶
- Variables
- func EventField[T any](e EventParam, name string) (T, error)
- func EventFieldByID[T any](e EventParam, id int) (T, error)
- type EventParam
- func (e EventParam) FieldAddress(name string) (address.Address, error)
- func (e EventParam) FieldByIDAddress(id int) (address.Address, error)
- func (e EventParam) FieldByIDBytes12(id int) (string, error)
- func (e EventParam) FieldByIDUint256(id int) (*big.Int, error)
- func (e EventParam) FieldByIDUint256Slice(id int) ([]*big.Int, error)
- func (e EventParam) FieldBytes12(name string) (string, error)
- func (e EventParam) FieldUint256(name string) (*big.Int, error)
- func (e EventParam) FieldUint256Slice(name string) ([]*big.Int, error)
- func (e EventParam) String() string
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInvlidEventParam is an error for invalid event param ErrInvlidEventParam = errors.New("invalid event param") )
Functions ¶
func EventField ¶
func EventField[T any](e EventParam, name string) (T, error)
EventField is a helper function to get a field from event param
func EventFieldByID ¶
func EventFieldByID[T any](e EventParam, id int) (T, error)
EventFieldByID is a helper function to get a field from event param
Types ¶
type EventParam ¶
type EventParam struct {
// contains filtered or unexported fields
}
EventParam is a struct to hold smart contract event parameters, which can easily convert a param to go type
func UnpackEventParam ¶
UnpackEventParam is a helper function to unpack event parameters
func (EventParam) FieldAddress ¶
func (e EventParam) FieldAddress(name string) (address.Address, error)
FieldAddress is a helper function to get an address field from event param
func (EventParam) FieldByIDAddress ¶
func (e EventParam) FieldByIDAddress(id int) (address.Address, error)
FieldByIDAddress is a helper function to get an address field from event param
func (EventParam) FieldByIDBytes12 ¶
func (e EventParam) FieldByIDBytes12(id int) (string, error)
FieldByIDBytes12 is a helper function to get a bytes12 field from event param
func (EventParam) FieldByIDUint256 ¶
func (e EventParam) FieldByIDUint256(id int) (*big.Int, error)
FieldByIDUint256 is a helper function to get a uint256 field from event param
func (EventParam) FieldByIDUint256Slice ¶
func (e EventParam) FieldByIDUint256Slice(id int) ([]*big.Int, error)
FieldByIDUint256Slice is a helper function to get a uint256 slice field from event param
func (EventParam) FieldBytes12 ¶
func (e EventParam) FieldBytes12(name string) (string, error)
FieldBytes12 is a helper function to get a bytes12 field from event param
func (EventParam) FieldUint256 ¶
func (e EventParam) FieldUint256(name string) (*big.Int, error)
FieldUint256 is a helper function to get a uint256 field from event param
func (EventParam) FieldUint256Slice ¶
func (e EventParam) FieldUint256Slice(name string) ([]*big.Int, error)
FieldUint256Slice is a helper function to get a uint256 slice field from event param
func (EventParam) String ¶
func (e EventParam) String() string