storage

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2026 License: Apache-2.0, MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DataVersionCurrent is the current data version
	DataVersionCurrent = 1
)
View Source
const SqliteBoolFalse = 0
View Source
const SqliteBoolTrue = 1

Variables

This section is empty.

Functions

func NewBlockRowFromEthLog

func NewBlockRowFromEthLog(log types.Log, isFinal bool) *blockRow

func NewBlockRowsFromAggkitBlock

func NewBlockRowsFromAggkitBlock(blockHeaders []*aggkittypes.BlockHeader, isFinal bool) map[uint64]*blockRow

func NewBlockRowsFromLogs

func NewBlockRowsFromLogs(logs []types.Log, isFinal bool) map[uint64]*blockRow

func NewLogRowFromEthLog

func NewLogRowFromEthLog(log types.Log) *logRow

func NewLogRowsFromEthLogs

func NewLogRowsFromEthLogs(logs []types.Log) []*logRow

Types

type Blocks

type Blocks struct {
	Headers  map[uint64]*aggkittypes.BlockHeader
	AreFinal map[uint64]bool
}

func NewBlocks

func NewBlocks() Blocks

func (*Blocks) Add

func (b *Blocks) Add(header *aggkittypes.BlockHeader, isFinal bool)

func (*Blocks) Get

func (b *Blocks) Get(number uint64) (*aggkittypes.BlockHeader, bool, error)

func (*Blocks) IsEmpty

func (b *Blocks) IsEmpty() bool

func (*Blocks) ListHeaders

func (b *Blocks) ListHeaders() []*aggkittypes.BlockHeader

type DBRuntimeData

type DBRuntimeData struct {
	NetworkID   uint64
	DataVersion int
}

func (DBRuntimeData) IsCompatible

func (r DBRuntimeData) IsCompatible(storage DBRuntimeData) error

func (DBRuntimeData) String

func (r DBRuntimeData) String() string

type MultidownloaderStorage

type MultidownloaderStorage struct {
	dbtypes.KeyValueStorager
	// contains filtered or unexported fields
}

func (*MultidownloaderStorage) GetBlockHeaderByNumber

func (a *MultidownloaderStorage) GetBlockHeaderByNumber(tx dbtypes.Querier,
	blockNumber uint64) (*aggkittypes.BlockHeader, bool, error)

func (*MultidownloaderStorage) GetEthLogs

func (a *MultidownloaderStorage) GetEthLogs(tx dbtypes.Querier, query mdrtypes.LogQuery) ([]types.Log, error)

func (*MultidownloaderStorage) GetSyncedBlockRangePerContract

func (a *MultidownloaderStorage) GetSyncedBlockRangePerContract(tx dbtypes.Querier) (mdrtypes.SetSyncSegment, error)

func (*MultidownloaderStorage) NewTx

func (*MultidownloaderStorage) SaveEthLogs

func (a *MultidownloaderStorage) SaveEthLogs(tx dbtypes.Querier, logs []types.Log, isFinal bool) error

tx dbtypes.Txer

func (*MultidownloaderStorage) SaveEthLogsWithHeaders

func (a *MultidownloaderStorage) SaveEthLogsWithHeaders(tx dbtypes.Querier,
	blockHeaders []*aggkittypes.BlockHeader, logs []types.Log, isFinal bool) error

func (*MultidownloaderStorage) UpdateSyncedStatus

func (a *MultidownloaderStorage) UpdateSyncedStatus(tx dbtypes.Querier,
	segments []mdrtypes.SyncSegment) error

func (*MultidownloaderStorage) UpsertSyncerConfigs

func (a *MultidownloaderStorage) UpsertSyncerConfigs(tx dbtypes.Querier, configs []mdrtypes.ContractConfig) error

type MultidownloaderStorageConfig

type MultidownloaderStorageConfig struct {
	DBPath string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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