Beta Migration Guide

Summary of changes:

  • All chain data has been reprocessed and reported data quality issues have been fixed (i.e. missing or incorrect decoded data, added "0-padding" for decoded arguments in calls and events)

  • RAW and DECODED schemas are no longed necessary. All tables are available in a single database schema.

  • Raw and decoded tables have been merges into single tables for all entities.

  • Traces table has been renamed to Calls to keep consistency with the multi-chain data model.

  • Two separate status columns have been added to flag the status of the decoding processes:

    • decoded - Flags the success (true) or failure (false) of the decoding process. Exact definition depends on each record type.

    • processed - defines processing status of a record by the decoding ETL process.

  • Data set includes reverted transactions. These can be easily identified via the reverted column in the transactions table.

  • Columns have been renamed, removed or added across all tables. Specific details and mapping to the new column are provided for each table to facilitate changing queries.

Changes in the data model

Once you have moved the new database you can follow the details below to update your queries. Make sure that you also update the name of the database and the schema. Need help? Reach out to our team.

Blocks

New columns

Column NameData TypeLayerDefinition

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.

block_id

varchar

TECH

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

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.

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/

processed

boolean

TECH

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

Existing columns

Schema - SDW BETAColumn - SDW BETAColumn - MCDW StarknetChanges & Comments

RAW

block_hash

block_hash

RAW

block_number

block_number

RAW

chain_id

chain_id

Change in logic and data type. Value for Starknet is "5461067"

RAW

gas_price

gas_price

RAW

load_id

loaded_at

Renamed

RAW

parent_hash

parent_hash

RAW

sequencer

sequencer_address

Renamed

RAW

state_root

state_root

RAW

timestamp

block_timestamp

Renamed

RAW

tx_count

tx_count

DECODED

block_hash

block_hash

DECODED

block_number

block_number

DECODED

chain_id

chain_id

Change in logic and data type. Value for Starknet is "5461067"

DECODED

gas_price

gas_price

DECODED

load_id

loaded_at

Renamed

DECODED

parent_hash

parent_hash

DECODED

sequencer

sequencer_address

Renamed

DECODED

state_root

state_root

DECODED

timestamp

block_timestamp

Renamed

DECODED

tx_count

tx_count

Transactions

New columns

Column NameData TypeLayerDefinition

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.

block_id

varchar

TECH

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

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.

tx_id

varchar

TECH

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

function_signature

varchar

RAW

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

class_hash

varchar

RAW

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

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.

created_address

varchar

RAW

Address of created contract.

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.

revert_reason

varchar

RAW

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

execution_resources

json

RAW

Resources consumed by the transaction execution.

processed

boolean

TECH

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

Existing columns

Schema - SDW BETAColumn - SDW BETAColumn - MCDW StarknetChanges & Comments

RAW

actual_fee

actual_fee

RAW

block_number

block_number

RAW

call_data

-

Removed

RAW

chain_id

chain_id

Change in logic and data type. Value for Starknet is "5461067"

RAW

class_hash

class_hash

RAW

contract

to_address

Renamed

RAW

contract_salt

-

Removed

RAW

entry_point_selector

-

Removed

RAW

entry_point_type

-

Removed

RAW

execution_resources

execution_resources

RAW

load_id

loaded_at

Renamed

RAW

max_fee

max_fee_per_gas

Renamed

RAW

nonce

nonce

RAW

signature

-

Removed

RAW

timestamp

block_timestamp

Renamed

RAW

tx_hash

tx_hash

RAW

tx_index

tx_index

RAW

type

tx_type

Renamed

RAW

version

-

Removed

DECODED

actual_fee

actual_fee

DECODED

block_number

block_number

DECODED

chain_id

chain_id

Change in logic and data type. Value for Starknet is "5461067"

DECODED

class_hash

class_hash

DECODED

contract

to_address

Renamed

DECODED

entry_point_selector

-

Removed

DECODED

entry_point_type

-

Removed

DECODED

execution_resources

execution_resources

DECODED

load_id

loaded_at

Renamed

DECODED

max_fee

max_fee_per_gas

Renamed

DECODED

nonce

nonce

DECODED

signature

-

Removed

DECODED

timestamp

block_timestamp

Renamed

DECODED

tx_hash

tx_hash

DECODED

tx_index

tx_index

DECODED

type

tx_type

Renamed

DECODED

version

-

Removed

DECODED

error

exception_error

Renamed

DECODED

function

-

Removed

DECODED

inputs

-

Removed

DECODED

l1_message_nonce

l1_message_nonce

DECODED

outputs

-

Removed

Traces

This table has been renamed to Calls

New columns

Column NameData TypeLayerDefinition

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.

block_id

varchar

TECH

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

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.

tx_id

varchar

TECH

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

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).

call_value

number

RAW

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

created_address

varchar

RAW

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

processed

boolean

TECH

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

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

Existing columns

Schema - SDW BETAColumn - SDW BETAColumn - MCDW StarknetChanges & Comments

RAW

block_number

block_number

RAW

caller

from_address

Renamed

RAW

call_data

call_data

RAW

chain_id

chain_id

Change in logic and data type. Value for Starknet is "5461067"

RAW

class_hash

class_hash

RAW

contract

to_address

Renamed

RAW

entry_point_selector

function_signature

Renamed

RAW

entry_point_type

function_type

Renamed

RAW

execution_resources

execution_resources

RAW

invocation_type

invocation_type

RAW

load_id

loaded_at

Renamed

RAW

results

return_data

Renamed

RAW

timestamp

block_timestamp

Renamed

RAW

trace_path

call_path

Renamed

RAW

trace_type

call_type

Renamed

RAW

tx_hash

tx_hash

DECODED

block_number

block_number

DECODED

caller

from_address

Renamed

DECODED

chain_id

chain_id

Change in logic and data type. Value for Starknet is "5461067"

DECODED

contract

to_address

Renamed

DECODED

entry_point_selector

function_signature

Renamed

DECODED

entry_point_type

function_type

Renamed

DECODED

execution_resources

execution_resources

DECODED

invocation_type

invocation_type

DECODED

load_id

loaded_at

Renamed

DECODED

timestamp

block_timestamp

Renamed

DECODED

trace_path

call_path

Renamed

DECODED

trace_type

call_type

Renamed

DECODED

tx_hash

tx_hash

DECODED

function

function_name

Renamed

DECODED

inputs

arguments

Renamed

DECODED

outputs

outputs

DECODED

trace_id

call_id

Renamed

Events

New columns

Column NameData TypeLayerDefinition

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.

block_id

varchar

TECH

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

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.

tx_id

varchar

TECH

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

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.

event_signature

varchar

RAW

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

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.

processed

boolean

TECH

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

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

Existing columns

Schema - SDW BETAColumn - SDW BETAColumn - MCDW StarknetChanges & Comments

RAW

block_number

block_number

RAW

chain_id

chain_id

Change in logic and data type. Value for Starknet is "5461067"

RAW

class_hash

class_hash

RAW

contract

contract_address

Renamed

RAW

data

log_data

Renamed

RAW

event_order

log_index

Renamed

RAW

keys

topics

Renamed

RAW

load_id

loaded_at

Renamed

RAW

timestamp

block_timestamp

Renamed

RAW

trace_path

-

Renamed

RAW

tx_hash

tx_hash

DECODED

block_number

block_number

DECODED

chain_id

chain_id

Change in logic and data type. Value for Starknet is "5461067"

DECODED

class_hash

class_hash

DECODED

contract

contract_address

Renamed

DECODED

event_order

log_index

Renamed

DECODED

keys

-

Removed. Replaced by event_signature (topic0)

DECODED

load_id

loaded_at

Renamed

DECODED

tx_hash

tx_hash

DECODED

event_id

event_id

DECODED

name

event_name

Renamed

DECODED

parameters

parameters

DECODED

trace_id

call_id

Renamed

Messages

New columns

Column NameData TypeLayerDefinition

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.

block_id

varchar

TECH

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

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.

tx_id

varchar

TECH

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

message_id

varchar

TECH

Unique identifier of the message.

message_source

varchar

TECH

Source of the message: it can be L1 or L2

message_nonce

number

RAW

Nonce of the message from L1 to L2

processed

boolean

TECH

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

decoded

boolean

TECH

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

Existing columns

Schema - SDW BETAColumn - SDW BETAColumn - MCDW StarknetChanges & Comments

RAW

block_number

block_number

RAW

chain_id

chain_id

Change in logic and data type. Value for Starknet is "5461067"

RAW

class_hash

class_hash

RAW

from_address

l2_address

Renamed

RAW

load_id

loaded_at

Renamed

RAW

message_order

message_order

RAW

payload

payload

RAW

timestamp

block_timestamp

Renamed

RAW

to_address

l1_address

Renamed

RAW

trace_path

-

Removed

RAW

tx_hash

tx_hash

DECODED

block_number

block_number

DECODED

chain_id

chain_id

Change in logic and data type. Value for Starknet is "5461067"

DECODED

class_hash

class_hash

DECODED

from_address

l2_address

Renamed

DECODED

load_id

loaded_at

Renamed

DECODED

message_order

message_order

DECODED

payload

payload

DECODED

timestamp

block_timestamp

Renamed

DECODED

to_address

l1_address

Renamed

DECODED

tx_hash

tx_hash

DECODED

trace_id

call_id

Renamed

Last updated