Skip to main content

Table Description

The mezo.logs table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. Topic0 is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see call tables section. If this is a Hosted chain, decoded call tables will not be available.

Column Descriptions

ColumnTypeDescription
block_timetimestampTimestamp of the block containing this log
block_numberbigintBlock number containing this log
block_hashvarbinaryHash of the block containing this log
contract_addressvarbinaryAddress of the contract that emitted the log
topic0varbinaryEvent signature hash (first indexed topic)
topic1varbinaryFirst indexed event parameter
topic2varbinarySecond indexed event parameter
topic3varbinaryThird indexed event parameter
datavarbinaryNon-indexed event data
tx_hashvarbinaryHash of the transaction that generated this log
indexintegerPosition of the log within the block
tx_indexintegerPosition of the transaction within the block
block_datedateDate of the block (UTC)
tx_fromvarbinaryAddress that initiated the transaction
tx_tovarbinaryAddress the transaction was sent to
blob_gas_pricebigintBlob gas price of the transaction (EIP-4844)
blob_gas_usedbigintBlob gas used by the transaction (EIP-4844)

Table Sample

Examples

Filter the logs for a specific contract

SELECT *
FROM mezo.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10

Filter the logs for a specific topic

SELECT *
FROM mezo.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef

Show the logs of a specific block

SELECT *
FROM mezo.logs
WHERE evt_block_number = 1000000