Data Model

Current Version : MCDW v1.3

MCDW v1.4 data model available from 30-May-2024 (changes from v1.3 in blue)

To get access to the data see Accessing Token Flow data guides

Blocks

Column NameData TypeLayerDefinitionNullable

updated_at

timestamp

TECH

Technical field. Timestamp of the ETL process that has updated the row in the table. Equal to loaded_at on first insert.

N

chain_id

number

TECH

Technical field. Unique identifier of the chain (identifiers from Chainlist are used for all EVM compliant chains).

N

block_id

varchar

TECH

Technical field. Identifier of the block across chains and generation, constructed by concatenating chain_id, generation and block number.

N

block_number

number

RAW

Number of the block. Numbering is incremental, starting at 0 (Genesis) with new blocks added at the end of the chain.

N

block_hash

varchar

RAW

Hash of the block content (KECCAK-256). Unique for every block.

N

block_timestamp

timestamp

RAW

Timestamp of the block. Unique for every block and inherited by calls, events, transactions and diffs happening in the same block.

N

block_date

varchar

TECH

Technical field. Date of the block - precomputed to be used for analytics purposes, inherited by calls, events, transactions and diffs happening in the same block.

N

parent_hash

varchar

RAW

Hash of the previous block, used to ensure the consistency of the chain. Block 0 parent hash is hexadecimal 0.

N

protocol_version

varchar

RAW

Version of the chain that was live at the moment when the node was added to the chain. For details about Starknet version see the official release notes: https://docs.starknet.io/documentation/starknet_versions/version_notes/

Y

gas_price

number

RAW

Ether amount the transaction sender is willing to pay per unit of gas as a fee to the miner.

Y

tx_count

number

RAW

Count of transactions included in the block, successful or reverted. For empty blocks, tx_count = 0

N

state_root

varchar

RAW

The root hash of the Merkle Patricia tree that represents the state of the entire blockchain at a specific block. The state root is a cryptographic hash that acts as a summary or snapshot of the current state of all accounts, balances, and storage on the network.

N

sequencer_address

varchar

RAW

L2 address of the sequencer node responsible for processing and ordering transactions on the network.

Y

processed

boolean

TECH

Technical field. Defines processing status of a block by the decoding ETL process.

Y

l1_gas_price_l1_token

number

RAW

Ether amount the transaction sender is willing to pay per unit of gas as a fee to the miner (price_unit = wei)

Y

l1_gas_price_l2_token

number

RAW

Stark amount the transaction sender is willing to pay per unit of gas as a fee to the miner (price_unit = fri)

Y

l1_data_gas_price_l1_token

number

RAW

Ether amount the transaction sender is willing to pay per unit of gas as a fee to the miner, for data (price_unit = wei)

Y

l1_data_gas_price_l2_token

number

RAW

Stark amount the transaction sender is willing to pay per unit of gas as a fee to the miner, for data (price_unit = fri)

Y

l1_data_mode

varchar

RAW

L1 data availability - enumeration : blob, calldata

Y

parent_beacon_block_root

varchar

RAW

Roots of the beacon chain blocks are cryptographic accumulators that allow proofs of arbitrary consensus state.

Y

Transactions

Column NameData TypeLayerDefinitionNullable

updated_at

timestamp

TECH

Technical field. Timestamp of the ETL process that has updated the row in the table. Equal to loaded_at on first insert.

N

chain_id

number

TECH

Technical field. Unique identifier of the chain (identifiers from Chainlist are used for all EVM compliant chains).

N

block_id

varchar

TECH

Technical field. Identifier of the block across chains and generation, constructed by concatenating chain_id, generation and block number.

N

block_number

number

RAW

Number of the block. Numbering is incremental, starting at 0 (Genesis) with new blocks added at the end of the chain.

N

block_timestamp

timestamp

RAW

Timestamp of the block. Unique for every block and inherited by calls, events, transactions and diffs happening in the same block.

N

block_date

varchar

TECH

Technical field. Date of the block - precomputed to be used for analytics purposes, inherited by calls, events, transactions and diffs happening in the same block.

N

tx_id

varchar

