contract

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2020 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Contract

type Contract struct {
	Address       string                 // Address of the contract
	Network       string                 // Network on which the contract is deployed; default empty "" is Ethereum mainnet
	StartingBlock int64                  // Starting block of the contract
	Abi           string                 // Abi string
	ParsedAbi     abi.ABI                // Parsed abi
	Events        map[string]types.Event // List of events to watch
	FilterArgs    map[string]bool        // User-input list of values to filter event logs for
}

Contract object to hold our contract data

func (Contract) Init

func (c Contract) Init() *Contract

Init initializes a contract object

func (*Contract) PassesEventFilter

func (c *Contract) PassesEventFilter(args map[string]string) bool

PassesEventFilter returns true if any mapping value matches filtered for address or if no filter exists Used to check if an event log name-value mapping should be filtered or not

func (*Contract) WantedEventArg

func (c *Contract) WantedEventArg(arg string) bool

WantedEventArg returns true if address is in list of arguments to filter events for or if no filtering is specified

Jump to

Keyboard shortcuts

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