events

package
v1.3.12 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2023 License: MIT Imports: 6 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventInfo

type EventInfo struct {
	Name  string      // name of the event as in abi.Event
	ID    common.Hash // ID of the event
	Types []EventType // Normally a single item unless otherwise identical events differ in terms of "indexed" arguments.
}

EventInfo gather information about a 'unique event'.

func (*EventInfo) Event

func (ev *EventInfo) Event(log types.Log) (interface{}, error)

func (*EventInfo) HasType

func (ev *EventInfo) HasType(typ EventType) bool

func (*EventInfo) MarshalJSON

func (ev *EventInfo) MarshalJSON() ([]byte, error)

func (*EventInfo) Value

func (ev *EventInfo) Value(log types.Log, typ ...reflect.Type) (res reflect.Value, err error)

Value returns a value constructed from the type of the event and filled via the bound contract's UnpackLog function. The optional typ parameter allows to disambiguate the type to select. This is useful in cases where the ID of an EventInfo refers to multiples EventType where each of the bound contract would be able to unpack the log with no error.

type EventType

type EventType struct {
	Type          reflect.Type // type of the struct event
	BoundContract *bind.BoundContract
}

EventType contains the Go type of an event and a minimal bound contract used to unpack event logs.

func (*EventType) MarshalJSON

func (ev *EventType) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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