laconicd/x/evm/spec/07_events.md
yihuang 514785bd89
rpc: optimize tx index lookup (#810)
Closes: #760

Solution:
- emit tx index to cosmos events
- rpc side try to use the events, but fallback to heavier approach when fails.

Update rpc/ethereum/namespaces/eth/api.go

changelog

fix lint

fix TxIndexFromEvents

fix

Update rpc/ethereum/backend/backend.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2021-12-16 22:30:22 +00:00

1.2 KiB

Events

The x/evm module emits the Cosmos SDK events after a state execution. The EVM module emits events of the relevant transaction fields, as well as the transaction logs (ethereum events).

MsgEthereumTx

Type Attribute Key Attribute Value
ethereum_tx "amount" {amount}
ethereum_tx "recipient" {hex_address}
ethereum_tx "contract" {hex_address}
ethereum_tx "txHash" {tendermint_hex_hash}
ethereum_tx "ethereumTxHash" {hex_hash}
ethereum_tx "txIndex" {tx_index}
tx_log "txLog" {tx_log}
message "sender" {eth_address}
message "action" "ethereum"
message "module" "evm"

Additionally, the EVM module emits an event during EndBlock for the filter query block bloom.

ABCI

Type Attribute Key Attribute Value
block_bloom "bloom" string(bloomBytes)