store

package
v0.0.0-...-0928cd4 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainLogDB

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

func NewChainLogDB

func NewChainLogDB(dataPath string, maxLogResults int, logger log.Logger) *ChainLogDB

func (*ChainLogDB) AddBlock

func (a *ChainLogDB) AddBlock(blk *types.Block)

func (*ChainLogDB) Close

func (a *ChainLogDB) Close()

func (*ChainLogDB) GetBlockByHash

func (a *ChainLogDB) GetBlockByHash(blkHash [32]byte) (blk *evmtypes.Block, err error)

func (*ChainLogDB) GetBlockByHeight

func (a *ChainLogDB) GetBlockByHeight(height uint64) (*evmtypes.Block, error)

func (*ChainLogDB) GetLatestBlockInfo

func (a *ChainLogDB) GetLatestBlockInfo() (height, timestamp int64, hash [32]byte, latestScanBlockHeight int64)

func (*ChainLogDB) GetTxByHash

func (a *ChainLogDB) GetTxByHash(txHash common.Hash) (tx *evmtypes.Transaction, sig [65]byte, err error)

func (*ChainLogDB) GetTxListByHeightWithRange

func (a *ChainLogDB) GetTxListByHeightWithRange(height uint32, start, end int) (txs []*evmtypes.Transaction, sigs [][65]byte, err error)

func (*ChainLogDB) IsTxMined

func (a *ChainLogDB) IsTxMined(txHash string) bool

func (*ChainLogDB) QueryLogs

func (a *ChainLogDB) QueryLogs(addresses []common.Address, topics [][]common.Hash, startHeight, endHeight uint32, filter evmtypes.FilterFunc) (logs []evmtypes.Log, err error)

type IStore

type IStore interface {
	AddBlock(blk *types.Block)
	//QueryLogs(addrOrList [][20]byte, topicsOrList [][][32]byte, startHeight, endHeight uint32, fn func([]byte) bool) error
	IsTxMined(txHash string) bool
	GetLatestBlockInfo() (height, timestamp int64, hash [32]byte, latestScanBlockHeight int64)
	GetBlockByHeight(height uint64) (*evmtypes.Block, error)
	GetBlockByHash(blkHash [32]byte) (blk *evmtypes.Block, err error)
	GetTxByHash(txHash common.Hash) (tx *evmtypes.Transaction, sig [65]byte, err error)
	GetTxListByHeightWithRange(height uint32, start, end int) (txs []*evmtypes.Transaction, sigs [][65]byte, err error)
	QueryLogs(addresses []common.Address, topics [][]common.Hash, startHeight, endHeight uint32, filter evmtypes.FilterFunc) (logs []evmtypes.Log, err error)
	Close()
}

Jump to

Keyboard shortcuts

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