eventiterator

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockProposedIterator

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

BlockProposedIterator iterates the emitted TaikoL1.BlockProposed events in the chain, with the awareness of reorganization.

func NewBlockProposedIterator

func NewBlockProposedIterator(ctx context.Context, cfg *BlockProposedIteratorConfig) (*BlockProposedIterator, error)

NewBlockProposedIterator creates a new instance of BlockProposed event iterator.

func (*BlockProposedIterator) Iter

func (i *BlockProposedIterator) Iter() error

Iter iterates the given chain between the given start and end heights, will call the callback when a BlockProposed event is iterated.

type BlockProposedIteratorConfig

type BlockProposedIteratorConfig struct {
	Client                *ethclient.Client
	TaikoL1               *bindings.TaikoL1Client
	MaxBlocksReadPerEpoch *uint64
	StartHeight           *big.Int
	EndHeight             *big.Int
	FilterQuery           []*big.Int
	Reverse               bool
	OnBlockProposedEvent  OnBlockProposedEvent
}

BlockProposedIteratorConfig represents the configs of a BlockProposed event iterator.

type BlockProvenIterator

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

BlockProvenIterator iterates the emitted TaikoL1.BlockProven events in the chain, with the awareness of reorganization.

func NewBlockProvenIterator

func NewBlockProvenIterator(ctx context.Context, cfg *BlockProvenIteratorConfig) (*BlockProvenIterator, error)

NewBlockProvenIterator creates a new instance of BlockProven event iterator.

func (*BlockProvenIterator) Iter

func (i *BlockProvenIterator) Iter() error

Iter iterates the given chain between the given start and end heights, will call the callback when a BlockProven event is iterated.

type BlockProvenIteratorConfig

type BlockProvenIteratorConfig struct {
	Client                *ethclient.Client
	TaikoL1               *bindings.TaikoL1Client
	MaxBlocksReadPerEpoch *uint64
	StartHeight           *big.Int
	EndHeight             *big.Int
	FilterQuery           []*big.Int
	Reverse               bool
	OnBlockProvenEvent    OnBlockProvenEvent
}

BlockProvenIteratorConfig represents the configs of a BlockProven event iterator.

type EndBlockProposedEventIterFunc added in v0.1.9

type EndBlockProposedEventIterFunc func()

EndBlockProposedEventIterFunc ends the current iteration.

type EndBlockProvenEventIterFunc

type EndBlockProvenEventIterFunc func()

EndBlockProvenEventIterFunc ends the current iteration.

type OnBlockProposedEvent

OnBlockProposedEvent represents the callback function which will be called when a TaikoL1.BlockProposed event is iterated.

type OnBlockProvenEvent

OnBlockProvenEvent represents the callback function which will be called when a TaikoL1.BlockProven event is iterated.

Jump to

Keyboard shortcuts

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