Documentation ¶
Index ¶
- type Backend
- type DogsChainBackend
- func (b *DogsChainBackend) BlockNumber() (hexutil.Uint64, error)
- func (b *DogsChainBackend) BloomStatus() (uint64, uint64)
- func (b *DogsChainBackend) GetBlockByHash(hash common.Hash, fullTx bool) (map[string]interface{}, error)
- func (b *DogsChainBackend) GetBlockByNumber(blockNum rpctypes.BlockNumber, fullTx bool) (map[string]interface{}, error)
- func (b *DogsChainBackend) GetLogs(blockHash common.Hash) ([][]*ethtypes.Log, error)
- func (b *DogsChainBackend) GetTransactionLogs(txHash common.Hash) ([]*ethtypes.Log, error)
- func (b *DogsChainBackend) HeaderByHash(blockHash common.Hash) (*ethtypes.Header, error)
- func (b *DogsChainBackend) HeaderByNumber(blockNum rpctypes.BlockNumber) (*ethtypes.Header, error)
- func (b *DogsChainBackend) LatestBlockNumber() (int64, error)
- func (b *DogsChainBackend) PendingTransactions() ([]*rpctypes.Transaction, 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) LatestBlockNumber() (int64, error) HeaderByNumber(blockNum rpctypes.BlockNumber) (*ethtypes.Header, error) HeaderByHash(blockHash common.Hash) (*ethtypes.Header, error) GetBlockByNumber(blockNum rpctypes.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() ([]*rpctypes.Transaction, error) // Used by log filter GetTransactionLogs(txHash common.Hash) ([]*ethtypes.Log, error) BloomStatus() (uint64, uint64) }
Backend implements the functionality needed to filter changes. Implemented by DogsChainBackend.
type DogsChainBackend ¶
type DogsChainBackend struct {
// contains filtered or unexported fields
}
DogsChainBackend implements the Backend interface
func New ¶
func New(clientCtx clientcontext.CLIContext) *DogsChainBackend
New creates a new DogsChainBackend instance
func (*DogsChainBackend) BlockNumber ¶
func (b *DogsChainBackend) BlockNumber() (hexutil.Uint64, error)
BlockNumber returns the current block number.
func (*DogsChainBackend) BloomStatus ¶
func (b *DogsChainBackend) BloomStatus() (uint64, uint64)
BloomStatus returns the BloomBitsBlocks and the number of processed sections maintained by the chain indexer.
func (*DogsChainBackend) GetBlockByHash ¶
func (b *DogsChainBackend) GetBlockByHash(hash common.Hash, fullTx bool) (map[string]interface{}, error)
GetBlockByHash returns the block identified by hash.
func (*DogsChainBackend) GetBlockByNumber ¶
func (b *DogsChainBackend) GetBlockByNumber(blockNum rpctypes.BlockNumber, fullTx bool) (map[string]interface{}, error)
GetBlockByNumber returns the block identified by number.
func (*DogsChainBackend) GetLogs ¶
GetLogs returns all the logs from all the ethereum transactions in a block.
func (*DogsChainBackend) 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 (*DogsChainBackend) HeaderByHash ¶
HeaderByHash returns the block header identified by hash.
func (*DogsChainBackend) HeaderByNumber ¶
func (b *DogsChainBackend) HeaderByNumber(blockNum rpctypes.BlockNumber) (*ethtypes.Header, error)
HeaderByNumber returns the block header identified by height.
func (*DogsChainBackend) LatestBlockNumber ¶
func (b *DogsChainBackend) LatestBlockNumber() (int64, error)
LatestBlockNumber gets the latest block height in int64 format.
func (*DogsChainBackend) PendingTransactions ¶
func (b *DogsChainBackend) PendingTransactions() ([]*rpctypes.Transaction, 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.