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.
Click to show internal directories.
Click to hide internal directories.