Logs

Logs (or event logs), is a way for smart contracts to communicate with the outside world by "documenting" small pieces of information. Event logs allow other people to know that something has happened without them having to query the contract directly.

The most common form of event logs today are ERC20 (and ERC721) token transfer events.

Table Columns

The example used is a USDT Transfer Event to OKX.

Column Name
Description
Example

log_index

The position of this log in the block that it belongs to. The first log has index 0.

224

transaction_hash

Unique identifier of the transaction that this log belongs to.

0xc2a819147587c9ec17ebdfc7acf75c60c095d07450482f2578f35cf449990ee0

transaction_index

The position of this transaction in the block that it belongs to. The first transaction has index 0.

50

address

The address of the contract that emitted this log.

0xc2132d05d31c914a87c6611c10748aeb04b58e8f

data

Unindexed data containing further information of the event, encoded in hex.

0x000000000000000000000000000000000000000000000000000000003507b4e3

topic0

The keccak256 hash of a flattened event signature string.

0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef

topic1

First indexed topic of the event.

0x00000000000000000000000031f5a722d90f9337478bbe91c5c0618c20586c6d

topic2

Second indexed topic of the event

0x00000000000000000000000006959153b974d0d5fdfd87d561db6d8d4fa0bb0b

topic3

Third indexed topic of the event.

block_timestamp

The time when the block that contains this log was included on the blockchain.

2023-06-24 05:50:04

block_number

The length of the chain, in blocks.

44,271,890

block_hash

Unique identifier of the block that includes this log.

0xb61b3d40d37be1ef85348fce8d31414e4b7902a3e64df5f9c8152962024cff2f

Last updated