backend

package
v12.3.0-cosmos47 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2024 License: LGPL-3.0 Imports: 50 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllTxLogsFromEvents

func AllTxLogsFromEvents(events []abci.Event) ([][]*ethtypes.Log, error)

AllTxLogsFromEvents parses all ethereum logs from cosmos events

func GetHexProofs

func GetHexProofs(proof *crypto.ProofOps) []string

GetHexProofs returns list of hex data of proof op

func GetLogsFromBlockResults

func GetLogsFromBlockResults(blockRes *tmrpctypes.ResultBlockResults) ([][]*ethtypes.Log, error)

GetLogsFromBlockResults returns the list of event logs from the tendermint block result response

Types

type Backend

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

Backend implements the BackendI interface

func NewBackend

func NewBackend(
	ctx *server.Context,
	logger log.Logger,
	clientCtx client.Context,
	indexer evertypes.EVMTxIndexer,
) *Backend

NewBackend creates a new Backend instance for cosmos and ethereum namespaces

func (*Backend) Accounts

func (b *Backend) Accounts() ([]common.Address, error)

Accounts returns the list of accounts available to this node.

func (*Backend) AllowInsecureUnlock

func (b *Backend) AllowInsecureUnlock(allow bool)

AllowInsecureUnlock should be used for testing purpose only.

func (*Backend) AllowUnprotectedTxs

func (b *Backend) AllowUnprotectedTxs(allow bool)

AllowUnprotectedTxs should be used for testing purpose only.

func (*Backend) BaseFee

func (b *Backend) BaseFee(blockRes *tmrpctypes.ResultBlockResults) (*big.Int, error)

BaseFee returns the base fee tracked by the Fee Market module. If the base fee is not enabled globally, the query returns nil. If the London hard fork is not activated at the current height, the query will return nil.

func (*Backend) BlockBloom

func (b *Backend) BlockBloom(blockRes *tmrpctypes.ResultBlockResults) ethtypes.Bloom

BlockBloom query block bloom filter from block results

func (*Backend) BlockNumber

func (b *Backend) BlockNumber() (hexutil.Uint64, error)

BlockNumber returns the current block number, based on indexed block state of the EVMTxIndexer.

func (*Backend) BlockNumberFromTendermint

func (b *Backend) BlockNumberFromTendermint(blockNrOrHash rpctypes.BlockNumberOrHash) (rpctypes.BlockNumber, error)

BlockNumberFromTendermint returns the BlockNumber from BlockNumberOrHash

func (*Backend) BlockNumberFromTendermintByHash

func (b *Backend) BlockNumberFromTendermintByHash(blockHash common.Hash) (*big.Int, error)

BlockNumberFromTendermintByHash returns the block height of given block hash

func (*Backend) BloomStatus

func (b *Backend) BloomStatus() (uint64, uint64)

BloomStatus returns the BloomBitsBlocks and the number of processed sections maintained by the chain indexer.

func (*Backend) ChainConfig

func (b *Backend) ChainConfig() *ethparams.ChainConfig

ChainConfig returns the latest ethereum chain configuration

func (*Backend) ChainID

func (b *Backend) ChainID() (*hexutil.Big, error)

ChainID is the EIP-155 replay-protection chain id for the current ethereum chain config.

func (*Backend) CurrentHeader

func (b *Backend) CurrentHeader() *ethtypes.Header

CurrentHeader returns the latest block header

func (*Backend) DoCall

DoCall performs a simulated call operation through the evmtypes. It returns the estimated gas used on the operation or an error if fails.

func (*Backend) EstimateGas

func (b *Backend) EstimateGas(args evmtypes.TransactionArgs, blockNrOptional *rpctypes.BlockNumber) (hexutil.Uint64, error)

EstimateGas returns an estimate of gas usage for the given smart contract call.

func (*Backend) EthBlockByNumber

func (b *Backend) EthBlockByNumber(blockNum rpctypes.BlockNumber) (*ethtypes.Block, error)

EthBlockByNumber returns the Ethereum Block identified by number.

func (*Backend) EthBlockFromTendermintBlock

func (b *Backend) EthBlockFromTendermintBlock(
	resBlock *tmrpctypes.ResultBlock,
	blockRes *tmrpctypes.ResultBlockResults,
) (*ethtypes.Block, error)

