sqlitechainclient

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: MIT, Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SQLiteChainClient

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

SQLiteChainClient is an eventfeed.ChainClient backed by a persisted history of EVM events in a SQLite database. An EventFeed can be plugged to this backend instead of Alchemy/Infura.

func New

func New(dbURI string, chainID tableland.ChainID) (*SQLiteChainClient, error)

New returns a new *SQLiteChainClient.

func (*SQLiteChainClient) FilterLogs

func (scc *SQLiteChainClient) FilterLogs(ctx context.Context, filter ethereum.FilterQuery) ([]types.Log, error)

FilterLogs returns the logs matching a particular filter.

func (*SQLiteChainClient) HeaderByNumber

func (scc *SQLiteChainClient) HeaderByNumber(ctx context.Context, block *big.Int) (*types.Header, error)

HeaderByNumber returns the block header of the chain. Note that it can only be called with block==nil (i.e: last known block) since the underlying SQLite database isn't a full replication of the underlying chain.

Jump to

Keyboard shortcuts

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