diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/account_abstraction/erc4337/_schema.yml b/dbt_subprojects/hourly_spellbook/models/_sector/account_abstraction/erc4337/_schema.yml index bb190a39519..6b4f7f499de 100644 --- a/dbt_subprojects/hourly_spellbook/models/_sector/account_abstraction/erc4337/_schema.yml +++ b/dbt_subprojects/hourly_spellbook/models/_sector/account_abstraction/erc4337/_schema.yml @@ -2,7 +2,7 @@ version: 2 models: - name: account_abstraction_erc4337_userops meta: - blockchain: arbitrum,avalanche_c,base,bnb,celo,ethereum,gnosis,optimism,polygon,zora + blockchain: arbitrum,avalanche_c,base,bnb,b3,celo,ethereum,gnosis,optimism,polygon,zora sector: erc4337 project: erc4337 contributors: 0xbitfly, hosuke, intensodefi @@ -69,7 +69,7 @@ models: - name: account_abstraction_erc4337_account_deployed meta: - blockchain: arbitrum,avalanche_c,base,bnb,celo,ethereum,gnosis,optimism,polygon,zora + blockchain: arbitrum,avalanche_c,b3,base,bnb,celo,ethereum,gnosis,optimism,polygon,zora sector: erc4337 project: erc4337 contributors: 0xbitfly, intensodefi diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/account_abstraction/erc4337/account_abstraction_erc4337_account_deployed.sql b/dbt_subprojects/hourly_spellbook/models/_sector/account_abstraction/erc4337/account_abstraction_erc4337_account_deployed.sql index d448b49a450..6ec9ec336cb 100644 --- a/dbt_subprojects/hourly_spellbook/models/_sector/account_abstraction/erc4337/account_abstraction_erc4337_account_deployed.sql +++ b/dbt_subprojects/hourly_spellbook/models/_sector/account_abstraction/erc4337/account_abstraction_erc4337_account_deployed.sql @@ -12,6 +12,7 @@ ref('account_abstraction_erc4337_ethereum_account_deployed') , ref('account_abstraction_erc4337_polygon_account_deployed') , ref('account_abstraction_erc4337_arbitrum_account_deployed') +, ref('account_abstraction_erc4337_b3_account_deployed') , ref('account_abstraction_erc4337_optimism_account_deployed') , ref('account_abstraction_erc4337_avalanche_c_account_deployed') , ref('account_abstraction_erc4337_gnosis_account_deployed') diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/account_abstraction/erc4337/account_abstraction_erc4337_userops.sql b/dbt_subprojects/hourly_spellbook/models/_sector/account_abstraction/erc4337/account_abstraction_erc4337_userops.sql index 3fc1cb2f2b4..4c12b048802 100644 --- a/dbt_subprojects/hourly_spellbook/models/_sector/account_abstraction/erc4337/account_abstraction_erc4337_userops.sql +++ b/dbt_subprojects/hourly_spellbook/models/_sector/account_abstraction/erc4337/account_abstraction_erc4337_userops.sql @@ -13,6 +13,7 @@ , ref('account_abstraction_erc4337_polygon_userops') , ref('account_abstraction_erc4337_arbitrum_userops') , ref('account_abstraction_erc4337_optimism_userops') +, ref('account_abstraction_erc4337_b3_userops') , ref('account_abstraction_erc4337_avalanche_c_userops') , ref('account_abstraction_erc4337_gnosis_userops') , ref('account_abstraction_erc4337_base_userops') diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/account_abstraction/erc4337/arbitrum/account_abstraction_erc4337_arbitrum_v0_6_userops_basics.sql b/dbt_subprojects/hourly_spellbook/models/_sector/account_abstraction/erc4337/arbitrum/account_abstraction_erc4337_arbitrum_v0_6_userops_basics.sql index 1fe9f3d8969..227f6eec987 100644 --- a/dbt_subprojects/hourly_spellbook/models/_sector/account_abstraction/erc4337/arbitrum/account_abstraction_erc4337_arbitrum_v0_6_userops_basics.sql +++ b/dbt_subprojects/hourly_spellbook/models/_sector/account_abstraction/erc4337/arbitrum/account_abstraction_erc4337_arbitrum_v0_6_userops_basics.sql @@ -13,7 +13,7 @@ {% set chain = 'arbitrum' %} {% set gas_symbol = 'ETH' %} -{% set wrapped_gas_address = '0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270' %} +{% set wrapped_gas_address = '0x82af49447d8a07e3bd95bd0d56f35241523fbab1' %} {% set version = 'v0.6' %} {% set deployed_date = '2023-02-15' %} diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/account_abstraction/erc4337/b3/_schema.yml b/dbt_subprojects/hourly_spellbook/models/_sector/account_abstraction/erc4337/b3/_schema.yml new file mode 100644 index 00000000000..bb9e19255a9 --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/account_abstraction/erc4337/b3/_schema.yml @@ -0,0 +1,136 @@ +version: 2 + +models: + - name: account_abstraction_erc4337_b3_v0_6_userops_basics + meta: + blockchain: b3 + sector: erc4337 + project: erc4337 + contributors: 0xbitfly + config: + tags: ["b3", "erc4337", "account", "abstraction", "entrypoint"] + description: "erc4337 v0.6 user operations on b3" + columns: + - &blockchain + name: blockchain + description: "blockchain which EntryPoint was deployed" + - &version + name: version + description: "version of the EntryPoint contract" + - &block_month + name: block_month + description: "UTC event block date of each User Operation" + - &block_time + name: block_time + description: "UTC event block time of each User Operation" + - &entrypoint_contract + name: entrypoint_contract + description: "the contract address of the EntryPoint" + - &tx_hash + name: tx_hash + description: "Unique transaction hash value tied to each transaction on the User Operation" + - &sender + name: sender + description: "the sender(AA wallet address) that submmited the user operation" + - &userop_hash + name: userop_hash + description: "Unique user operation hash" + - &success + name: success + description: "weather the user operation is successfully execuated" + - &paymaster + name: paymaster + description: "the address that pay for the user operation gas fees on behalf of the user" + - &op_fee + name: op_fee + description: "The gas paid by sender or paymaster It depends on the chain gas setting" + - &beneficiary + name: beneficiary + description: "the address where the bundler setting for the user operation pay for thier gas fee" + + - name: account_abstraction_erc4337_b3_v0_7_userops_basics + meta: + blockchain: b3 + sector: erc4337 + project: erc4337 + contributors: 0xbitfly + config: + tags: ["b3", "erc4337", "account", "abstraction", "entrypoint"] + description: "erc4337 v0.7 user operations on b3" + columns: + - *blockchain + - *version + - *block_month + - *block_time + - *entrypoint_contract + - *tx_hash + - *sender + - *userop_hash + - *success + - *paymaster + - *op_fee + - *beneficiary + + - name: account_abstraction_erc4337_b3_userops + meta: + blockchain: b3 + sector: erc4337 + project: erc4337 + contributors: 0xbitfly + config: + tags: ["b3", "erc4337", "account", "abstraction", "entrypoint"] + description: "erc4337 user operations on b3" + columns: + - *blockchain + - *version + - *block_month + - *block_time + - *entrypoint_contract + - *tx_hash + - *sender + - *userop_hash + - *success + - *paymaster + - *op_fee + - &op_fee_usd + name: op_fee_usd + description: "The user operation gas (in usd) paid by sender or paymaster" + - &bundler + name: bundler + description: "address that bundle UserOps and submit those UserOps to the final on-chain by send a EOA transaction" + - &tx_to + name: tx_to + description: "address where the bundler send the transaction" + - &gas_symbol + name: gas_symbol + description: "the gas symbol paied for the transaction" + - &tx_fee + name: tx_fee + description: "the bundler paied gas value for the transaction" + - &tx_fee_usd + name: tx_fee_usd + description: "the bundler paied gas (in usd) value for the transaction" + - *beneficiary + + - name: account_abstraction_erc4337_b3_account_deployed + meta: + blockchain: b3 + sector: erc4337 + project: erc4337 + contributors: 0xbitfly + config: + tags: ["b3", "erc4337", "account", "abstraction", "entrypoint"] + description: "erc4337 account deployed on b3" + columns: + - *blockchain + - *version + - *block_time + - *block_month + - *userop_hash + - *entrypoint_contract + - *tx_hash + - *sender + - *paymaster + - &factory + name: factory + description: "who can create a new AA Wallet. It's smart contract address" \ No newline at end of file diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/account_abstraction/erc4337/b3/account_abstraction_erc4337_b3_account_deployed.sql b/dbt_subprojects/hourly_spellbook/models/_sector/account_abstraction/erc4337/b3/account_abstraction_erc4337_b3_account_deployed.sql new file mode 100644 index 00000000000..acefb0e8cbe --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/account_abstraction/erc4337/b3/account_abstraction_erc4337_b3_account_deployed.sql @@ -0,0 +1,54 @@ +{{ config( + alias = 'account_deployed', + schema = 'account_abstraction_erc4337_b3', + partition_by = ['block_month'], + materialized = 'incremental', + file_format = 'delta', + incremental_strategy = 'merge', + unique_key = ['userop_hash', 'tx_hash'], + post_hook='{{ expose_spells(\'["b3"]\', + "project", + "erc4337", + \'["0xbitfly"]\') }}' +)}} + +{% set erc4337_base_models = [ + ref('account_abstraction_erc4337_b3_v0_6_account_deployed'), + ref('account_abstraction_erc4337_b3_v0_7_account_deployed') +] %} + +SELECT + blockchain + , version + , block_time + , block_month + , userop_hash + , entrypoint_contract + , tx_hash + , sender + , paymaster + , factory +FROM ( + {% for erc4337_model in erc4337_base_models %} + SELECT + blockchain + , version + , block_time + , block_month + , userop_hash + , entrypoint_contract + , tx_hash + , sender + , paymaster + , factory + FROM {{ erc4337_model }} + + {% if is_incremental() %} + WHERE {{ incremental_predicate('block_time') }} + {% endif %} + + {% if not loop.last %} + UNION ALL + {% endif %} + {% endfor %} +) \ No newline at end of file diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/account_abstraction/erc4337/b3/account_abstraction_erc4337_b3_userops.sql b/dbt_subprojects/hourly_spellbook/models/_sector/account_abstraction/erc4337/b3/account_abstraction_erc4337_b3_userops.sql new file mode 100644 index 00000000000..f758280628b --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/account_abstraction/erc4337/b3/account_abstraction_erc4337_b3_userops.sql @@ -0,0 +1,35 @@ +{{ config( + alias = 'userops', + schema = 'account_abstraction_erc4337_b3', + partition_by = ['block_month'], + materialized = 'incremental', + file_format = 'delta', + incremental_strategy = 'merge', + unique_key = ['userop_hash', 'tx_hash'], + post_hook='{{ expose_spells(\'["b3"]\', + "project", + "erc4337", + \'["0xbitfly"]\') }}' +)}} + +{% set chain = 'b3' %} +{% set gas_symbol = 'B3' %} +{% set wrapped_gas_address = '0x4200000000000000000000000000000000000006' %} -- Need to update with actual wrapped gas token address +{% set deployed_date = '2023-02-15' %} + +{% set erc4337_models = [ + ref('account_abstraction_erc4337_b3_v0_6_userops_basics'), + ref('account_abstraction_erc4337_b3_v0_7_userops_basics') +] %} + +{{ + erc4337_userops_enrichments( + blockchain = 'b3', + base_models = erc4337_models, + wrapped_gas_address = wrapped_gas_address, + gas_symbol = gas_symbol, + deployed_date = deployed_date, + transactions_model = source('b3', 'transactions'), + prices_model = source('prices','usd') + ) +}} \ No newline at end of file diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/account_abstraction/erc4337/b3/account_abstraction_erc4337_b3_v0_6_account_deployed.sql b/dbt_subprojects/hourly_spellbook/models/_sector/account_abstraction/erc4337/b3/account_abstraction_erc4337_b3_v0_6_account_deployed.sql new file mode 100644 index 00000000000..0cff93a2921 --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/account_abstraction/erc4337/b3/account_abstraction_erc4337_b3_v0_6_account_deployed.sql @@ -0,0 +1,17 @@ +{{ config( + alias = 'v0_6_account_deployed', + schema = 'account_abstraction_erc4337_b3', + partition_by = ['block_month'], + materialized = 'incremental', + file_format = 'delta', + incremental_strategy = 'merge', + unique_key = ['userop_hash', 'tx_hash'] +)}} + +{{ + erc4337_account_deployed( + blockchain = 'b3', + version = 'v0.6', + account_deployed_evt_model = source('erc4337_b3','EntryPoint_v0_6_evt_AccountDeployed') + ) +}} \ No newline at end of file diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/account_abstraction/erc4337/b3/account_abstraction_erc4337_b3_v0_6_userops_basics.sql b/dbt_subprojects/hourly_spellbook/models/_sector/account_abstraction/erc4337/b3/account_abstraction_erc4337_b3_v0_6_userops_basics.sql new file mode 100644 index 00000000000..1fe209c4bf0 --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/account_abstraction/erc4337/b3/account_abstraction_erc4337_b3_v0_6_userops_basics.sql @@ -0,0 +1,24 @@ +{{ config( + alias = 'v0_6_userops_basics', + schema = 'account_abstraction_erc4337_b3', + partition_by = ['block_month'], + materialized = 'incremental', + file_format = 'delta', + incremental_strategy = 'merge', + unique_key = ['userop_hash', 'tx_hash'] +)}} + +{% set chain = 'b3' %} +{% set gas_symbol = 'B3' %} +{% set wrapped_gas_address = '0x4200000000000000000000000000000000000006' %} -- Need to update with actual wrapped gas token address +{% set version = 'v0.6' %} +{% set deployed_date = '2023-02-15' %} + +{{ + erc4337_userops_basics( + blockchain = 'b3', + version = 'v0.6', + userops_evt_model = source('erc4337_b3','EntryPoint_v0_6_evt_UserOperationEvent'), + handleops_call_model = source('erc4337_b3', 'EntryPoint_v0_6_call_handleOps') + ) +}} \ No newline at end of file diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/account_abstraction/erc4337/b3/account_abstraction_erc4337_b3_v0_7_account_deployed.sql b/dbt_subprojects/hourly_spellbook/models/_sector/account_abstraction/erc4337/b3/account_abstraction_erc4337_b3_v0_7_account_deployed.sql new file mode 100644 index 00000000000..d9ee9b26438 --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/account_abstraction/erc4337/b3/account_abstraction_erc4337_b3_v0_7_account_deployed.sql @@ -0,0 +1,17 @@ +{{ config( + alias = 'v0_7_account_deployed', + schema = 'account_abstraction_erc4337_b3', + partition_by = ['block_month'], + materialized = 'incremental', + file_format = 'delta', + incremental_strategy = 'merge', + unique_key = ['userop_hash', 'tx_hash'] +)}} + +{{ + erc4337_account_deployed( + blockchain = 'b3', + version = 'v0.7', + account_deployed_evt_model = source('erc4337_b3','EntryPoint_v0_7_evt_AccountDeployed') + ) +}} \ No newline at end of file diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/account_abstraction/erc4337/b3/account_abstraction_erc4337_b3_v0_7_userops_basics.sql b/dbt_subprojects/hourly_spellbook/models/_sector/account_abstraction/erc4337/b3/account_abstraction_erc4337_b3_v0_7_userops_basics.sql new file mode 100644 index 00000000000..880adf2a130 --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/account_abstraction/erc4337/b3/account_abstraction_erc4337_b3_v0_7_userops_basics.sql @@ -0,0 +1,24 @@ +{{ config( + alias = 'v0_7_userops_basics', + schema = 'account_abstraction_erc4337_b3', + partition_by = ['block_month'], + materialized = 'incremental', + file_format = 'delta', + incremental_strategy = 'merge', + unique_key = ['userop_hash', 'tx_hash'] +)}} + +{% set chain = 'b3' %} +{% set gas_symbol = 'B3' %} +{% set wrapped_gas_address = '0x4200000000000000000000000000000000000006' %} -- Need to update with actual wrapped gas token address +{% set version = 'v0.7' %} +{% set deployed_date = '2023-02-15' %} + +{{ + erc4337_userops_basics( + blockchain = 'b3', + version = 'v0.7', + userops_evt_model = source('erc4337_b3','EntryPoint_v0_7_evt_UserOperationEvent'), + handleops_call_model = source('erc4337_b3', 'EntryPoint_v0_7_call_handleOps') + ) +}} \ No newline at end of file diff --git a/sources/_base_sources/evm/b3_base_sources.yml b/sources/_base_sources/evm/b3_base_sources.yml new file mode 100644 index 00000000000..dfcdb22788d --- /dev/null +++ b/sources/_base_sources/evm/b3_base_sources.yml @@ -0,0 +1,427 @@ +version: 2 + +sources: + # B3 Tables + - name: b3 + description: "raw tables for the chain" + + tables: + - name: transactions + meta: + docs_slug: /evm/b3/raw/transactions + short_description: The transactions table contains detailed information about transactions on the network. + description: '{{ doc("b3_transactions_doc") }}' + + columns: + - &block_date + name: block_date + description: "The UTC date of the block in which this transaction was included" + - &block_time + name: block_time + description: "The exact UTC timestamp when the block containing this transaction was added to the chain" + - &value + name: value + description: "Amount of ETH sent from sender to recipient (if any), measured in wei (1 ETH = 10^18 wei)" + - &block_number + name: block_number + description: "The sequential number of the block containing this transaction" + - name: gas_limit + description: "Maximum number of gas units this transaction can consume" + - name: gas_price + description: "Price per unit of gas for this transaction, denominated in wei (1 gwei = 10^9 wei)" + - name: gas_used + description: "Actual amount of gas units consumed by this transaction's execution" + - name: max_fee_per_gas + description: "Maximum total amount per gas unit the initiator is willing to pay, including base fee and priority fee" + - name: max_priority_fee_per_gas + description: "Maximum additional fee per gas unit the initiator is willing to pay as a tip to validators" + - name: base_fee_per_gas + description: "Minimum fee per gas unit required for transaction inclusion" + - name: nonce + description: "Sequential number representing the count of transactions sent from the sender's address" + - name: index + description: "Position of this transaction within its containing block" + - &success + name: success + description: "Boolean flag indicating whether the transaction executed successfully (true) or failed (false)" + - &from + name: from + description: "Address of the account that initiated and signed this transaction" + - &to + name: to + description: "Address of the recipient account or contract for this transaction" + - &block_hash + name: block_hash + description: "Unique 256-bit identifier (hash) of the block containing this transaction" + - name: data + description: "Input data for the transaction, which may include function calls or contract interaction data" + - name: hash + description: "Unique 256-bit identifier (hash) of this specific transaction" + - name: type + description: "Type of transaction (e.g., legacy, EIP-1559) indicating its structure and fee mechanism" + - name: access_list + description: "List of addresses and storage keys the transaction plans to access, used for gas optimization in EIP-2930 transactions" + - name: effective_gas_price + description: "Actual price per gas unit paid for this transaction, calculated post-execution" + + - name: traces + meta: + docs_slug: /evm/b3/raw/traces + short_description: The traces table contains information about traces on the network. + description: '{{ doc("b3_traces_doc") }}' + columns: + - *block_date + - *block_time + - *block_number + - *value + - name: gas + description: "Amount of gas allocated for this trace's execution (including gas used by child traces)" + - name: gas_used + description: "Actual amount of gas consumed by this trace's execution" + - *block_hash + - name: success + description: "Boolean flag indicating whether this specific trace was executed successfully (true) or reverted (false)" + - &tx_index + name: tx_index + description: "Position of the parent transaction within its containing block" + - name: subtraces + description: "Number of child traces spawned by this trace during execution" + - name: error + description: "Error message or code if the trace execution failed" + - name: tx_success + description: "Boolean flag indicating whether the parent transaction of this trace was successful" + - &tx_hash + name: tx_hash + description: "Unique 256-bit identifier (hash) of the parent transaction" + - name: from + description: "address that sent this trace" + - name: to + description: "address that received this trace" + - name: trace_address + description: "Array indicating the exact position of this trace within the trace tree of the transaction" + - name: type + description: "Type of trace (e.g., call, create, suicide) indicating the nature of the operation" + - name: address + description: "If this trace is a contract creation, this is the address of the deployed contract" + - name: code + description: "If this trace is a contract creation, this is the deployed bytecode of contract" + - name: call_type + description: "Type of call made in this trace (e.g., call, delegatecall, staticcall)" + - name: input + description: "call data provided to this trace, often containing function signatures and parameters" + - name: output + description: "Data returned by this trace after execution" + - name: refund_address + description: "address designated to receive any gas refund from this trace" + + - name: traces_decoded + meta: + docs_slug: /evm/b3/decoded/traces_decoded + short_description: The `b3.traces_decoded` table contains decoded traces, including additional information based on submitted smart contracts and their ABIs. + description: '{{ doc("b3_traces_decoded_doc") }}' + columns: + - *block_date + - *block_time + - *block_number + - *tx_hash + - name: contract_name + description: "Human-readable name of the smart contract involved in this trace" + - name: function_name + description: "Name of the specific contract function called in this trace" + - name: namespace + description: "Categorical grouping or project name associated with the contract" + - name: signature + description: "8 byte function signature used to identify the function" + - name: to + description: "address of the contract or account receiving this trace" + - name: trace_address + description: "Array indicating the exact position of this trace within the trace tree of the transaction" + + - name: logs + meta: + docs_slug: /evm/b3/raw/logs + short_description: The `b3.logs` table contains information about event logs emitted by smart contracts on the b3 blockchain. + description: '{{ doc("b3_logs_doc") }}' + columns: + - *block_date + - *block_time + - *block_number + - *block_hash + - *tx_index + - *tx_hash + - name: contract_address + description: "Address of the smart contract that emitted this log" + - name: topic0 + description: "First 32-byte topic, typically containing the event signature hash" + - name: topic1 + description: "Second 32-byte topic, often containing indexed event parameters" + - name: topic2 + description: "Third 32-byte topic, often containing indexed event parameters" + - name: topic3 + description: "Fourth 32-byte topic, often containing indexed event parameters" + - name: data + description: "ABI-encoded data of the log, containing non-indexed event parameters" + - name: index + description: "Position of this log within the block" + + - name: logs_decoded + meta: + docs_slug: /evm/b3/decoded/logs_decoded + short_description: The `b3.logs_decoded` table contains a subset of all logs for which Dune has the ABI. + description: '{{ doc("b3_logs_decoded_doc") }}' + columns: + - *block_date + - *block_time + - *block_number + - *tx_hash + - name: index + description: "Position of this log within the block" + - name: contract_address + description: "Address of the smart contract that emitted this log" + - name: namespace + description: "Categorical grouping or project name associated with the contract" + - name: contract_name + description: "name of the smart contract that emitted this log" + - name: event_name + description: "Name of the event emitted in this log" + - name: signature + description: "Topic0 hash of the event signature" + + - name: blocks + meta: + docs_slug: /evm/b3/raw/blocks + short_description: The `b3.blocks` table contains information about b3 blocks. Each row represents a single block. + description: '{{ doc("b3_blocks_doc") }}' + columns: + - name: base_fee_per_gas + description: "Minimum fee per gas unit required for transaction inclusion in this block in the b3 unit wei" + - name: difficulty + description: "Measure of how difficult it was to produce this block" + - name: total_difficulty + description: "Total chain difficulty up to this block" + - name: gas_limit + description: "Maximum amount of gas that can be used by all transactions in this block" + - name: gas_used + description: "Total amount of gas actually consumed by all transactions in this block" + - name: hash + description: "Unique 256-bit identifier (hash) of this block" + - name: miner + description: "Address of the validator who produced this block" + - name: nonce + description: "A block's nonce value, used in the consensus mechanism" + - name: number + description: "Sequential position of this block in the blockchain" + - name: parent_hash + description: "Hash of the previous block in the blockchain" + - name: size + description: "Size of this block in bytes" + - name: time + description: "Timestamp when this block was added to the chain" + + - name: contracts + meta: + docs_slug: /evm/b3/raw/contracts + short_description: The `b3.contracts` table tracks decoded contracts on b3, including associated metadata such as namespace, name, address, ABI. It is populated manually by the Dune Community via [contract decoding submissions](https://dune.com/contracts/new). + description: '{{ doc("b3_contracts_doc") }}' + columns: + - name: abi_id + description: "Unique identifier for the contract's ABI. This is used to identify the contract across all chains." + - name: abi + description: "JSON representation of the contract's Application Binary Interface (ABI)" + - name: address + description: "Address of the deployed contract" + - name: from + description: "Address that deployed this contract. Can be a contract or EOA." + - name: code + description: "Bytecode of the contract at the time of creation" + - name: name + description: "Name assigned to the contract" + - name: namespace + description: "Categorical grouping or project name associated with the contract" + - name: dynamic + description: "Boolean indicating if this contract was submitted to Dune with the 'dynamic' flag enabled. If yes, our decoder will search for exact matches of the contract's bytecode and decode them into the same namespace as the initial contract." + - name: b3 + description: "Boolean indicating if this is a manual individual submission of a contract." + - name: factory + description: "Boolean indicating if this submission was submitted to Dune with the 'factory' flag enabled. If yes, our decoder will search for contract's deployed by the same factory and decode them into the same namespace as the initial contract." + - name: detection_source + description: "Method used to detect and decode this contract: 'factory', 'b3', or 'dynamic'. " + - name: created_at + description: "Timestamp of when this contract was first decoded on Dune. This is not the contract creation timestamp." + + - name: creation_traces + meta: + docs_slug: /evm/b3/raw/creation_traces + short_description: The `b3.creation_traces` table contains information about contract creation traces on the b3 blockchain. It includes details about newly created contracts, their creators, and the contract code. + description: '{{ doc("b3_creation_traces_doc") }}' + columns: + - *block_time + - *block_number + - *tx_hash + - name: address + description: "Address of the contract created" + - name: from + description: "Address that created this contract. Can be a contract or EOA." + - name: code + description: "Deployed bytecode of the contract" + + # ERC Transfer Tables + - name: erc20_b3 + description: "Transfer events for ERC20 tokens on b3" + tables: + - name: evt_transfer + meta: + docs_slug: /evm/b3/decoded/interfaces/erc20/evt_transfer + short_description: This table contains individual transfer events for ERC20 tokens on the b3 blockchain. Each row represents a single token transfer event. + description: '{{ doc("erc20_b3_evt_transfer_doc") }}' + columns: + - name: contract_address + description: "Address of the ERC20 token contract that emitted this event" + - &evt_tx_hash + name: evt_tx_hash + description: "Hash of the transaction containing this event" + - &evt_index + name: evt_index + description: "Index position of this event within the transaction" + - &evt_block_time + name: evt_block_time + description: "Timestamp of the block containing this event" + - &evt_block_number + name: evt_block_number + description: "The block number containing this event" + - *from + - *to + - name: value + description: "Amount of ERC20 tokens transferred, in the token's b3 unit" + + - name: evt_approval + meta: + docs_slug: /evm/b3/decoded/interfaces/erc20/evt_approval + short_description: The `b3.evt_approval` table contains approval events for ERC20 tokens on b3, allowing an address to spend tokens on behalf of the owner. + description: '{{ doc("erc20_b3_evt_approval_doc") }}' + columns: + - name: contract_address + description: "Address of the ERC20 token contract" + - *evt_tx_hash + - *evt_index + - *evt_block_time + - *evt_block_number + - name: owner + description: "address of the token owner granting approval" + - name: spender + description: "address being granted permission to spend tokens" + - name: value + description: "Amount of ERC20 tokens approved for spending, in the token's smallest unit" + + - name: erc1155_b3 + description: "events related to ERC1155 tokens" + tables: + - name: evt_transfersingle + meta: + docs_slug: /evm/b3/decoded/interfaces/erc1155/evt_transfersingle + short_description: This table contains single transfer events for ERC1155 tokens on the network. + description: '{{ doc("erc1155_b3_evt_transfersingle_doc") }}' + columns: + - name: contract_address + description: "address of the ERC1155 token contract" + - *evt_tx_hash + - *evt_index + - *evt_block_time + - *evt_block_number + - name: operator + description: "the address that is authorized to execute the transfer on behalf of the owner" + - *from + - *to + - 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/b3/decoded/interfaces/erc1155/evt_transferbatch + short_description: This table contains all batch transfer events for ERC1155 tokens on the network. + description: '{{ doc("erc1155_b3_evt_transferbatch_doc") }}' + columns: + - name: contract_address + description: "Contract address of the ERC1155 token contract" + - *evt_tx_hash + - *evt_index + - *evt_block_time + - *evt_block_number + - name: operator + description: "Contract address authorized to execute the batch transfer on behalf of the owner" + - *from + - *to + - 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/b3/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_b3_evt_ApprovalForAll_doc") }}' + columns: + - name: contract_address + description: "b3 address of the ERC1155 token contract" + - *evt_tx_hash + - *evt_index + - *evt_block_time + - *evt_block_number + - &approved + name: approved + description: "Boolean indicating whether approval is granted (true) or revoked (false)" + - &owner + name: owner + description: "b3 address of the token owner granting or revoking approval" + - name: operator + description: "b3 address being granted or revoked permission to operate all tokens" + + - name: erc721_b3 + description: '{{ doc("erc721_b3_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" + - *evt_tx_hash + - *evt_index + - *evt_block_time + - *evt_block_number + - *from + - *to + - name: tokenId + description: "Unique identifier of the ERC721 token (NFT) being transferred" + - name: evt_Approval + meta: + docs_slug: /evm/b3/decoded/interfaces/erc721/evt_Approval + short_description: "Approval events for ERC721 tokens on this network" + description: '{{ doc("erc721_b3_evt_Approval_doc") }}' + columns: + - name: contract_address + description: "Contract address of the ERC721 token contract" + - *evt_tx_hash + - *evt_index + - *evt_block_time + - *evt_block_number + - *approved + - *owner + - name: tokenId + description: "Unique identifier of the ERC721 token (NFT) for which approval is granted or revoked" + - name: evt_ApprovalForAll + meta: + docs_slug: /evm/b3/decoded/interfaces/erc721/evt_ApprovalForAll + short_description: The `b3.evt_ApprovalForAll` table contains approval events for all tokens of an ERC721 contract on the b3 blockchain. + description: '{{ doc("erc721_b3_evt_ApprovalForAll_doc") }}' + columns: + - name: contract_address + description: "Address of the ERC721 token contract" + - *evt_tx_hash + - *evt_index + - *evt_block_time + - *evt_block_number + - *approved + - *owner + - name: operator + description: "The address being granted or revoked permission to operate all tokens" diff --git a/sources/_base_sources/evm/b3_docs_block.md b/sources/_base_sources/evm/b3_docs_block.md new file mode 100644 index 00000000000..19557e5b7c3 --- /dev/null +++ b/sources/_base_sources/evm/b3_docs_block.md @@ -0,0 +1,221 @@ +{% docs b3_transactions_doc %} + +The `b3.transactions` table contains detailed information about transactions on the b3 blockchain. It includes: + +- Block information: number, timestamp, hash +- Transaction details: hash, from_address, to_address, value +- Gas data: gas_price, gas_limit, gas_used +- Status: success or failure +- Input data for contract interactions +- Nonce +- Transaction type + +This table is used for analyzing transaction patterns, gas usage, value transfers, and overall network activity on b3. + +{% enddocs %} + +{% docs b3_traces_doc %} + +The `b3.traces` table contains records of execution steps for transactions on the b3 blockchain. Each trace represents an atomic operation that modifies the state of the Ethereum Virtual Machine (EVM). Key components include: + +- Transaction hash +- Block number and timestamp +- From and to addresses +- Value transferred +- Input data +- Gas used +- Error information (if applicable) + +This table is used for analyzing transaction execution paths, internal contract calls, and state changes within the b3 network. + +{% enddocs %} + +{% docs b3_traces_decoded_doc %} + +The `b3.traces_decoded` table contains a subset of decoded traces from the b3 blockchain dependent on submitted smart contracts and their ABIs. It includes: + +- All fields from the `b3.traces` table +- Decoded function names and signature (first four bytes of the calldata) +- the contract name and schema name we have decoded the function call to + +This table is used for high level analysis of smart contract interactions. For fully decoded function calls and parameters, refer to decoded tables such as `uniswap_v3_b3.UniswapV3Pool_call_Swap`. + +{% enddocs %} + +{% docs b3_logs_doc %} + +The `b3.logs` table contains event logs emitted by smart contracts on the b3 blockchain. It includes: + +- Block number and timestamp +- Transaction hash +- Contract address +- Topic hashes +- Raw data + +This table is used for tracking contract events and state changes on the b3 network. + +{% enddocs %} + +{% docs b3_logs_decoded_doc %} + +The `b3.logs_decoded` table contains a subset of decoded logs from the b3 blockchain dependent on submitted smart contracts and their ABIs. It includes: + +- All fields from the `b3.logs` table +- Decoded event names and signature (topic0 of the log) +- the contract name and schema name we have decoded the event to + +This table is used for high level analysis of smart contract events. For fully decoded events and parameters, refer to decoded tables such as `erc20_b3.UniswapV3Pool_evt_Swap`. + +{% enddocs %} + +{% docs b3_blocks_doc %} + +The `b3.blocks` table contains information about b3 blocks. It provides essential data about each block in the b3 blockchain, including timestamps, gas metrics, and block identifiers. This table is fundamental for analyzing blockchain structure, block production rates, and overall network performance. + +{% enddocs %} + +{% docs b3_contracts_doc %} + +The `b3.contracts` table tracks all contracts that have been submitted to Dune for decoding. It includes: + +- metadata about the contract, including its name and namespace +- the contract address + +{% enddocs %} + +{% docs b3_creation_traces_doc %} + +The `b3.creation_traces` table contains data about contract creation events on the b3 blockchain. It includes: + +- Block number and timestamp +- Transaction hash +- Creator's address +- Created contract address +- deployed contract bytecode +- Gas used for deployment + +This table is used for analyzing contract deployment patterns and tracking the origin of smart contracts on the b3 network. It's essentially a filtered version of the `b3.traces` table for the condition that `type = create`. + +{% enddocs %} + +{% docs erc20_b3_evt_transfer_doc %} + +The `erc20_b3.evt_transfer` table contains Transfer events for ERC20 tokens on the b3 blockchain. It includes: + +- Block number and timestamp +- Transaction hash +- Contract address +- From and to addresses +- Amount transferred + +This table is used for tracking ERC20 token movements on the b3 network. + +Please be aware that this table is the raw ERC20 event data, and does not include any additional metadata, context or is in any way filtered or curated. Use `tokens.transfers` for a more complete and curated view of token transfers. + +{% enddocs %} + +{% docs erc20_b3_evt_approval_doc %} + +The `erc20_b3.evt_approval` table contains Approval events for ERC20 tokens on the b3 blockchain. It includes: + +- Block number and timestamp +- Transaction hash +- Contract address +- Owner and spender addresses +- Approved amount + +This table is used for analyzing ERC20 token approvals and spending permissions on the b3 network. + +{% enddocs %} + +{% docs erc1155_b3_evt_transfersingle_doc %} + +The `erc1155_b3.evt_transfersingle` table contains TransferSingle events for ERC1155 tokens on the b3 blockchain. It includes: + +- Block number and timestamp +- Transaction hash +- Contract address +- Operator, from, and to addresses +- Token ID +- Amount transferred + +This table is used for tracking individual ERC1155 token transfers on the b3 network. + +Please be aware that this table is the raw ERC1155 event data, and does not include any additional metadata, context or is in any way filtered or curated. Use `nft.transfers` for a more complete and curated view of NFT transfers. + +{% enddocs %} + +{% docs erc1155_b3_evt_transferbatch_doc %} + +The `erc1155_b3.evt_transferbatch` table contains TransferBatch events for ERC1155 tokens on the b3 blockchain. It includes: + +- Block number and timestamp +- Transaction hash +- Contract address +- Operator, from, and to addresses +- Array of token IDs +- Array of amounts transferred + +This table is used for tracking batch transfers of multiple ERC1155 tokens on the b3 network. + +Please be aware that this table is the raw ERC1155 event data, and does not include any additional metadata, context or is in any way filtered or curated. Use nft.transfers for a more complete and curated view of NFT transfers. + +{% enddocs %} + +{% docs erc1155_b3_evt_ApprovalForAll_doc %} + +The `erc1155_b3.evt_ApprovalForAll` table contains ApprovalForAll events for ERC1155 tokens on the b3 blockchain. It includes: + +- Block number and timestamp +- Transaction hash +- Contract address +- Account and operator addresses +- Approved status (boolean) + +This table is used for analyzing blanket approvals for ERC1155 token collections on the b3 network. + +{% enddocs %} + +{% docs erc721_b3_evt_transfer_doc %} + +The `erc721_b3.evt_transfer` table contains Transfer events for ERC721 tokens on the b3 blockchain. It includes: + +- Block number and timestamp +- Transaction hash +- Contract address +- From and to addresses +- Token ID + +This table is used for tracking ERC721 token (NFT) transfers on the b3 network. + +Please be aware that this table is the raw ERC721 event data, and does not include any additional metadata, context or is in any way filtered or curated. Use `nft.transfers` for a more complete and curated view of NFT transfers. + +{% enddocs %} + +{% docs erc721_b3_evt_Approval_doc %} + +The `erc721_b3.evt_Approval` table contains Approval events for ERC721 tokens on the b3 blockchain. It includes: + +- Block number and timestamp +- Transaction hash +- Contract address +- Owner and approved addresses +- Token ID + +This table is used for analyzing approvals for individual ERC721 tokens (NFTs) on the b3 network. + +{% enddocs %} + +{% docs erc721_b3_evt_ApprovalForAll_doc %} + +The `erc721_b3.evt_ApprovalForAll` table contains ApprovalForAll events for ERC721 tokens on the b3 blockchain. It includes: + +- Block number and timestamp +- Transaction hash +- Contract address +- Owner and operator addresses +- Approved status (boolean) + +This table is used for analyzing blanket approvals for ERC721 token collections on the b3 network. + +{% enddocs %} \ No newline at end of file diff --git a/sources/account_abstraction/erc4337/b3/account_abstraction_erc4337_b3_sources.yml b/sources/account_abstraction/erc4337/b3/account_abstraction_erc4337_b3_sources.yml new file mode 100644 index 00000000000..9be6b87af88 --- /dev/null +++ b/sources/account_abstraction/erc4337/b3/account_abstraction_erc4337_b3_sources.yml @@ -0,0 +1,30 @@ +version: 2 + +sources: + - name: erc4337_b3 + description: > + Decoded tables related to erc4337. + tables: + - name: EntryPoint_v0_6_evt_UserOperationEvent + description: > + Decoded table related to the erc4337 user operation events version v0.6. + + - name: EntryPoint_v0_6_call_handleOps + description: > + Decoded table related to the erc4337 handle operation calls, version v0.6. + + - name: EntryPoint_v0_6_evt_AccountDeployed + description: > + Decoded table related to the erc4337 account deployed events, version v0.6. + + - name: EntryPoint_v0_7_evt_UserOperationEvent + description: > + Decoded table related to the erc4337 user operation events version v0.7. + + - name: EntryPoint_v0_7_call_handleOps + description: > + Decoded table related to the erc4337 handle operation calls, version v0.7. + + - name: EntryPoint_v0_7_evt_AccountDeployed + description: > + Decoded table related to the erc4337 account deployed events, version v0.7. \ No newline at end of file