diff --git a/dbt_subprojects/daily_spellbook/models/chain_info/chain_info_chain_ids.sql b/dbt_subprojects/daily_spellbook/models/chain_info/chain_info_chain_ids.sql index 83a864dd8dd..a0df844e8e3 100644 --- a/dbt_subprojects/daily_spellbook/models/chain_info/chain_info_chain_ids.sql +++ b/dbt_subprojects/daily_spellbook/models/chain_info/chain_info_chain_ids.sql @@ -31,12 +31,12 @@ FROM ( values ,('Metadium Mainnet' ,'META' ,'META' ,'11' ,'11' ,'https://metadium.com' ,'') ,('Metadium Testnet' ,'META' ,'KAL' ,'12' ,'12' ,'https://metadium.com' ,'') ,('Diode Testnet Staging' ,'DIODE' ,'sDIODE' ,'13' ,'13' ,'https://diode.io/staging' ,'') -,('Flare Mainnet' ,'FLR' ,'FLR' ,'14' ,'14' ,'https://flare.xyz' ,'https://flare-explorer.flare.network') +,('Flare Mainnet', 'FLR', 'FLR', '14', '14', 'https://flare.network', 'https://flare-explorer.flare.network') ,('Diode Prenet' ,'DIODE' ,'DIODE' ,'15' ,'15' ,'https://diode.io/prenet' ,'') -,('Flare Testnet Coston' ,'FLR' ,'CFLR' ,'16' ,'16' ,'https://flare.xyz' ,'https://coston-explorer.flare.network') +,('Flare Testnet Coston', 'CFLR', 'CFLR', '16', '16', 'https://flare.network', 'https://coston-explorer.flare.network') ,('ThaiChain 2.0 ThaiFi' ,'TCH' ,'TFI' ,'17' ,'17' ,'https://exp.thaifi.com' ,'') ,('ThunderCore Testnet' ,'TST' ,'TST' ,'18' ,'18' ,'https://thundercore.com' ,'https://explorer-testnet.thundercore.com') -,('Songbird Canary-Network' ,'SGB' ,'SGB' ,'19' ,'19' ,'https://flare.xyz' ,'https://songbird-explorer.flare.network') +,('Songbird Canary-Network' ,'SGB' ,'SGB' ,'19' ,'19' ,'https://flare.network' ,'https://songbird-explorer.flare.network') ,('Elastos Smart Chain' ,'ETH' ,'ELA' ,'20' ,'20' ,'https://www.elastos.org/' ,'https://esc.elastos.io') ,('Elastos Smart Chain Testnet' ,'ETH' ,'tELA' ,'21' ,'21' ,'https://www.elastos.org/' ,'https://esc-testnet.elastos.io') ,('ELA-DID-Sidechain Mainnet' ,'ETH' ,'ELA' ,'22' ,'22' ,'https://www.elastos.org/' ,'') diff --git a/dbt_subprojects/daily_spellbook/models/evms/evms_info.sql b/dbt_subprojects/daily_spellbook/models/evms/evms_info.sql index 991164f9456..27139065f67 100644 --- a/dbt_subprojects/daily_spellbook/models/evms/evms_info.sql +++ b/dbt_subprojects/daily_spellbook/models/evms/evms_info.sql @@ -12,6 +12,7 @@ , "celo" , "ethereum" , "fantom" + , "flare" , "gnosis" , "kaia" , "linea" @@ -91,4 +92,5 @@ FROM ( , (5000, 'mantle', 'Mantle', 'Layer 2', 'Optimistic Rollup', 'MNT', 0x78c1b0c915c4faa5fffa6cabf0219da63d7f4cb8, 'https://mantlescan.xyz/', timestamp '2023-07-02 18:21', 'Optimistic Virtual Machine', 'Ethereum', 'Ethereum', true) , (42170, 'nova', 'Arbitrum Nova', 'Layer 2', 'Optimistic Rollup', 'ETH', 0x722e8bdd2ce80a4422e880164f2079488e115365, 'https://nova-explorer.arbitrum.io/', timestamp '2022-06-25 04:01', 'Arbitrum', 'Ethereum', 'Ethereum', true) , (2020, 'ronin', 'Ronin', 'Layer 1', null, 'RON', 0xe514d9deb7966c8be0ca922de8a064264ea6bcd4, 'https://app.roninchain.com/', timestamp '2021-01-25 10:49', NULL, NULL, NULL, true) + , (14, 'flare', 'Flare', 'Layer 1', NULL, 'FLR', NULL, 'https://flare-explorer.flare.network/', timestamp '2022-07-13 15:32', NULL, NULL, NULL, true) ) AS temp_table (chain_id, blockchain, name, chain_type, rollup_type, native_token_symbol, wrapped_native_token_address, explorer_link, first_block_time, codebase, data_availability, settlement, is_on_dune) diff --git a/dbt_subprojects/tokens/models/prices/flare/_schema.yml b/dbt_subprojects/tokens/models/prices/flare/_schema.yml new file mode 100644 index 00000000000..dcd1b19db3a --- /dev/null +++ b/dbt_subprojects/tokens/models/prices/flare/_schema.yml @@ -0,0 +1,29 @@ +version: 2 + +models: + - name: prices_flare_tokens + meta: + blockchain: flare + sector: prices + contributors: hosuke, yakufff + config: + tags: ['prices', 'tokens', 'usd', 'flare'] + description: "Price tokens on Flare Network EVM chain" + data_tests: + - dbt_utils.unique_combination_of_columns: + combination_of_columns: + - contract_address + columns: + - name: token_id + description: "Id of the token at coinpaprika. This id is required to pull the price feed data. NOTE: Not all tokens are listed at coinpaprika - consider using price data from DEX sources in this case or submit a listing request at coinpaprika." + - name: blockchain + description: "Native blockchain of the token, if any" + data_tests: + - accepted_values: + values: [ "flare" ] + - name: contract_address + description: "Contract address of the token, if any" + - name: symbol + description: "Token symbol" + - name: decimals + description: "Number of decimals for the token contract" diff --git a/dbt_subprojects/tokens/models/prices/flare/prices_flare_tokens.sql b/dbt_subprojects/tokens/models/prices/flare/prices_flare_tokens.sql new file mode 100644 index 00000000000..956f9317452 --- /dev/null +++ b/dbt_subprojects/tokens/models/prices/flare/prices_flare_tokens.sql @@ -0,0 +1,25 @@ +{% set blockchain = 'flare' %} + +{{ config( + schema = 'prices_' + blockchain, + alias = 'tokens', + materialized = 'table', + file_format = 'delta', + tags = ['static'] + ) +}} + +SELECT + token_id + , '{{ blockchain }}' as blockchain + , symbol + , contract_address + , decimals +FROM +( + VALUES + ('flr-flare-network', 'WFLR', 0x1D80c49BbBCd1C0911346656B529DF9E5c2F783d, 18) + , ('joule-kinetic', 'JOULE', 0xE6505f92583103AF7ed9974DEC451A7Af4e3A3bE, 18) + , ('usdc.e-usd-coin.e', 'USDC.e', 0xFbDa5F676cB37624f28265A144A48B0d6e87d3b6, 6) + , ('usdt-tether', 'USDT', 0x0B38e83B86d491735fEaa0a791F65c2B99535396, 6) +) as temp (token_id, symbol, contract_address, decimals) diff --git a/dbt_subprojects/tokens/models/prices/prices_tokens.sql b/dbt_subprojects/tokens/models/prices/prices_tokens.sql index 9fa9d762641..c468060c72b 100644 --- a/dbt_subprojects/tokens/models/prices/prices_tokens.sql +++ b/dbt_subprojects/tokens/models/prices/prices_tokens.sql @@ -16,6 +16,7 @@ , "celo" , "ethereum" , "fantom" + , "flare" , "gnosis" , "kaia" , "linea" @@ -46,6 +47,7 @@ ref('prices_native_tokens') ,ref('prices_cardano_tokens') ,ref('prices_ethereum_tokens') ,ref('prices_fantom_tokens') +,ref('prices_flare_tokens') ,ref('prices_gnosis_tokens') ,ref('prices_optimism_tokens') ,ref('prices_polygon_tokens') diff --git a/dbt_subprojects/tokens/models/prices/prices_trusted_tokens.sql b/dbt_subprojects/tokens/models/prices/prices_trusted_tokens.sql index 613aca4cf83..6aab6582b3b 100644 --- a/dbt_subprojects/tokens/models/prices/prices_trusted_tokens.sql +++ b/dbt_subprojects/tokens/models/prices/prices_trusted_tokens.sql @@ -68,6 +68,7 @@ WITH trusted_tokens AS ( , ('ethereum', 0x2260fac5e5542a773aa44fbcfedf7c193bc2c599) , ('ethereum', 0xf939e0a03fb07f59a73314e73794be0e57ac1b4e) , ('fantom', 0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83) + , ('flare', 0x1D80c49BbBCd1C0911346656B529DF9E5c2F783d) , ('fantom', 0x04068da6c83afcfa0e13ba15a6696662335d5b75) , ('fantom', 0x74b23882a30290451a17c44f4f05243b6b58c76d) , ('fantom', 0x8d11ec38a3eb5e956b052f67da8bdc9bef8abf3e) diff --git a/dbt_subprojects/tokens/models/tokens/_schema.yml b/dbt_subprojects/tokens/models/tokens/_schema.yml index bb64ce8a7d8..68d13b23633 100644 --- a/dbt_subprojects/tokens/models/tokens/_schema.yml +++ b/dbt_subprojects/tokens/models/tokens/_schema.yml @@ -3,11 +3,12 @@ version: 2 models: - name: tokens_erc20 meta: - blockchain: arbitrum, avalanche_c, bnb, ethereum, gnosis, mantle, optimism, fantom, polygon, base, blast, sepolia, sei, nova, worldchain, kaia, ronin, boba + blockchain: arbitrum, avalanche_c, bnb, ethereum, gnosis, mantle, optimism, fantom, polygon, base, blast, sepolia, sei, nova, worldchain, kaia, ronin, boba, flare sector: tokens contributors: hildobby, 0xManny, dot2dotseurat, soispoke, mtitus6, wuligy, angus_1, Henrystats, viniabussafi, jeff-dude, rantum, hosuke config: - tags: ['tokens','erc20', 'arbitrum', 'avalanche_c', 'bnb', 'ethereum', 'gnosis', 'mantle', 'optimism', 'fantom', 'base', 'blast', 'sei', 'nova', 'linea', 'worldchain', 'kaia', 'ronin', 'boba'] + tags: ['tokens','erc20', 'arbitrum', 'avalanche_c', 'bnb', 'ethereum', 'gnosis', 'mantle', 'optimism', 'fantom', 'base', 'blast', 'sei', 'nova', 'linea', 'worldchain', 'kaia', 'ronin', 'boba', 'flare'] + description: > Crosschain ERC20 tokens data_tests: diff --git a/dbt_subprojects/tokens/models/tokens/flare/_schema.yml b/dbt_subprojects/tokens/models/tokens/flare/_schema.yml new file mode 100644 index 00000000000..93ec5d26b80 --- /dev/null +++ b/dbt_subprojects/tokens/models/tokens/flare/_schema.yml @@ -0,0 +1,21 @@ +version: 2 + +models: + - name: tokens_flare_erc20 + meta: + blockchain: flare + sector: tokens + project: erc20 + contributors: hosuke, yakufff + config: + tags: ['table', 'erc20', 'flare'] + description: "ERC20 Token Addresses, Symbols and Decimals on flare Network" + columns: + - name: contract_address + description: "ERC20 token contract address" + data_tests: + - unique + - name: symbol + description: "ERC20 token symbol" + - name: decimals + description: "Number of decimals, refers to how divisible an ERC20 token can be" diff --git a/dbt_subprojects/tokens/models/tokens/flare/tokens_flare_erc20.sql b/dbt_subprojects/tokens/models/tokens/flare/tokens_flare_erc20.sql new file mode 100644 index 00000000000..b12a5c48e61 --- /dev/null +++ b/dbt_subprojects/tokens/models/tokens/flare/tokens_flare_erc20.sql @@ -0,0 +1,32 @@ +{{ + config( + schema = 'tokens_flare' + , alias = 'erc20' + , tags = ['static'] + , materialized = 'table' + ) +}} + +SELECT + contract_address + , symbol + , decimals +FROM (VALUES + (0x1D80c49BbBCd1C0911346656B529DF9E5c2F783d, 'WFLR', 18) + , (0xE6505f92583103AF7ed9974DEC451A7Af4e3A3bE, 'JOULE', 18) + , (0x12e605bc104e93B45e1aD99F9e555f659051c2BB, 'sFLR', 18) + , (0xfF56Eb5b1a7FAa972291117E5E9565dA29bc808d, 'APS', 18) + , (0x4A771Cc1a39FDd8AA08B8EA51F7Fd412e73B3d2B, 'USDX', 6) + , (0x140D8d3649Ec605CF69018C627fB44cCC76eC89f, 'HLN', 18) + , (0xFbDa5F676cB37624f28265A144A48B0d6e87d3b6, 'USDC.e', 6) + , (0x0B38e83B86d491735fEaa0a791F65c2B99535396, 'USDT', 6) + , (0x22757fb83836e3F9F0F353126cACD3B1Dc82a387, 'FLX', 18) + , (0xC18f99CE6DD6278BE2D3f1e738Ed11623444aE33, 'POODLE', 18) + , (0x96B41289D90444B8adD57e6F265DB5aE8651DF29, 'eUSDT', 6) + , (0x932E691aA8c8306C4bB0b19F3f00a284371be8Ba, 'PHIL', 18) + , (0xB5010D5Eb31AA8776b52C7394B76D6d627501C73, 'PFL', 18) + , (0x908BB3E15040801fd29E542221A31Baaa7A4bE19, 'FODO', 18) + , (0xe2bBf70A52Ee84837E9E2e245E5aFc560E259249, 'ZOINK', 18) + , (0x1aa5282692398c078e71Fb3e4A85660d1BF8F586, 'BUNNY', 18) + , (0xc6B19B06A92B337Cbca5f7334d29d45ec4d5E532, 'Moon', 18) +) as temp (contract_address, symbol, decimals) diff --git a/dbt_subprojects/tokens/models/tokens/tokens_erc20.sql b/dbt_subprojects/tokens/models/tokens/tokens_erc20.sql index 4371252253b..eee5511d121 100644 --- a/dbt_subprojects/tokens/models/tokens/tokens_erc20.sql +++ b/dbt_subprojects/tokens/models/tokens/tokens_erc20.sql @@ -72,6 +72,7 @@ ,'tokens_tron': {'blockchain': 'tron', 'model': ref('tokens_tron_erc20')} ,'tokens_ronin': {'blockchain': 'ronin', 'model': ref('tokens_ronin_erc20')} ,'tokens_bob': {'blockchain': 'bob', 'model': ref('tokens_bob_erc20')} + ,'tokens_flare': {'blockchain': 'flare', 'model': ref('tokens_flare_erc20')} ,'tokens_boba': {'blockchain': 'boba', 'model': ref('tokens_boba_erc20')} } %} diff --git a/sources/_base_sources/evm/flare_base_sources.yml b/sources/_base_sources/evm/flare_base_sources.yml new file mode 100644 index 00000000000..aced6efea3d --- /dev/null +++ b/sources/_base_sources/evm/flare_base_sources.yml @@ -0,0 +1,593 @@ +version: 2 + +sources: + - name: flare + description: "Raw tables for the Flare blockchain" + tables: + - name: transactions + meta: + docs_slug: "/evm/flare/raw/transactions" + short_description: "The `flare.transactions` table contains all transactions on the Flare blockchain." + description: '{{ doc("flare_transactions_doc") }}' + columns: + - name: block_time + description: "The exact UTC timestamp when this transaction was included" + data_type: timestamp + - name: block_number + description: "The sequential number of the block containing this transaction" + data_type: bigint + - name: value + description: "Amount of native tokens transferred in this transaction" + data_type: uint256 + - name: gas_limit + description: "Maximum amount of gas that can be used by this transaction" + data_type: bigint + - name: gas_price + description: "Price per unit of gas specified by the sender" + data_type: uint256 + - name: gas_used + description: "Amount of gas used by this transaction" + data_type: bigint + - name: max_fee_per_gas + description: "Maximum total fee per unit of gas (EIP-1559)" + data_type: bigint + - name: max_priority_fee_per_gas + description: "Maximum priority fee per unit of gas (EIP-1559)" + data_type: bigint + - name: priority_fee_per_gas + description: "Actual priority fee per unit of gas (EIP-1559)" + data_type: bigint + - name: nonce + description: "Number of transactions sent by the sender prior to this one" + data_type: bigint + - name: index + description: "Index of this transaction within the block" + data_type: bigint + - name: success + description: "Whether the transaction was successful" + data_type: boolean + - name: from + description: "Address that sent the transaction" + data_type: varbinary + - name: to + description: "Address that received the transaction" + data_type: varbinary + - name: block_hash + description: "Hash of the block containing this transaction" + data_type: varbinary + - name: data + description: "Data payload of the transaction" + data_type: varbinary + - name: hash + description: "Unique identifier (hash) of this transaction" + data_type: varbinary + - name: type + description: "Transaction type (0 = legacy, 1 = access list, 2 = EIP-1559)" + data_type: varchar + - name: access_list + description: "List of addresses and storage keys that the transaction plans to access" + data_type: array(row(address varbinary,storageKeys array(varbinary))) + - name: block_date + description: "UTC date of the block containing this transaction" + data_type: date + + - name: traces + meta: + docs_slug: "/evm/flare/raw/traces" + short_description: "The `flare.traces` table contains all transaction traces on the Flare blockchain." + description: '{{ doc("flare_traces_doc") }}' + columns: + - name: block_time + description: "The exact UTC timestamp when this trace was created" + data_type: timestamp + - name: block_number + description: "The sequential number of the block containing this trace" + data_type: bigint + - name: value + description: "Amount of native tokens transferred in this trace" + data_type: uint256 + - name: gas + description: "Gas limit for this trace" + data_type: bigint + - name: gas_used + description: "Amount of gas used by this trace" + data_type: bigint + - name: block_hash + description: "Hash of the block containing this trace" + data_type: varbinary + - name: success + description: "Whether this trace was successful" + data_type: boolean + - name: tx_index + description: "Index of the transaction within the block" + data_type: integer + - name: tx_from + description: "Address that sent the transaction" + data_type: varbinary + - name: tx_to + description: "Address that received the transaction" + data_type: varbinary + - name: sub_traces + description: "Number of sub-traces" + data_type: bigint + - name: error + description: "Error message if the trace failed" + data_type: varchar + - name: tx_success + description: "Whether the parent transaction was successful" + data_type: boolean + - name: tx_hash + description: "Hash of the transaction" + data_type: varbinary + - name: from + description: "Address initiating this trace" + data_type: varbinary + - name: to + description: "Address receiving this trace" + data_type: varbinary + - name: trace_address + description: "Array indicating the position in the call trace tree" + data_type: array(bigint) + - name: type + description: "Type of the trace (call, create, suicide, reward)" + data_type: varchar + - name: address + description: "Address of the contract if this is a create trace" + data_type: varbinary + - name: code + description: "Contract code for create traces" + data_type: varbinary + - name: call_type + description: "Type of call (call, delegatecall, staticcall)" + data_type: varchar + - name: input + description: "Input data for the trace" + data_type: varbinary + - name: output + description: "Output data from the trace" + data_type: varbinary + - name: refund_address + description: "Address receiving refund for self-destruct" + data_type: varbinary + - name: revert_reason + description: "Reason for revert if the trace failed" + data_type: varchar + - name: block_date + description: "UTC date of the block containing this trace" + data_type: date + + - name: traces_decoded + meta: + docs_slug: "/evm/flare/raw/traces_decoded" + short_description: "The `flare.traces_decoded` table contains decoded traces from known contracts on the Flare blockchain." + description: '{{ doc("flare_traces_decoded_doc") }}' + columns: + - name: block_date + description: "UTC date of the block containing this trace" + data_type: date + - name: block_time + description: "The exact UTC timestamp when this trace was created" + data_type: timestamp + - name: block_number + description: "The sequential number of the block containing this trace" + data_type: bigint + - name: namespace + description: "Project namespace for the contract" + data_type: varchar + - name: contract_name + description: "Name of the contract" + data_type: varchar + - name: to + description: "Address receiving this trace" + data_type: varbinary + - name: trace_address + description: "Array indicating the position in the call trace tree" + data_type: array(bigint) + - name: tx_hash + description: "Hash of the transaction" + data_type: varbinary + - name: tx_from + description: "Address that sent the transaction" + data_type: varbinary + - name: tx_to + description: "Address that received the transaction" + data_type: varbinary + - name: signature + description: "Function signature hash" + data_type: varbinary + - name: function_name + description: "Name of the called function" + data_type: varchar + + - name: creation_traces + meta: + docs_slug: "/evm/flare/raw/creation_traces" + short_description: "The `flare.creation_traces` table contains information about contract creation events." + description: '{{ doc("flare_creation_traces_doc") }}' + columns: + - name: block_time + description: "The exact UTC timestamp when the block containing this creation was added to the chain" + data_type: timestamp + - name: block_number + description: "The sequential number of the block containing this creation" + data_type: bigint + - name: tx_hash + description: "Unique 256-bit identifier (hash) of the transaction" + data_type: varbinary + - name: address + description: "Address of the deployed contract" + data_type: varbinary + - name: from + description: "Address of the account that created the contract" + data_type: varbinary + - name: code + description: "Bytecode of the deployed contract" + data_type: varbinary + - name: block_month + description: "The month of the block date" + data_type: date + + - name: logs + meta: + docs_slug: "/evm/flare/raw/logs" + short_description: "The `flare.logs` table contains all event logs emitted by contracts on the Flare blockchain." + description: '{{ doc("flare_logs_doc") }}' + columns: + - name: block_time + description: "The exact UTC timestamp when this log was emitted" + data_type: timestamp + - name: block_number + description: "The sequential number of the block containing this log" + data_type: bigint + - name: block_hash + description: "Hash of the block containing this log" + data_type: varbinary + - name: contract_address + description: "Address of the contract that emitted this log" + data_type: varbinary + - name: topic0 + description: "First topic of the log (typically the event signature)" + data_type: varbinary + - name: topic1 + description: "Second topic of the log" + data_type: varbinary + - name: topic2 + description: "Third topic of the log" + data_type: varbinary + - name: topic3 + description: "Fourth topic of the log" + data_type: varbinary + - name: data + description: "Additional data included in the log" + data_type: varbinary + - name: tx_hash + description: "Hash of the transaction that generated this log" + data_type: varbinary + - name: index + description: "Index of this log within the transaction" + data_type: integer + - name: tx_index + description: "Index of the transaction within the block" + data_type: integer + - name: block_date + description: "UTC date of the block containing this log" + data_type: date + - name: tx_from + description: "Address that sent the transaction" + data_type: varbinary + - name: tx_to + description: "Address that received the transaction" + data_type: varbinary + + - name: logs_decoded + meta: + docs_slug: "/evm/flare/raw/logs_decoded" + short_description: "The `flare.logs_decoded` table contains decoded event logs from known contracts on the Flare blockchain." + description: '{{ doc("flare_logs_decoded_doc") }}' + columns: + - name: block_date + description: "UTC date of the block containing this log" + data_type: date + - name: block_time + description: "The exact UTC timestamp when this log was emitted" + data_type: timestamp + - name: block_number + description: "The sequential number of the block containing this log" + data_type: bigint + - name: namespace + description: "Project namespace for the contract" + data_type: varchar + - name: contract_name + description: "Name of the contract that emitted this event" + data_type: varchar + - name: contract_address + description: "Address of the contract that emitted this event" + data_type: varbinary + - name: tx_hash + description: "Hash of the transaction that generated this event" + data_type: varbinary + - name: tx_from + description: "Address that sent the transaction" + data_type: varbinary + - name: tx_to + description: "Address that received the transaction" + data_type: varbinary + - name: index + description: "Index of this event within the transaction" + data_type: integer + - name: signature + description: "Event signature hash" + data_type: varbinary + - name: event_name + description: "Name of the emitted event" + data_type: varchar + + - name: blocks + meta: + docs_slug: "/evm/flare/raw/blocks" + short_description: "The `flare.blocks` table contains information about blocks on the Flare blockchain." + description: '{{ doc("flare_blocks_doc") }}' + columns: + - name: time + description: "The exact UTC timestamp when this block was added to the chain" + data_type: timestamp + - name: number + description: "The sequential number of this block in the chain" + data_type: bigint + - name: gas_limit + description: "Maximum amount of gas that could be used by all transactions in this block" + data_type: decimal(38,0) + - name: gas_used + description: "Actual amount of gas used by all transactions in this block" + data_type: decimal(38,0) + - name: difficulty + description: "Numerical value indicating the computational effort required to mine this block" + data_type: bigint + - name: total_difficulty + description: "Sum of block difficulties up to this block" + data_type: decimal(38,0) + - name: size + description: "Size of this block in bytes" + data_type: bigint + - name: base_fee_per_gas + description: "Base fee per gas in the block (post-EIP-1559)" + data_type: bigint + - name: hash + description: "Unique 256-bit identifier (hash) of this block" + data_type: varbinary + - name: parent_hash + description: "Hash of the previous block in the chain" + data_type: varbinary + - name: miner + description: "Address of the validator that produced this block" + data_type: varbinary + - name: nonce + description: "Value used to demonstrate proof of work for this block" + data_type: varbinary + - name: state_root + description: "Root hash of the state trie" + data_type: varbinary + - name: transactions_root + description: "Root hash of the transactions trie" + data_type: varbinary + - name: receipts_root + description: "Root hash of the receipts trie" + data_type: varbinary + - name: date + description: "The UTC date when this block was added to the chain" + data_type: date + + - name: erc20_flare + description: "Transfer events for ERC20 tokens on Flare blockchain" + tables: + - name: evt_transfer + meta: + docs_slug: "/evm/flare/decoded/interfaces/erc20/evt_transfer" + short_description: "This table contains individual transfer events for ERC20 tokens on the Flare blockchain. Each row represents a single token transfer event." + description: '{{ doc("erc20_flare_evt_transfer_doc") }}' + columns: + - name: contract_address + description: "Address of the ERC20 token contract that emitted this event" + - name: evt_tx_hash + description: "Hash of the transaction containing this event" + - name: evt_index + description: "Index position of this event within the transaction" + - name: evt_block_time + description: "Timestamp of the block containing this event" + - name: evt_block_number + description: "The block number containing this event" + - name: from + description: "Address that sent the transaction" + data_type: varbinary + - name: to + description: "Address that received the transaction" + data_type: varbinary + - name: value + description: "Amount of ERC20 tokens transferred, in the token's Flare unit" + + - name: evt_approval + meta: + docs_slug: "/evm/flare/decoded/interfaces/erc20/evt_approval" + short_description: "The `flare.evt_approval` table contains approval events for ERC20 tokens on Flare, allowing an address to spend tokens on behalf of the owner." + description: '{{ doc("erc20_flare_evt_approval_doc") }}' + columns: + - name: contract_address + description: "Address of the ERC20 token contract" + - name: evt_tx_hash + description: "Hash of the transaction containing this event" + - name: evt_index + description: "Index position of this event within the transaction" + - name: evt_block_time + description: "Timestamp of the block containing this event" + - name: evt_block_number + description: "The block number containing this event" + - name: owner + description: "Address of the token owner granting approval" + data_type: varbinary + - name: spender + description: "Address being granted permission to spend tokens" + data_type: varbinary + - name: value + description: "Amount of ERC20 tokens approved for spending, in the token's smallest unit" + + - name: erc1155_flare + description: "Events related to ERC1155 tokens on Flare blockchain" + tables: + - name: evt_transfersingle + meta: + docs_slug: "/evm/flare/decoded/interfaces/erc1155/evt_transfersingle" + short_description: "This table contains single transfer events for ERC1155 tokens on the network." + description: '{{ doc("erc1155_flare_evt_transfersingle_doc") }}' + columns: + - name: contract_address + description: "Address of the ERC1155 token contract" + - name: evt_tx_hash + description: "Hash of the transaction containing this event" + - name: evt_index + description: "Index position of this event within the transaction" + - name: evt_block_time + description: "Timestamp of the block containing this event" + - name: evt_block_number + description: "The block number containing this event" + - name: operator + description: "The address that is authorized to execute the transfer on behalf of the owner" + data_type: varbinary + - name: from + description: "Address that sent the transaction" + data_type: varbinary + - name: to + description: "Address that received the transaction" + data_type: varbinary + - name: id + description: "Unique identifier of the ERC1155 token being transferred" + - name: value + description: "Quantity of the ERC1155 token transferred" + + - name: evt_transferbatch + meta: + docs_slug: "/evm/flare/decoded/interfaces/erc1155/evt_transferbatch" + short_description: "This table contains all batch transfer events for ERC1155 tokens on the network." + description: '{{ doc("erc1155_ethereum_evt_transferbatch_doc") }}' + columns: + - name: contract_address + description: "Contract address of the ERC1155 token contract" + - name: evt_tx_hash + description: "Hash of the transaction containing this event" + - name: evt_index + description: "Index position of this event within the transaction" + - name: evt_block_time + description: "Timestamp of the block containing this event" + - name: evt_block_number + description: "The block number containing this event" + - name: operator + description: "Contract address authorized to execute the batch transfer on behalf of the owner" + data_type: varbinary + - name: from + description: "Address that sent the transaction" + data_type: varbinary + - name: to + description: "Address that received the transaction" + data_type: varbinary + - name: ids + description: "Array of unique identifiers of the ERC1155 tokens being transferred" + - name: values + description: "Array of quantities for each ERC1155 token transferred, corresponding to the ids array" + + - name: evt_ApprovalForAll + meta: + docs_slug: "/evm/flare/decoded/interfaces/erc1155/evt_ApprovalForAll" + short_description: "This table contains approval events for all tokens of an ERC1155 contract on this network." + description: '{{ doc("erc1155_ethereum_evt_ApprovalForAll_doc") }}' + columns: + - name: contract_address + description: "Flare address of the ERC1155 token contract" + - name: evt_tx_hash + description: "Hash of the transaction containing this event" + - name: evt_index + description: "Index position of this event within the transaction" + - name: evt_block_time + description: "Timestamp of the block containing this event" + - name: evt_block_number + description: "The block number containing this event" + - name: approved + description: "Boolean indicating whether approval is granted (true) or revoked (false)" + - name: owner + description: "Flare address of the token owner granting or revoking approval" + data_type: varbinary + - name: operator + description: "Flare address being granted or revoked permission to operate all tokens" + data_type: varbinary + + - name: erc721_flare + description: '{{ doc("erc721_flare_evt_transfer_doc") }}' + tables: + - name: evt_transfer + description: "Transfer events for ERC721 tokens on this network" + columns: + - name: contract_address + description: "Contract address of the ERC721 token contract" + - name: evt_tx_hash + description: "Hash of the transaction containing this event" + - name: evt_index + description: "Index position of this event within the transaction" + - name: evt_block_time + description: "Timestamp of the block containing this event" + - name: evt_block_number + description: "The block number containing this event" + - name: from + description: "Address that sent the transaction" + data_type: varbinary + - name: to + description: "Address that received the transaction" + data_type: varbinary + - name: tokenId + description: "Unique identifier of the ERC721 token (NFT) being transferred" + + - name: evt_Approval + meta: + docs_slug: "/evm/flare/decoded/interfaces/erc721/evt_Approval" + short_description: "Approval events for ERC721 tokens on this network" + description: '{{ doc("erc721_ethereum_evt_Approval_doc") }}' + columns: + - name: contract_address + description: "Contract address of the ERC721 token contract" + - name: evt_tx_hash + description: "Hash of the transaction containing this event" + - name: evt_index + description: "Index position of this event within the transaction" + - name: evt_block_time + description: "Timestamp of the block containing this event" + - name: evt_block_number + description: "The block number containing this event" + - name: approved + description: "Boolean indicating whether approval is granted (true) or revoked (false)" + - name: owner + description: "Address of the token owner granting or revoking approval" + data_type: varbinary + - name: tokenId + description: "Unique identifier of the ERC721 token (NFT) for which approval is granted or revoked" + + - name: evt_ApprovalForAll + meta: + docs_slug: "/evm/flare/decoded/interfaces/erc721/evt_ApprovalForAll" + short_description: "The `flare.evt_ApprovalForAll` table contains approval events for all tokens of an ERC721 contract on the Flare blockchain." + description: '{{ doc("erc721_ethereum_evt_ApprovalForAll_doc") }}' + columns: + - name: contract_address + description: "Address of the ERC721 token contract" + - name: evt_tx_hash + description: "Hash of the transaction containing this event" + - name: evt_index + description: "Index position of this event within the transaction" + - name: evt_block_time + description: "Timestamp of the block containing this event" + - name: evt_block_number + description: "The block number containing this event" + - name: approved + description: "Boolean indicating whether approval is granted (true) or revoked (false)" + - name: owner + description: "Address of the token owner granting or revoking approval" + data_type: varbinary + - name: operator + description: "The address being granted or revoked permission to operate all tokens" + data_type: varbinary diff --git a/sources/_base_sources/evm/flare_docs_block.md b/sources/_base_sources/evm/flare_docs_block.md new file mode 100644 index 00000000000..06a96b286c2 --- /dev/null +++ b/sources/_base_sources/evm/flare_docs_block.md @@ -0,0 +1,311 @@ +{% docs flare_transactions_doc %} + +The `flare.transactions` table contains detailed information about transactions on the Flare blockchain. It includes: + +- Block information: number, timestamp, hash +- Transaction details: hash, from_address, to_address, value +- Gas data: gas_price, gas_limit, gas_used, max_fee_per_gas, priority_fee_per_gas +- Status: success or failure +- Input data for contract interactions +- Nonce and chain_id +- Transaction type and access list + +This table is used for analyzing transaction patterns, gas usage, value transfers, and overall network activity on Flare. + +{% enddocs %} + +{% docs flare_traces_doc %} + +The `flare.traces` table contains records of execution steps for transactions on the Flare blockchain. Each trace represents an atomic operation that modifies the state of the Ethereum Virtual Machine (EVM). Key components include: + +- Transaction hash and block information +- From and to addresses +- Value transferred +- Gas metrics (gas, gas_used) +- Input and output data +- Call type (e.g., CALL, DELEGATECALL, CREATE) +- Error information and revert reasons +- Trace address for nested calls + +This table is essential for: +- Analyzing internal transactions +- Debugging smart contract interactions +- Tracking value flows through complex transactions +- Understanding contract creation and deployment +- Monitoring FTSO (Flare Time Series Oracle) interactions +- Analyzing State Connector operations + +{% enddocs %} + +{% docs flare_traces_decoded_doc %} + +The `flare.traces_decoded` table contains a subset of decoded traces from the Flare blockchain dependent on submitted smart contracts and their ABIs. It includes: + +- Block information and transaction details +- Contract name and namespace +- Decoded function names and signatures +- Trace address for execution path tracking +- Transaction origin and destination +- Function parameters (when available) + +This table is used for high level analysis of smart contract interactions, including FTSO and State Connector operations. For fully decoded function calls and parameters, refer to protocol-specific decoded tables. + +{% enddocs %} + +{% docs flare_logs_doc %} + +The `flare.logs` table contains event logs emitted by smart contracts on the Flare blockchain. It includes: + +- Block information: number, timestamp, hash +- Transaction details: hash, index, from, to +- Contract address (emitting the event) +- Topic0 (event signature) +- Additional topics (indexed parameters) +- Data field (non-indexed parameters) +- Log index and transaction index + +This table is crucial for: +- Tracking on-chain events +- Monitoring contract activity +- Analyzing token transfers +- Following protocol-specific events +- Tracking FTSO price submissions and rewards +- Monitoring State Connector attestations + +{% enddocs %} + +{% docs flare_logs_decoded_doc %} + +The `flare.logs_decoded` table contains a subset of decoded logs from the Flare blockchain dependent on submitted smart contracts and their ABIs. It includes: + +- Block and transaction information +- Contract details (name, namespace, address) +- Decoded event names and signatures +- Transaction origin and destination +- Event parameters (when available) + +This table is used for high level analysis of smart contract events, particularly useful for monitoring FTSO and State Connector activities. For fully decoded events and parameters, refer to protocol-specific decoded tables. + +{% enddocs %} + +{% docs flare_blocks_doc %} + +The `flare.blocks` table contains information about Flare blocks. It provides essential data about each block in the Flare blockchain, including: + +- Block identifiers and timestamps +- Gas metrics and size +- Consensus information (difficulty, nonce) +- State roots and receipts +- Parent block information +- Base fee per gas +- Extra data + +This table is used for: +- Block timing analysis +- Network performance monitoring +- Gas price trends +- Chain reorganization studies +- Consensus metrics tracking + +{% enddocs %} + +{% docs flare_contracts_doc %} + +The `flare.contracts` table contains information about verified smart contracts on the Flare blockchain. It includes: + +- Contract address +- Contract name and version +- Verification status and timestamp +- Compiler information +- Source code and ABI +- License type +- Implementation details + +This table is used for: +- Contract verification status +- Smart contract analysis +- Protocol research +- Development and debugging +- FTSO and State Connector contract tracking + +{% enddocs %} + +{% docs flare_creation_traces_doc %} + +The `flare.creation_traces` table contains detailed information about contract creation events on the Flare blockchain. It includes: + +- Block information: time, number, date +- Transaction details: hash, from address +- Contract creation specifics: + * Created contract address + * Contract bytecode + * Creation transaction details + * Success/failure status + +This table is essential for: +- Tracking smart contract deployments +- Analyzing contract creation patterns +- Monitoring new protocol deployments +- Auditing contract creation history +- Understanding contract deployment costs + +{% enddocs %} + +{% docs erc20_flare_evt_transfer_doc %} + +The `flare.erc20_flare.evt_transfer` table contains ERC20 token transfer events on the Flare blockchain. Each row represents a single token transfer and includes: + +- Contract address of the token +- Transaction details (hash, block info) +- Transfer participants (from and to addresses) +- Amount transferred +- Event metadata (index, block time) + +This table is crucial for: +- Tracking token movements +- Analyzing token holder behavior +- Monitoring token activity +- Computing token metrics +- Identifying significant transfers + +{% enddocs %} + +{% docs erc20_flare_evt_approval_doc %} + +The `flare.erc20_flare.evt_approval` table contains ERC20 token approval events on the Flare blockchain. It records when token holders authorize other addresses to spend tokens on their behalf, including: + +- Token contract address +- Transaction information +- Owner address (granting approval) +- Spender address (receiving approval) +- Approved amount +- Event metadata + +This table is used for: +- Monitoring token approvals +- Analyzing DEX interactions +- Tracking delegation patterns +- Security monitoring +- Protocol integration analysis + +{% enddocs %} + +{% docs erc1155_flare_evt_transfersingle_doc %} + +The `flare.erc1155_flare.evt_transfersingle` table contains single transfer events for ERC1155 tokens on the Flare blockchain. Each record includes: + +- Contract address +- Transaction details +- Operator address +- From and to addresses +- Token ID +- Amount transferred +- Event metadata + +This table is essential for: +- Tracking multi-token transfers +- Gaming asset movements +- NFT marketplace analysis +- Collection statistics +- User activity monitoring + +{% enddocs %} + +{% docs erc1155_flare_evt_transferbatch_doc %} + +The `flare.erc1155_flare.evt_transferbatch` table contains batch transfer events for ERC1155 tokens on the Flare blockchain. It records multiple token transfers in a single transaction: + +- Contract address +- Transaction information +- Operator address +- From and to addresses +- Arrays of token IDs and amounts +- Event metadata + +This table is used for: +- Analyzing bulk transfers +- Gaming inventory movements +- Marketplace activity +- Collection migrations +- Protocol efficiency analysis + +{% enddocs %} + +{% docs erc1155_flare_evt_approvalforall_doc %} + +The `flare.erc1155_flare.evt_approvalforall` table contains approval events for ERC1155 tokens on the Flare blockchain. It records when owners grant or revoke approval for all their tokens: + +- Contract address +- Transaction details +- Owner address +- Operator address +- Approval status +- Event metadata + +This table is crucial for: +- Monitoring collection approvals +- Marketplace integrations +- Protocol permissions +- Security analysis +- User behavior studies + +{% enddocs %} + +{% docs erc721_flare_evt_transfer_doc %} + +The `flare.erc721_flare.evt_transfer` table contains transfer events for ERC721 tokens (NFTs) on the Flare blockchain. Each record represents a single NFT transfer: + +- Contract address +- Transaction information +- From and to addresses +- Token ID +- Event metadata + +This table is essential for: +- NFT ownership tracking +- Collection analysis +- Market activity monitoring +- User portfolio tracking +- Transfer pattern analysis + +{% enddocs %} + +{% docs erc721_flare_evt_approval_doc %} + +The `flare.erc721_flare.evt_approval` table contains approval events for ERC721 tokens on the Flare blockchain. It records when NFT owners authorize specific addresses to transfer individual tokens: + +- Contract address +- Transaction details +- Owner address +- Approved address +- Token ID +- Event metadata + +This table is used for: +- NFT approval tracking +- Marketplace integration analysis +- Permission monitoring +- Security auditing +- Protocol interaction study + +{% enddocs %} + +{% docs erc721_flare_evt_approvalforall_doc %} + +The `flare.erc721_flare.evt_approvalforall` table contains collection-wide approval events for ERC721 tokens on the Flare blockchain. It records when owners grant or revoke approval for all their NFTs: + +- Contract address +- Transaction information +- Owner address +- Operator address +- Approval status +- Event metadata + +This table is crucial for: +- Collection permission tracking +- Marketplace authorization +- Protocol integration analysis +- Security monitoring +- User behavior analysis + +{% enddocs %}