EthBlockFromTendermintBlock returns an Ethereum Block type from Tendermint block EthBlockFromTendermintBlock

func (*Backend) EthMsgsFromTendermintBlock

func (b *Backend) EthMsgsFromTendermintBlock(
	resBlock *tmrpctypes.ResultBlock,
	blockRes *tmrpctypes.ResultBlockResults,
) []*evmtypes.MsgEthereumTx

EthMsgsFromTendermintBlock returns all real MsgEthereumTxs from a Tendermint block. It also ensures consistency over the correct txs indexes across RPC endpoints

func (*Backend) FeeHistory

func (b *Backend) FeeHistory(
	userBlockCount rpc.DecimalOrHex,
	lastBlock rpc.BlockNumber,
	rewardPercentiles []float64,
) (*rpctypes.FeeHistoryResult, error)

FeeHistory returns data relevant for fee estimation based on the specified range of blocks.

func (*Backend) GasPrice

func (b *Backend) GasPrice() (*hexutil.Big, error)

GasPrice returns the current gas price based on Ethermint's gas price oracle.

func (*Backend) GetBalance

func (b *Backend) GetBalance(address common.Address, blockNrOrHash rpctypes.BlockNumberOrHash) (*hexutil.Big, error)

GetBalance returns the provided account's balance up to the provided block number.

func (*Backend) GetBlockByHash

func (b *Backend) GetBlockByHash(hash common.Hash, fullTx bool) (map[string]interface{}, error)

GetBlockByHash returns the JSON-RPC compatible Ethereum block identified by hash.

func (*Backend) GetBlockByNumber

func (b *Backend) GetBlockByNumber(blockNum rpctypes.BlockNumber, fullTx bool) (map[string]interface{}, error)

GetBlockByNumber returns the JSON-RPC compatible Ethereum block identified by block number. Depending on fullTx it either returns the full transaction objects or if false only the hashes of the transactions.

func (*Backend) GetBlockTransactionCount

func (b *Backend) GetBlockTransactionCount(block *tmrpctypes.ResultBlock) *hexutil.Uint

GetBlockTransactionCount returns the number of Ethereum transactions in a given block.

func (*Backend) GetBlockTransactionCountByHash

func (b *Backend) GetBlockTransactionCountByHash(hash common.Hash) *hexutil.Uint

GetBlockTransactionCountByHash returns the number of Ethereum transactions in the block identified by hash.

func (*Backend) GetBlockTransactionCountByNumber

func (b *Backend) GetBlockTransactionCountByNumber(blockNum rpctypes.BlockNumber) *hexutil.Uint

GetBlockTransactionCountByNumber returns the number of Ethereum transactions in the block identified by number.

func (*Backend) GetCode

func (b *Backend) GetCode(address common.Address, blockNrOrHash rpctypes.BlockNumberOrHash) (hexutil.Bytes, error)

GetCode returns the contract code at the given address and block number.

func (*Backend) GetCoinbase

func (b *Backend) GetCoinbase() (sdk.AccAddress, error)

GetCoinbase is the address that staking rewards will be send to (alias for Etherbase).

func (*Backend) GetLogs

func (b *Backend) GetLogs(hash common.Hash) ([][]*ethtypes.Log, error)

GetLogs returns all the logs from all the ethereum transactions in a block.

func (*Backend) GetLogsByHeight

func (b *Backend) GetLogsByHeight(height *int64) ([][]*ethtypes.Log, error)

GetLogsByHeight returns all the logs from all the ethereum transactions in a block.

func (*Backend) GetProof

func (b *Backend) GetProof(address common.Address, storageKeys []string, blockNrOrHash rpctypes.BlockNumberOrHash) (*rpctypes.AccountResult, error)

GetProof returns an account object with proof and any storage proofs

func (*Backend) GetStorageAt

func (b *Backend) GetStorageAt(address common.Address, key string, blockNrOrHash rpctypes.BlockNumberOrHash) (hexutil.Bytes, error)

GetStorageAt returns the contract storage at the given address, block number, and key.

func (*Backend) GetTransactionByBlockAndIndex

func (b *Backend) GetTransactionByBlockAndIndex(block *tmrpctypes.ResultBlock, idx hexutil.Uint) (*rpctypes.RPCTransaction, error)

GetTransactionByBlockAndIndex is the common code shared by `GetTransactionByBlockNumberAndIndex` and `GetTransactionByBlockHashAndIndex`.

func (*Backend) GetTransactionByBlockHashAndIndex

func (b *Backend) GetTransactionByBlockHashAndIndex(hash common.Hash, idx hexutil.Uint) (*rpctypes.RPCTransaction, error)

GetTransactionByBlockHashAndIndex returns the transaction identified by hash and index.

func (*Backend) GetTransactionByBlockNumberAndIndex

func (b *Backend) GetTransactionByBlockNumberAndIndex(blockNum rpctypes.BlockNumber, idx hexutil.Uint) (*rpctypes.RPCTransaction, error)

GetTransactionByBlockNumberAndIndex returns the transaction identified by number and index.

func (*Backend) GetTransactionByHash

func (b *Backend) GetTransactionByHash(txHash common.Hash) (*rpctypes.RPCTransaction, error)

GetTransactionByHash returns the Ethereum format transaction identified by Ethereum transaction hash

func (*Backend) GetTransactionCount

func (b *Backend) GetTransactionCount(address common.Address, blockNum rpctypes.BlockNumber) (*hexutil.Uint64, error)

GetTransactionCount returns the number of transactions at the given address up to the given block number.

func (*Backend) GetTransactionReceipt

func (b *Backend) GetTransactionReceipt(hash common.Hash) (*rpctypes.RPCReceipt, error)

GetTransactionReceipt returns the transaction receipt identified by hash.

func (*Backend) GetTxByEthHash

func (b *Backend) GetTxByEthHash(hash common.Hash) (*evertypes.TxResult, error)

GetTxByEthHash get the ETH-transaction by hash from the indexer

func (*Backend) GetTxByTxIndex

func (b *Backend) GetTxByTxIndex(height int64, index uint) (*evertypes.TxResult, error)

GetTxByTxIndex get the ETH-transaction by block height and index from the indexer

func (*Backend) GlobalMinGasPrice

func (b *Backend) GlobalMinGasPrice() (sdk.Dec, error)

GlobalMinGasPrice returns MinGasPrice param from FeeMarket

func (*Backend) HeaderByHash

func (b *Backend) HeaderByHash(blockHash common.Hash) (*ethtypes.Header, error)

HeaderByHash returns the block header identified by hash.

func (*Backend) HeaderByNumber

func (b *Backend) HeaderByNumber(blockNum rpctypes.BlockNumber) (*ethtypes.Header, error)

HeaderByNumber returns the block header identified by height.

func (*Backend) ImportRawKey

func (b *Backend) ImportRawKey(privkey, password string) (common.Address, error)

ImportRawKey armors and encrypts a given raw hex encoded ECDSA key and stores it into the key directory. The name of the key will have the format "personal_<length-keys>", where <length-keys> is the total number of keys stored on the keyring.

NOTE: The key will be both armored and encrypted using the same passphrase.

func (*Backend) ListAccounts

func (b *Backend) ListAccounts() ([]common.Address, error)

ListAccounts will return a list of addresses for accounts this node manages.

func (*Backend) NewMnemonic

func (b *Backend) NewMnemonic(uid string,
	_ keyring.Language,
	hdPath,
	bip39Passphrase string,
	algo keyring.SignatureAlgo,
) (*keyring.Record, error)

NewAccount will create a new account and returns the address for the new account.

func (*Backend) PendingTransactions

