Documentation
¶
Index ¶
- type ChainLogDB
- func (a *ChainLogDB) AddBlock(blk *types.Block)
- func (a *ChainLogDB) Close()
- func (a *ChainLogDB) GetBlockByHash(blkHash [32]byte) (blk *evmtypes.Block, err error)
- func (a *ChainLogDB) GetBlockByHeight(height uint64) (*evmtypes.Block, error)
- func (a *ChainLogDB) GetLatestBlockInfo() (height, timestamp int64, hash [32]byte, latestScanBlockHeight int64)
- func (a *ChainLogDB) GetTxByHash(txHash common.Hash) (tx *evmtypes.Transaction, sig [65]byte, err error)
- func (a *ChainLogDB) GetTxListByHeightWithRange(height uint32, start, end int) (txs []*evmtypes.Transaction, sigs [][65]byte, err error)
- func (a *ChainLogDB) IsTxMined(txHash string) bool
- func (a *ChainLogDB) QueryLogs(addresses []common.Address, topics [][]common.Hash, ...) (logs []evmtypes.Log, err error)
- type IStore
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
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() }
Click to show internal directories.
Click to hide internal directories.