20 lines
614 B
Go
20 lines
614 B
Go
package types
|
|
|
|
import (
|
|
"github.com/ethereum/go-ethereum/common"
|
|
abci "github.com/tendermint/tendermint/abci/types"
|
|
tmtypes "github.com/tendermint/tendermint/types"
|
|
)
|
|
|
|
// EVMTxIndexer defines the interface of custom eth tx indexer.
|
|
type EVMTxIndexer interface {
|
|
// LastIndexedBlock returns -1 if indexer db is empty
|
|
LastIndexedBlock() (int64, error)
|
|
IndexBlock(*tmtypes.Block, []*abci.ResponseDeliverTx) error
|
|
|
|
// GetByTxHash returns nil if tx not found.
|
|
GetByTxHash(common.Hash) (*TxResult, error)
|
|
// GetByBlockAndIndex returns nil if tx not found.
|
|
GetByBlockAndIndex(int64, int32) (*TxResult, error)
|
|
}
|