func (b *Backend) PendingTransactions() ([]*sdk.Tx, 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.

func (*Backend) RPCBlockFromTendermintBlock

func (b *Backend) RPCBlockFromTendermintBlock(
	resBlock *tmrpctypes.ResultBlock,
	blockRes *tmrpctypes.ResultBlockResults,
	fullTx bool,
) (map[string]interface{}, error)

RPCBlockFromTendermintBlock returns a JSON-RPC compatible Ethereum block from a given Tendermint block and its block result.

func (*Backend) RPCBlockRangeCap

func (b *Backend) RPCBlockRangeCap() int32

RPCBlockRangeCap defines the max block range allowed for `eth_getLogs` query.

func (*Backend) RPCEVMTimeout

func (b *Backend) RPCEVMTimeout() time.Duration

RPCEVMTimeout is the global evm timeout for eth-call variants.

func (*Backend) RPCFeeHistoryCap

func (b *Backend) RPCFeeHistoryCap() int32

RPCFeeHistoryCap is the limit for total number of blocks that can be fetched

func (*Backend) RPCFilterCap

func (b *Backend) RPCFilterCap() int32

RPCFilterCap is the limit for total number of filters that can be created

func (*Backend) RPCGasCap

func (b *Backend) RPCGasCap() uint64

RPCGasCap is the global gas cap for eth-call variants.

func (*Backend) RPCLogsCap

func (b *Backend) RPCLogsCap() int32

RPCLogsCap defines the max number of results can be returned from single `eth_getLogs` query.

func (*Backend) RPCMinGasPrice

func (b *Backend) RPCMinGasPrice() int64

func (*Backend) RPCTxFeeCap

func (b *Backend) RPCTxFeeCap() float64

RPCGasCap is the global gas cap for eth-call variants.

func (*Backend) Resend

func (b *Backend) Resend(args evmtypes.TransactionArgs, gasPrice *hexutil.Big, gasLimit *hexutil.Uint64) (common.Hash, error)

Resend accepts an existing transaction and a new gas price and limit. It will remove the given transaction from the pool and reinsert it with the new gas price and limit.

func (*Backend) SendRawTransaction

func (b *Backend) SendRawTransaction(data hexutil.Bytes) (common.Hash, error)

SendRawTransaction send a raw Ethereum transaction.

func (*Backend) SendTransaction

func (b *Backend) SendTransaction(args evmtypes.TransactionArgs) (common.Hash, error)

SendTransaction sends transaction based on received args using Node's key to sign it

func (*Backend) SetEtherbase

func (b *Backend) SetEtherbase(etherbase common.Address) bool

SetEtherbase sets the etherbase of the miner

func (*Backend) SetGasPrice

func (b *Backend) SetGasPrice(gasPrice hexutil.Big) bool

SetGasPrice sets the minimum accepted gas price for the miner. NOTE: this function accepts only integers to have the same interface than go-eth to use float values, the gas prices must be configured using the configuration file

func (*Backend) SetTxDefaults

func (b *Backend) SetTxDefaults(args evmtypes.TransactionArgs) (evmtypes.TransactionArgs, error)

SetTxDefaults populates tx message with default values in case they are not provided on the args

func (*Backend) Sign

func (b *Backend) Sign(address common.Address, data hexutil.Bytes) (hexutil.Bytes, error)

Sign signs the provided data using the private key of address via Geth's signature standard.

func (*Backend) SignTypedData

func (b *Backend) SignTypedData(address common.Address, typedData apitypes.TypedData) (hexutil.Bytes, error)

SignTypedData signs EIP-712 conformant typed data

func (*Backend) SuggestGasTipCap

func (b *Backend) SuggestGasTipCap(baseFee *big.Int) (*big.Int, error)

SuggestGasTipCap returns the suggested tip cap Although we don't support tx prioritization yet, but we return a positive value to help client to mitigate the base fee changes.

func (*Backend) Syncing

func (b *Backend) Syncing() (interface{}, error)

Syncing returns false in case the node is currently not syncing with the network. It can be up to date or has not yet received the latest block headers from its pears. In case it is synchronizing: - startingBlock: block number this node started to synchronize from - currentBlock: block number this node is currently importing - highestBlock: block number of the highest block header this node has received from peers - pulledStates: number of state entries processed until now - knownStates: number of known state entries that still need to be pulled

func (*Backend) TendermintBlockByHash

func (b *Backend) TendermintBlockByHash(blockHash common.Hash) (*tmrpctypes.ResultBlock, error)

TendermintBlockByHash returns a Tendermint-formatted block by block number

func (*Backend) TendermintBlockByNumber

func (b *Backend) TendermintBlockByNumber(blockNum rpctypes.BlockNumber) (*tmrpctypes.ResultBlock, error)

TendermintBlockByNumber returns a Tendermint-formatted block for a given block number

func (*Backend) TendermintBlockResultByNumber

func (b *Backend) TendermintBlockResultByNumber(height *int64) (*tmrpctypes.ResultBlockResults, error)

TendermintBlockResultByNumber returns a Tendermint-formatted block result by block number

func (*Backend) TraceBlock

func (b *Backend) TraceBlock(height rpctypes.BlockNumber,
	config *evmtypes.TraceConfig,
	block *tmrpctypes.ResultBlock,
) ([]*evmtypes.TxTraceResult, error)

TraceBlock configures a new tracer according to the provided configuration, and executes all the transactions contained within. The return value will be one item per transaction, dependent on the requested tracer.

func (*Backend) TraceTransaction

func (b *Backend) TraceTransaction(hash common.Hash, config *evmtypes.TraceConfig) (interface{}, error)

TraceTransaction returns the structured logs created during the execution of EVM and returns them as a JSON object.

type BackendI

type BackendI interface {
	CosmosBackend
	EVMBackend
}

BackendI implements the Cosmos and EVM backend.

type CosmosBackend

type CosmosBackend interface {
}

CosmosBackend implements the functionality shared within cosmos namespaces as defined by Wallet Connect V2: https://docs.walletconnect.com/2.0/json-rpc/cosmos. Implemented by Backend.

type EVMBackend

type EVMBackend interface {
	// Node specific queries
	Accounts() ([]common.Address, error)
	Syncing() (interface{}, error)
	SetEtherbase(etherbase common.Address) bool
	SetGasPrice(gasPrice hexutil.Big) bool
	ImportRawKey(privkey, password string) (common.Address, error)
	ListAccounts() ([]common.Address, error)
	NewMnemonic(uid string, language keyring.Language, hdPath, bip39Passphrase string, algo keyring.SignatureAlgo) (*keyring.Record, error)
	AllowUnprotectedTxs(allow bool)
	AllowInsecureUnlock(allow bool)
	RPCGasCap() uint64            // global gas cap for eth_call over rpc: DoS protection
	RPCEVMTimeout() time.Duration // global timeout for eth_call over rpc: DoS protection
	RPCTxFeeCap() float64         // RPCTxFeeCap is the global transaction fee(price * gaslimit) cap for send-transaction variants. The unit is ether.
	RPCMinGasPrice() int64

	// Sign Tx
	Sign(address common.Address, data hexutil.Bytes) (hexutil.Bytes, error)
	SendTransaction(args evmtypes.TransactionArgs) (common.Hash, error)
	SignTypedData(address common.Address, typedData apitypes.TypedData) (hexutil.Bytes, error)

	// Blocks Info
	BlockNumber() (hexutil.Uint64, error)
	GetBlockByNumber(blockNum rpctypes.BlockNumber, fullTx bool) (map[string]interface{}, error)
	GetBlockByHash(hash common.Hash, fullTx bool) (map[string]interface{}, error)
	GetBlockTransactionCountByHash(hash common.Hash) *hexutil.Uint
	GetBlockTransactionCountByNumber(blockNum rpctypes.BlockNumber) *hexutil.Uint
	TendermintBlockByNumber(blockNum rpctypes.BlockNumber) (*tmrpctypes.ResultBlock, error)
	TendermintBlockResultByNumber(height *int64) (*tmrpctypes.ResultBlockResults, error)
	TendermintBlockByHash(blockHash common.Hash) (*tmrpctypes.ResultBlock, error)
	BlockNumberFromTendermint(blockNrOrHash rpctypes.BlockNumberOrHash) (rpctypes.BlockNumber, error)
	BlockNumberFromTendermintByHash(blockHash common.Hash) (*big.Int, error)
	EthMsgsFromTendermintBlock(block *tmrpctypes.ResultBlock, blockRes *tmrpctypes.ResultBlockResults) []*evmtypes.MsgEthereumTx
	BlockBloom(blockRes *tmrpctypes.ResultBlockResults) ethtypes.Bloom
	HeaderByNumber(blockNum rpctypes.BlockNumber) (*ethtypes.Header, error)
	HeaderByHash(blockHash common.Hash) (*ethtypes.Header, error)
	RPCBlockFromTendermintBlock(resBlock *tmrpctypes.ResultBlock, blockRes *tmrpctypes.ResultBlockResults, fullTx bool) (map[string]interface{}, error)
	EthBlockByNumber(blockNum rpctypes.BlockNumber) (*ethtypes.Block, error)
	EthBlockFromTendermintBlock(resBlock *tmrpctypes.ResultBlock, blockRes *tmrpctypes.ResultBlockResults) (*ethtypes.Block, error)

	// Account Info
	GetCode(address common.Address, blockNrOrHash rpctypes.BlockNumberOrHash) (hexutil.Bytes, error)
	GetBalance(address common.Address, blockNrOrHash rpctypes.BlockNumberOrHash) (*hexutil.Big, error)
	GetStorageAt(address common.Address, key string, blockNrOrHash rpctypes.BlockNumberOrHash) (hexutil.Bytes, error)
	GetProof(address common.Address, storageKeys []string, blockNrOrHash rpctypes.BlockNumberOrHash) (*rpctypes.AccountResult, error)
	GetTransactionCount(address common.Address, blockNum rpctypes.BlockNumber) (*hexutil.Uint64, error)

	// Chain Info
	ChainID() (*hexutil.Big, error)
	ChainConfig() *ethparams.ChainConfig
	GlobalMinGasPrice() (sdk.Dec, error)
	BaseFee(blockRes *tmrpctypes.ResultBlockResults) (*big.Int, error)
	CurrentHeader() *ethtypes.Header
	PendingTransactions() ([]*sdk.Tx, error)
	GetCoinbase() (sdk.AccAddress, error)
	FeeHistory(blockCount rpc.DecimalOrHex, lastBlock rpc.BlockNumber, rewardPercentiles []float64) (*rpctypes.FeeHistoryResult, error)
	SuggestGasTipCap(baseFee *big.Int) (*big.Int, error)

	// Tx Info
	GetTransactionByHash(txHash common.Hash) (*rpctypes.RPCTransaction, error)
	GetTxByEthHash(txHash common.Hash) (*evertypes.TxResult, error)
	GetTxByTxIndex(height int64, txIndex uint) (*evertypes.TxResult, error)
	GetTransactionByBlockAndIndex(block *tmrpctypes.ResultBlock, idx hexutil.Uint) (*rpctypes.RPCTransaction, error)
	GetTransactionReceipt(hash common.Hash) (*rpctypes.RPCReceipt, error)
	GetTransactionByBlockHashAndIndex(hash common.Hash, idx hexutil.Uint) (*rpctypes.RPCTransaction, error)
	GetTransactionByBlockNumberAndIndex(blockNum rpctypes.BlockNumber, idx hexutil.Uint) (*rpctypes.RPCTransaction, error)

	// Send Transaction
	Resend(args evmtypes.TransactionArgs, gasPrice *hexutil.Big, gasLimit *hexutil.Uint64) (common.Hash, error)
	SendRawTransaction(data hexutil.Bytes) (common.Hash, error)
	SetTxDefaults(args evmtypes.TransactionArgs) (evmtypes.TransactionArgs, error)
	EstimateGas(args evmtypes.TransactionArgs, blockNrOptional *rpctypes.BlockNumber) (hexutil.Uint64, error)
	DoCall(args evmtypes.TransactionArgs, blockNr rpctypes.BlockNumber) (*evmtypes.MsgEthereumTxResponse, error)
	GasPrice() (*hexutil.Big, error)

	// Filter API
	GetLogs(hash common.Hash) ([][]*ethtypes.Log, error)
	GetLogsByHeight(height *int64) ([][]*ethtypes.Log, error)
	BloomStatus() (uint64, uint64)

	// Tracing
	TraceTransaction(hash common.Hash, config *evmtypes.TraceConfig) (interface{}, error)
	TraceBlock(height rpctypes.BlockNumber, config *evmtypes.TraceConfig, block *tmrpctypes.ResultBlock) ([]*evmtypes.TxTraceResult, error)
}

EVMBackend implements the functionality shared within ethereum namespaces as defined by EIP-1474: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1474.md Implemented by Backend.

type InCompletedEthReceipt

type InCompletedEthReceipt struct {
	*ethtypes.Receipt
	EffectiveGasPrice *big.Int
}

InCompletedEthReceipt holds an in-completed Ethereum receipt, missing: - Block hash in receipt. - Block hash in each log element.

func ParseTxReceiptFromEvent

func ParseTxReceiptFromEvent(event abci.Event) (*InCompletedEthReceipt, error)

ParseTxReceiptFromEvent parse tx receipt from one event. The output receipt will be: - Missing block hash in receipt. - Missing block hash in each log element.

func TxReceiptFromEvent

func TxReceiptFromEvent(events []abci.Event) (*InCompletedEthReceipt, error)

TxReceiptFromEvent parses ethereum receipt from cosmos events

func (*InCompletedEthReceipt) Fill

func (r *InCompletedEthReceipt) Fill(blockHash common.Hash)

Fill the missing fields for the receipt

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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