TECH

Technical field. Identifier of the transaction, constructed by concatenating block id and transaction index, separated by underscores.

N

tx_hash

varchar

RAW

Hash of the transaction (KECCAK-256). Unique for every transaction.

N

tx_index

number

RAW

Index of the transactions within a block, starting at 0.

N

tx_type

number

RAW

Transaction type. Can take one of the following values: 0 - INVOKE_FUNCTION - invokes an existing function in a contract 1 - L1_HANDLER 2 - DEPLOY_ACCOUNT - deploys new account contract in smart wallets; 3 - DEPLOY 4 - DECLARE - declares new contract classes, enabling new contract instances;

N

to_address

varchar

RAW

Address of the transaction receiver (called address): * EOA or smart contract address for pure Ether transfer; * Smart contract address for function calls;

Y

function_signature

varchar

RAW

Binary signature of the called function. 0x in case of pure Ether transfers.

Y

class_hash

varchar

RAW

Hash of the contract class definition (KECCAK-256).

Y

tx_value

number

RAW

Ether amount transferred, in WEI. Value must be divided by 10^18 to obtain Ether amount. 0 if no Ether transfer happened.

N

max_fee_per_gas

number

RAW

Maximum fee the transaction sender is willing to pay for the gas (base fee + priority fee).

Y

actual_fee

number

TECH

Fee paid for the transaction execution.

Y

created_address

varchar

RAW

Address of created contract.

Y

reverted

boolean

RAW

Flags persistent (false) or reverted (true) calls. Reverted diffs can originate from technical failures (code errors), gas limits (more gas needed than was staked) or contract logic.

N

revert_reason

varchar

RAW

Error description for reverted transactions, as provided by the smart contract. Empty for successful transactions.

Y

l1_message_nonce

number

RAW

Nonce of the message sent from L1 to L2

Y

execution_resources

json

RAW

Resources consumed by the transaction execution.

Y

processed

boolean

TECH

Technical field. Defines processing status of a block by the decoding ETL process.

N

actual_fee_unit

varchar

RAW

Unit of the actual fee (wei or fri).

Y

tx_version

integer

RAW

Version of the transaction (see Starknet documentation)

Y

call_data

varchar

RAW

Call binary payload that is sent to the called contract - transaction call data for INVOKE and L1_HANDLER

Y

resource_bounds

json

RAW

Execution resources for INVOKE v1 and DECLARE v3 transactions

Y

chain_specific_data

json

RAW

Chain specific data - in the case of Straknet, the field contains the following information: transaction { paymaster_data, account_deployment_data, nonce_data_availability_mode, fee_data_availability_mode, compiled_class_hash, trace.statediffs { deprecated_declared_classes, declared_classes, deployed_contracts, replaced_classes, nonces

} }

Y

constructor_address_salt

varchar

RAW

Part of the call data that contains constructor arguments for DEPLOY_ACCOUNT v1 / v3 calls that deploy new contracts on chain. NULL for any other call type.

Y

constructor_call_data

varchar

RAW

Contract creation salt in the case of DEPLOY_ACCOUNT v3 and DEPLOY transactions. NULL for any other transaction type.

Y

Calls

Column NameData TypeLayerDefinitionNullable

updated_at

timestamp

TECH

Technical field. Timestamp of the ETL process that has updated the row in the table. Equal to loaded_at on first insert.

N

chain_id

number

TECH

Technical field. Unique identifier of the chain (identifiers from Chainlist are used for all EVM compliant chains).

N

block_id

varchar

TECH

Technical field. Identifier of the block across chains and generation, constructed by concatenating chain_id, generation and block number.

N

block_number

number

RAW

Number of the block. Numbering is incremental, starting at 0 (Genesis) with new blocks added at the end of the chain.

N

block_timestamp

timestamp

RAW

Timestamp of the block. Unique for every block and inherited by calls, events, transactions and diffs happening in the same block.

N

block_date

varchar

TECH

Technical field. Date of the block - precomputed to be used for analytics purposes, inherited by calls, events, transactions and diffs happening in the same block.

N

tx_id

varchar

TECH

