Documentation ¶
Index ¶
- type Block
- type EVMBlock
- type EVMBlockHeader
- type EVMDownloader
- type EVMDownloaderImplementation
- func (d *EVMDownloaderImplementation) GetBlockHeader(ctx context.Context, blockNum uint64) (EVMBlockHeader, bool)
- func (d *EVMDownloaderImplementation) GetEventsByBlockRange(ctx context.Context, fromBlock, toBlock uint64) []EVMBlock
- func (d *EVMDownloaderImplementation) GetLogs(ctx context.Context, fromBlock, toBlock uint64) []types.Log
- func (d *EVMDownloaderImplementation) WaitForNewBlocks(ctx context.Context, lastBlockSeen uint64) (newLastBlock uint64)
- type EVMDownloaderInterface
- type EVMDriver
- type EthClienter
- type LogAppenderMap
- type ProcessorInterface
- type ReorgDetector
- type RetryHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EVMBlock ¶
type EVMBlock struct { EVMBlockHeader Events []interface{} }
type EVMBlockHeader ¶
type EVMDownloader ¶
type EVMDownloader struct { EVMDownloaderInterface // contains filtered or unexported fields }
func NewEVMDownloader ¶
func NewEVMDownloader( syncerID string, ethClient EthClienter, syncBlockChunkSize uint64, blockFinalityType etherman.BlockNumberFinality, waitForNewBlocksPeriod time.Duration, appender LogAppenderMap, adressessToQuery []common.Address, rh *RetryHandler, ) (*EVMDownloader, error)
type EVMDownloaderImplementation ¶
type EVMDownloaderImplementation struct {
// contains filtered or unexported fields
}
func NewEVMDownloaderImplementation ¶
func NewEVMDownloaderImplementation( syncerID string, ethClient EthClienter, blockFinality *big.Int, waitForNewBlocksPeriod time.Duration, appender LogAppenderMap, topicsToQuery []common.Hash, adressessToQuery []common.Address, rh *RetryHandler, ) *EVMDownloaderImplementation
func (*EVMDownloaderImplementation) GetBlockHeader ¶
func (d *EVMDownloaderImplementation) GetBlockHeader(ctx context.Context, blockNum uint64) (EVMBlockHeader, bool)
func (*EVMDownloaderImplementation) GetEventsByBlockRange ¶
func (d *EVMDownloaderImplementation) GetEventsByBlockRange(ctx context.Context, fromBlock, toBlock uint64) []EVMBlock
func (*EVMDownloaderImplementation) WaitForNewBlocks ¶
func (d *EVMDownloaderImplementation) WaitForNewBlocks( ctx context.Context, lastBlockSeen uint64, ) (newLastBlock uint64)
type EVMDownloaderInterface ¶
type EVMDownloaderInterface interface { WaitForNewBlocks(ctx context.Context, lastBlockSeen uint64) (newLastBlock uint64) GetEventsByBlockRange(ctx context.Context, fromBlock, toBlock uint64) []EVMBlock GetLogs(ctx context.Context, fromBlock, toBlock uint64) []types.Log GetBlockHeader(ctx context.Context, blockNum uint64) (EVMBlockHeader, bool) }
type EVMDriver ¶
type EVMDriver struct {
// contains filtered or unexported fields
}
func NewEVMDriver ¶
func NewEVMDriver( reorgDetector ReorgDetector, processor processorInterface, downloader downloader, reorgDetectorID string, downloadBufferSize int, rh *RetryHandler, ) (*EVMDriver, error)
type EthClienter ¶
type EthClienter interface { ethereum.LogFilterer ethereum.BlockNumberReader ethereum.ChainReader bind.ContractBackend }
type ProcessorInterface ¶
type ReorgDetector ¶
type RetryHandler ¶
func (*RetryHandler) Handle ¶
func (h *RetryHandler) Handle(funcName string, attempts int)
Click to show internal directories.
Click to hide internal directories.