Skip to main content

Table description

The starknet.events table captures the events that are emitted by smart contracts on the Starknet blockchain. Events are used to log significant actions and changes in smart contracts, such as token transfers or updates to contract states. Each event is linked to the transaction that triggered it, providing a detailed audit trail of contract interactions.

Table Schema

ColumnTypeDescription
block_dateDATEThe date of the block containing this event (UTC)
block_timeTIMESTAMPThe timestamp of the block containing this event
block_numberBIGINTThe sequential number of the block containing this event
block_l1_da_modeVARCHARLayer 1 data availability mode (BLOB or CALLDATA)
block_l1_data_gas_price_in_friUINT256L1 data gas price in fri (STRK) for the block
block_l1_data_gas_price_in_weiUINT256L1 data gas price in wei (ETH) for the block
block_l1_gas_price_in_friUINT256L1 gas price in fri (STRK) for the block
block_l1_gas_price_in_weiUINT256L1 gas price in wei (ETH) for the block
block_l2_gas_price_in_friUINT256L2 gas price in fri (STRK) for the block
block_l2_gas_price_in_weiUINT256L2 gas price in wei (ETH) for the block
block_starknet_versionVARCHARThe Starknet protocol version of the block
event_indexINTEGERSequential index of this event within the transaction
block_hashVARBINARYHash of the block containing this event
block_new_rootVARBINARYNew global state root after the block
block_parent_hashVARBINARYHash of the preceding block
block_sequencer_addressVARBINARYAddress of the sequencer that produced the block
transaction_hashVARBINARYHash of the transaction that emitted this event
dataARRAY(VARBINARY)The data payload associated with this event
keysARRAY(VARBINARY)The indexed keys associated with this event
from_addressVARBINARYAddress of the L2 contract that emitted this event
class_hashVARBINARYClass hash of the contract that emitted this event
  • Prior to v3 transactions upgrade, fees are denominated in wei as users pay gas with ETH. For transactions v3 and later, fees are denominated in fri as users pay gas with STRK. Hence here you can see two gas types of gas fields, one for wei and one for fri.
  • Starting with Starknet v0.13.1, Starknet distinguishes between blocks whose state diffs are sent to L1 as calldata and blocks whose state diffs are sent to L1 as blobs. The l1_da_mode property in the Starknet block header contains this information. Values possible are BLOB or CALLDATA.
  • The block_status has possible values ACCEPTED_ON_L1 or ACCEPTED_ON_L2. Read here to learn more about different transaction status.
  • from_address: The address of the L2 contract sending the message
  • keys: The keys associated with the event
  • data: The data associated with the event
  • Visit this Starknet doc on events to learn more.

Table Sample