chain_poller

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

File: internal/chain_poller/chain_poller.go

File: internal/chain_poller/chain_poller_interface.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainPoller

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

ChainPoller is responsible for polling logs from the blockchain.

func NewChainPoller

func NewChainPoller(cfg ChainPollerConfig) (*ChainPoller, error)

NewChainPoller initializes a new ChainPoller.

func (*ChainPoller) FilterLogs

func (cp *ChainPoller) FilterLogs(ctx context.Context, filterQueries []api.FilterQuery) ([]api.Log, error)

Poll fetches logs from the blockchain based on the provided filter queries.

type ChainPollerConfig

type ChainPollerConfig struct {
	BlockchainClient api.BlockchainClient
	Logger           *zerolog.Logger
	ChainID          int64
}

ChainPollerConfig holds the configuration for the ChainPoller.

type ChainPollerInterface

type ChainPollerInterface interface {
	FilterLogs(ctx context.Context, filterQueries []api.FilterQuery) ([]api.Log, error)
}

Jump to

Keyboard shortcuts

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