listener

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2020 License: LGPL-3.0 Imports: 7 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidArguments is returned when NewContractEventABI arguments are invalid.
	ErrInvalidArguments = errors.New("the abiPath, eventName and contract address cannot be empty")
)

Functions

This section is empty.

Types

type ContractEventABI

type ContractEventABI struct {
	// contains filtered or unexported fields
}

ContractEventABI represents contract event parser.

func NewContractEventABI

func NewContractEventABI(abiPath string, contract common.Address, eventNames ...string) (*ContractEventABI, error)

NewContractEventABI returns a ContractEventABI instance.

func (*ContractEventABI) GetEvent

func (c *ContractEventABI) GetEvent(receipt *types.Receipt) ([]*Event, error)

GetEvent get events from receipt.

func (*ContractEventABI) GetEvents

func (c *ContractEventABI) GetEvents(receipts []*types.Receipt) ([]*Event, error)

GetEvents get events from receipts.

type Event

type Event struct {
	TxHash    common.Hash
	Contract  common.Address
	EventName string
	Topic     common.Hash
	Arguments []interface{}
}

Event represents a contract event instance from Log.

Jump to

Keyboard shortcuts

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