impl

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: MIT, Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventFeed

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

EventFeed provides a stream of filtered events from a SC.

func New

func New(
	systemStore sqlstore.SystemStore,
	chainID tableland.ChainID,
	ethClient eventfeed.ChainClient,
	scAddress common.Address,
	sm *sharedmemory.SharedMemory,
	opts ...eventfeed.Option,
) (*EventFeed, error)

New returns a new EventFeed.

func (*EventFeed) Start

func (ef *EventFeed) Start(
	ctx context.Context,
	fromHeight int64,
	ch chan<- eventfeed.BlockEvents,
	filterEventTypes []eventfeed.EventType,
) error

Start sends a stream of filtered events from a smart contract since `fromHeight` to the provided channel. This is a blocking call, which the caller must cancel the provided context to shut down gracefully the feed. The received channel won't be closed.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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