logs

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilterCriteria

type FilterCriteria struct {
	Addresses []common.Address
	Topics    [][]common.Hash
}

FilterCriteria for log filtering. Address of the contract emitting the log. Topics that match the log topics, following the format: [] “anything” [A] “A in first position (and anything after)” [null, B] “anything in first position AND B in second position (and anything after)” [A, B] “A in first position AND B in second position (and anything after)” [[A, B], [A, B]] “(A OR B) in first position AND (A OR B) in second position (and anything after)”

func NewFilterCriteria added in v0.11.0

func NewFilterCriteria(addresses []common.Address, topics [][]common.Hash) (*FilterCriteria, error)

type IDFilter

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

IDFilter matches all logs against the criteria found in a single block identified by the provided block ID.

func NewIDFilter

func NewIDFilter(
	id common.Hash,
	criteria FilterCriteria,
	blocks storage.BlockIndexer,
	receipts storage.ReceiptIndexer,
) *IDFilter

func (*IDFilter) Match

func (i *IDFilter) Match() ([]*gethTypes.Log, error)

type RangeFilter

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

RangeFilter matches all the indexed logs within the range defined as start and end block height. The start must be strictly smaller or equal than end value.

func NewRangeFilter

func NewRangeFilter(
	start, end big.Int,
	criteria FilterCriteria,
	receipts storage.ReceiptIndexer,
) (*RangeFilter, error)

func (*RangeFilter) Match

func (r *RangeFilter) Match() ([]*gethTypes.Log, error)

Jump to

Keyboard shortcuts

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