Documentation
¶
Index ¶
- type Backend
- type EVMBackend
- func (e *EVMBackend) BlockNumber() (hexutil.Uint64, error)
- func (e *EVMBackend) BloomStatus() (uint64, uint64)
- func (e *EVMBackend) ChainConfig() *params.ChainConfig
- func (e *EVMBackend) EthBlockFromTendermint(clientCtx client.Context, queryClient evmtypes.QueryClient, ...) (map[string]interface{}, error)
- func (e *EVMBackend) GetBlockByHash(hash common.Hash, fullTx bool) (map[string]interface{}, error)
- func (e *EVMBackend) GetBlockByNumber(blockNum types.BlockNumber, fullTx bool) (map[string]interface{}, error)
- func (e *EVMBackend) GetLogs(blockHash common.Hash) ([][]*ethtypes.Log, error)
- func (e *EVMBackend) GetLogsByNumber(blockNum types.BlockNumber) ([][]*ethtypes.Log, error)
- func (e *EVMBackend) GetTransactionLogs(txHash common.Hash) ([]*ethtypes.Log, error)
- func (e *EVMBackend) HeaderByHash(blockHash common.Hash) (*ethtypes.Header, error)
- func (e *EVMBackend) HeaderByNumber(blockNum types.BlockNumber) (*ethtypes.Header, error)
- func (e *EVMBackend) PendingTransactions() ([]*types.RPCTransaction, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface { // Used by block filter; also used for polling BlockNumber() (hexutil.Uint64, error) HeaderByNumber(blockNum types.BlockNumber) (*ethtypes.Header, error) HeaderByHash(blockHash common.Hash) (*ethtypes.Header, error) GetBlockByNumber(blockNum types.BlockNumber, fullTx bool) (map[string]interface{}, error) GetBlockByHash(hash common.Hash, fullTx bool) (map[string]interface{}, error) // returns the logs of a given block GetLogs(blockHash common.Hash) ([][]*ethtypes.Log, error) // Used by pending transaction filter PendingTransactions() ([]*types.RPCTransaction, error) // Used by log filter GetTransactionLogs(txHash common.Hash) ([]*ethtypes.Log, error) BloomStatus() (uint64, uint64) ChainConfig() *params.ChainConfig }
Backend implements the functionality needed to filter changes. Implemented by EVMBackend.
type EVMBackend ¶
type EVMBackend struct {
// contains filtered or unexported fields
}
EVMBackend implements the Backend interface
func NewEVMBackend ¶
func NewEVMBackend(clientCtx client.Context) *EVMBackend
NewEVMBackend creates a new EVMBackend instance
func (*EVMBackend) BlockNumber ¶
func (e *EVMBackend) BlockNumber() (hexutil.Uint64, error)
BlockNumber returns the current block number.
func (*EVMBackend) BloomStatus ¶
func (e *EVMBackend) BloomStatus() (uint64, uint64)
BloomStatus returns the BloomBitsBlocks and the number of processed sections maintained by the chain indexer.
func (*EVMBackend) ChainConfig ¶
func (e *EVMBackend) ChainConfig() *params.ChainConfig
ChainConfig returns the chain configuration for the chain. This method returns a nil pointer if the query fails.
func (*EVMBackend) EthBlockFromTendermint ¶
func (e *EVMBackend) EthBlockFromTendermint( clientCtx client.Context, queryClient evmtypes.QueryClient, block *tmtypes.Block, fullTx bool, ) (map[string]interface{}, error)
EthBlockFromTendermint returns a JSON-RPC compatible Ethereum block from a given Tendermint block.
func (*EVMBackend) GetBlockByHash ¶
GetBlockByHash returns the block identified by hash.
func (*EVMBackend) GetBlockByNumber ¶
func (e *EVMBackend) GetBlockByNumber(blockNum types.BlockNumber, fullTx bool) (map[string]interface{}, error)
GetBlockByNumber returns the block identified by number.
func (*EVMBackend) GetLogs ¶
GetLogs returns all the logs from all the ethereum transactions in a block.
func (*EVMBackend) GetLogsByNumber ¶
func (e *EVMBackend) GetLogsByNumber(blockNum types.BlockNumber) ([][]*ethtypes.Log, error)
func (*EVMBackend) GetTransactionLogs ¶
GetTransactionLogs returns the logs given a transaction hash. It returns an error if there's an encoding error. If no logs are found for the tx hash, the error is nil.
func (*EVMBackend) HeaderByHash ¶
HeaderByHash returns the block header identified by hash.
func (*EVMBackend) HeaderByNumber ¶
func (e *EVMBackend) HeaderByNumber(blockNum types.BlockNumber) (*ethtypes.Header, error)
HeaderByNumber returns the block header identified by height.
func (*EVMBackend) PendingTransactions ¶
func (e *EVMBackend) PendingTransactions() ([]*types.RPCTransaction, error)
PendingTransactions returns the transactions that are in the transaction pool and have a from address that is one of the accounts this node manages.