Technical field. Identifier of the transaction, constructed by concatenating block id and transaction index, separated by underscores.

N

tx_hash

varchar

RAW

Hash of the transaction (KECCAK-256). Unique for every transaction.

N

call_id

varchar

TECH

Technical field. Identifier of the call, constructed by concatenating block id, transaction index and call path.

N

call_path

varchar

TECH

Position of the call in the transaction execution tree: * empty string for top level calls (call_depth = 0) * concatenation call_path of the parent call and number of the sub call, starting at 0 (call_path='0_2_1' means second subcall of third subcall of first subcall in a transaction)

N

call_depth

number

TECH

Depth of the call in the transaction execution tree, incremental, starting at 0 for top level calls (call_path='0_2_1' depth= 3 means three level down in the execution tree).

N

call_type

varchar

RAW

Possible call types.Possible call types. Can take one of the following values: * CALL * DECLARE * DELEGATE

N

from_address

varchar

RAW

Address of the call sender (calling address): * externally owned address for top level calls; * smart contract address for any other call.

N

to_address

varchar

RAW

Address of the call receiver (called address): * EOA or smart contract address for pure Ether transfer; * Smart contract address for function calls;

Y

class_hash

varchar

RAW

Hash of the contract class definition (KECCAK-256).

Y

function_signature

varchar

RAW

Binary signature of the called function. 0x in case of pure Ether transfers.

Y

function_name

varchar

DECODED

Name of the function, decoded by Token Flow processes (ABI or inferred from similar functions). Contains function_signature if decoding was unsuccessful.

Y

function_type

varchar

RAW

External call, constructor or L1 handler

Y

invocation_type

varchar

RAW

Validation, execution or fee transfer call.

Y

call_value

number

RAW

Ether amount transferred, in WEI. Division by 10^18 to obtain Ether amount. 0 if no Ether transfer happened.

N

arguments

json

DECODED

List of function arguments as key:value pairs as decoded by Token Flow processes (ABI or inferred from similar functions). Contains call_data if decoding was unsuccessful.

Y

raw_arguments

json

DECODED

Decoded function arguments in a form of array where each element is the dictionary of argument's name, raw_value and decoded_value. It preserves the arguments order so can be used to get for example the first argument regardless of its name. Arguments are decoded using the same strategy as for ARGUMENTS field.

Y

outputs

json

DECODED

List of function outputs as key:value pairs, as decoded by Token Flow processes (ABI or inferred from similar functions). Key is the output name and value is the decoded value. Contains a single output_data argument if decoding was unsuccessful.

Y

raw_outputs

json

DECODED

Function outputs in a form of array where each element is the dictionary of output's name, raw_value and decoded_value. It preserves the outputs order so can be used to get for example the n-th output regardless of its name.

Y

created_address

varchar

RAW

Created address in the case of 'CREATE' call. NULL for any other call type.

Y

execution_resources

json

RAW

Resouces consumed by the call execution.

Y

processed

boolean

TECH

Technical field. Defines processing status of a block by the decoding ETL process.

N

decoded

boolean

TECH

Technical field. Flags the success (true) or failure (false) of the decoding process. In the case of unsucessful decoding, function_signature = function_name

Y

Events

Column NameData TypeLayerDefinitionNullable

updated_at

timestamp

TECH

Technical field. Timestamp of the ETL process that has updated the row in the table. Equal to loaded_at on first insert.

N

chain_id

number

TECH

Technical field. Unique identifier of the chain (identifiers from Chainlist are used for all EVM compliant chains).

N

block_id

varchar

TECH

Technical field. Identifier of the block across chains and generation, constructed by concatenating chain_id, generation and block number.

N

block_number

number

RAW

Number of the block. Numbering is incremental, starting at 0 (Genesis) with new blocks added at the end of the chain.

N

block_timestamp

timestamp

RAW

Timestamp of the block. Unique for every block and inherited by calls, events, transactions and diffs happening in the same block.

N

block_date

varchar

TECH

Technical field. Date of the block - precomputed to be used for analytics purposes, inherited by calls, events, transactions and diffs happening in the same block.

