All Chains Data Table
The all_chains
table stores all the block, transaction and log event data across the 150+ supported blockchains in one unified data table. The chain_name
column identifies which chain the data belongs to; meaning you can pivot your analysis across multiple chains without any changes to your underlying SQL.
The all_chains
table is used to build out Increment's decoded tables such as reports.nft_sales_v2, reports.lending, and reports.dex.
All Chains Table Coverage:
Total Chains | 100 |
Total Rows | 100B+ |
New Blocks Every Day | 2,579,628 |
Metric Example: Cross Chain Transaction Count
SELECT uniq(tx_hash) , date_trunc('day', signed_at) as date , chain_name FROM blockchains.all_chains WHERE chain_name IN ('eth_mainnet', 'arbitrum_mainnet', 'matic_mainnet', 'optimism_mainnet') AND signed_at > now() - interval '30 day' GROUP BY date, chain_name
Transaction Data Columns
Column Name | Data Type | Description |
---|---|---|
tx_hash | string | Every transaction on the blockchain has a transaction hash (tx_hash ) that acts as a unique identifier for that transaction. |
successful | integer | Indicates whether a transaction failed or succeeded. |
tx_sender | string | Stores the wallet address that initiated the transaction (i.e the wallet paying the gas fee). |
tx_recipient | string | Stores the recipient of the transaction - recipients can be other wallets or smart contracts. For example, if you want to Swap tokens on Uniswap, the Uniswap router would typically be the recipient of the transaction. |
tx_creates | string | Stores the contract created in a Contract Creation transaction. The tx_creates column does not include contracts created through Create2 calls. |
tx_value | integer | Stores the amount of native token getting used in the transaction. For example, if a wallet sends 1 ETH, the value field would show 1 ETH. However, if a wallet sends 1 WETH the value field would be empty as WETH isn't the native token on Ethereum. |
tx_gas_offered | integer | The maximum amount of gas a transaction can use - denominated in gwei. |
tx_gas_spent | integer | The total amount of gas units used in the transaction. |
tx_gas_price | integer | The cost of one gas unit - denominated in gwei. To find the transaction fee - in ETH - you need to multiply tx_gas_spent and tx_gas_price . For example, 62606 * 0.000000012096221206 = 0.00075729602 ETH transaction fee. |
signed_at | datetime | Timestamp showing the date the transaction was successful. |
The columns in the all_chains
table above map to the following fields in the block explorer below:
Log Event Data Columns
Column Name | Data Type | Description |
---|---|---|
log_emitter | string | Stores the smart contract emitting the log event. For example, in a Swap event the log_emitter is the liquidity pool that's facilitating the swap. |
topic0 | string | Stores the topic event hash. All events have a unique topic event hash. |
topic1 - topic2 - topic3 | string | These fields display the stakeholders in the event. For example, in a transfer event the topic1 is the sender of the token and topic2 is the recipient. A transfer event is always made up of at least two addresses - sender and recipient. |
data0 - data1 - data2 - data3 | string | Stores a lot of critical information like addresses and token amounts. The information held in these fields can vary so it takes a bit of investigating to decode. |
data_rest | string | The data_rest field holds all the data outside data0 -data3 . It's a column that's very rarely utilised and most analysis you perform won't require this column. For an example of an event with more than 3 data fields, go to Etherscan. |
The columns in the all_chains
table above map to the following fields in the block explorer below:
Block Data Columns
Column Name | Data Type | Description |
---|---|---|
block_height | integer | Block height refers to the current number block in a blockchain. The genesis block, which is the very first block in any blockchain, has a block height equal to zero. |
block_gas_used | integer | The total amount of gas units used by the block. |
block_gas_limit | integer | The maximum amount of gas a block can use - denominated in gwei. |
block_hash | string | Every block on the blockchain has a block hash that acts as a unique identifier for that transaction. |
block_parent_hash | string | All the blocks are chained together by adding the previous block's hash to the next block's header - known as the parent hash. This chaining makes the data in the previous blocks immutable. |
The columns in the all_chains
table above map to the following fields in the block explorer below: