indexer

package
v0.0.0-...-ae3d888 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitFromConfig

func InitFromConfig(cfg *logic.Config, pastEvents bool, startBlockNumber *big.Int) error

Initialize and starts all the indexers from config.

Types

type Indexer

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

Indexer struct holds the configuration and state for the Ethereum chain listener.

func NewIndexer

func NewIndexer(rpcURL, beaconURL, networkName, contractAddress string, pastEvents bool, startBlockNumber *big.Int) *Indexer

NewIndexer creates a new Indexer instance.

func (*Indexer) HandleEvent

func (indexer *Indexer) HandleEvent(log types.Log)

HandleEvent handles the incoming Ethereum event.

func (*Indexer) Start

func (indexer *Indexer) Start()

Start starts the Ethereum chain listener/indexer.

func (*Indexer) SubscribeEvent

func (indexer *Indexer) SubscribeEvent(eventHash string, callbackFunc func(string, string, string, types.Log))

SubscribeEvent subscribes to the specified event.

Jump to

Keyboard shortcuts

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