N

tx_id

varchar

TECH

Technical field. Identifier of the transaction, constructed by concatenating block id and transaction index, separated by underscores.

N

tx_hash

varchar

RAW

Hash of the transaction (KECCAK-256). Unique for every transaction.

N

call_id

varchar

TECH

Technical field. Identifier of the call, constructed by concatenating block id, transaction index and call path.

N

event_id

varchar

TECH

Technical field. Identifier of the event, constructed by concatenating block_id and order_index, separated by underscores.

N

log_index

number

RAW

Index of the successful event within a block, stating at 0. Reverted events are not stored on-chain and do not have log_index (NULL)

Y

contract_address

varchar

RAW

Smart contract address that emitted the event. For DELEGATE calls, events are emitted by calling contracts and the ABI is defined by the called contract.

N

class_hash

varchar

RAW

Hash of the emmiting contract class (KECCAK-256).

Y

implementation

varchar

RAW

Smart contract address that provides the event semantics (ABI) - called contract for DELEGATE calls or calling contract for the rest of the call types.

N

event_signature

varchar

RAW

Raw hexadecimal indexed content of the event (topic 0).

N

event_name

varchar

DECODED

Name of the event, as decoded by Token Flow processes (ABI or inferred from similar functions). Contains event_signature if not found.

Y

raw_parameters

json

DECODED

List of event parameters, where for each element there are the following elements: name, raw, type, value. Parameters order is preserved. Parameters are decoded using the same strategy as for PARAMETERS field.

Y

parameters

json

DECODED

List of event parameters as key:value pairs, as decoded by Token Flow processes (ABI or inferred from similar functions). Key is the output name and value is the decoded value. Contains 'topic_parameter_1-3' and 'data_parameter_0-n' argument if decoding was unsuccessful.

Y

processed

boolean

TECH

Technical field. Defines processing status of a block by the decoding ETL process.

N

decoded

boolean

TECH

Technical field. Flags the success (true) or failure (false) of the decoding process. In the case of unsucessful decoding, event_signature = event_name

Y

Receipt_events

Column NameData TypeLayerDefinitionNullable

updated_at

timestamp

TECH

Technical field. Timestamp of the ETL process that has updated the row in the table. Equal to loaded_at on first insert.

N

chain_id

number

TECH

Technical field. Unique identifier of the chain (identifiers from Chainlist are used for all EVM compliant chains).

N

block_id

varchar

TECH

Technical field. Identifier of the block across chains and generation, constructed by concatenating chain_id, generation and block number.

N

block_number

number

RAW

Number of the block. Numbering is incremental, starting at 0 (Genesis) with new blocks added at the end of the chain.

N

block_timestamp

timestamp

RAW

Timestamp of the block. Unique for every block and inherited by calls, events, transactions and diffs happening in the same block.

N

block_date

varchar

TECH

Technical field. Date of the block - precomputed to be used for analytics purposes, inherited by calls, events, transactions and diffs happening in the same block.

N

tx_id

varchar

TECH

Technical field. Identifier of the transaction, constructed by concatenating block id and transaction index, separated by underscores.

N

tx_hash

varchar

RAW

Hash of the transaction (KECCAK-256). Unique for every transaction.

N

event_id

varchar

TECH

Technical field. Identifier of the event, constructed by concatenating block_id and order_index, separated by underscores.

N

log_index

number

RAW

Index of the successful event within a block, stating at 0.

Y

contract_address

varchar

RAW

Smart contract address that emitted the event. For DELEGATE calls, events are emitted by calling contracts and the ABI is defined by the called contract.

N

class_hash

varchar

RAW

Hash of the emmiting contract class (KECCAK-256).

Y

event_signature

varchar

RAW

Raw hexadecimal indexed content of the event (topic 0).

N

event_name

varchar

DECODED

Name of the event, as decoded by Token Flow processes (ABI or inferred from similar functions). Contains event_signature if not found.

Y

raw_parameters

json

DECODED

List of event parameters, where for each element there are the following elements: name, raw, type, value. Parameters order is preserved. Parameters are decoded using the same strategy as for PARAMETERS field.

Y

parameters

json

DECODED

List of event parameters as key:value pairs, as decoded by Token Flow processes (ABI or inferred from similar functions). Key is the output name and value is the decoded value. Contains 'topic_parameter_1-3' and 'data_parameter_0-n' argument if decoding was unsuccessful.

Y

decoded

boolean

TECH

Technical field. Flags the success (true) or failure (false) of the decoding process. In the case of unsucessful decoding, event_signature = event_name

Y

Messages

Column NameData TypeLayerDefinitionNullable

updated_at

timestamp

TECH

Technical field. Timestamp of the ETL process that has updated the row in the table. Equal to loaded_at on first insert.

N

chain_id

number

TECH

Technical field. Unique identifier of the chain (identifiers from Chainlist are used for all EVM compliant chains).

N

block_id

varchar

TECH

Technical field. Identifier of the block across chains and generation, constructed by concatenating chain_id, generation and block number.

N

block_number

number

RAW

Number of the block. Numbering is incremental, starting at 0 (Genesis) with new blocks added at the end of the chain.

N

block_timestamp

timestamp

RAW

Timestamp of the block. Unique for every block and inherited by calls, events, transactions and diffs happening in the same block.

N

block_date

varchar

RAW

Timestamp of the block. Unique for every block and inherited by calls, events, transactions and diffs happening in the same block.

N

tx_id

varchar

TECH

Technical field. Identifier of the transaction, constructed by concatenating block id and transaction index, separated by underscores.

N

tx_hash

varchar

RAW

Hash of the L2 transaction (KECCAK-256).

N

call_id

varchar

TECH

Identifier of the internal call to the L2 transaction.

N

message_id

varchar

TECH

Unique identifier of the message.

N

message_order

number

RAW

Sequence of messages that happened within a block.

N

message_source

varchar

TECH

Source of the message: it can be L1 or L2

N

message_nonce

number

RAW

Nonce of the message from L1 to L2

Y

l1_address

varchar

RAW

L1 address

N

l2_address

varchar

RAW

L2 address

N

class_hash

varchar

RAW

Hash of the contract class definition (KECCAK-256).

Y

raw_payload

json

RAW

Raw payload of the transaction

N

processed

boolean

TECH

Technical field. Defines processing status of a block by the decoding ETL process.

N

decoded

boolean

TECH

Technical field. Flags the success (true) or failure (false) of the decoding process.

N

Hashed_storage_diffs

Column NameData TypeLayerDefinitionNullable

updated_at

timestamp

TECH

Technical field. Timestamp of the ETL process that has updated the row in the table. Equal to loaded_at on first insert.

N

chain_id

number

TECH

Technical field. Unique identifier of the chain (identifiers from Chainlist are used for all EVM compliant chains).

N

block_id

varchar

TECH

Technical field. Identifier of the block across chains and generation, constructed by concatenating chain_id, generation and block number.

N

block_number

number

RAW

Number of the block. Numbering is incremental, starting at 0 (Genesis) with new blocks added at the end of the chain.

N

block_hash

varchar

RAW

Hash of the block content (KECCAK-256). Unique for every block.

N

block_timestamp

timestamp

RAW

Timestamp of the block. Unique for every block and inherited by calls, events, transactions and diffs happening in the same block.

N

block_date

varchar

TECH

Technical field. Date of the block - precomputed to be used for analytics purposes, inherited by calls, events, transactions and diffs happening in the same block.

N

tx_id

varchar

TECH

Technical field. Unique identifier of the transaction accross chains, constructed by concatenating block id and transaction index, separated by underscores.

tx_hash

varchar

RAW

Hash of the transaction (KECCAK-256). Unique for every transaction.

N

contract_address

varchar

RAW

Smart contract address that the change applies to.

mem_hash

varchar

RAW

Memory hash used to store the variable value. For simple variables it is the slot number, in case of more complex variables it is calculated as the hash of the slot and keys used to address the mappings.

curr_value

varchar

RAW

Storage value after the change.

processed

boolean

TECH

Technical field. Defines processing status of a block by the decoding ETL process.

Y

Last updated