Query editor
-- In this query we'll pull data from all EVM blockchains available in Dune & with traces table-- EVM chains left out due to non-availability: Astar zkEVM, Aurora, Blast, BTTC, Boba, Canto, Chiliz, Conflux eSpace,-- Core DAO, Cronos, EOS, EVMOS, Filecoin, Gravity, Hedera, Horizen EON, Injective inEVM, Iota, KCC, Kava,-- LightLink Phoenix, Merlin, Meter, Neon, OpBNB, Ronin, Sei EVM, Shimmer, Taiko, Viction, WEMIX, ZKFair, zetachain.-- EVM chains left out due to not having traces table: Manta and Parallel.-- Moreover, we are using total transaction costs in usd instead of ETH or other token because each blockchain has it's-- own gas token.withall_traces as (select'Base' as blockchain,'ETH' as gas_token,traces.block_time,(try_cast(transactions.gas_used as uint256) * try_cast(transactions.gas_price as uint256)) as gas_paid_native_tokenfrom base.tracesjoin base.transactionson traces.tx_hash = transactions.hashwhere traces.successand traces.to = 0x8250f4aF4B972684F7b336503E2D6dFeDeB1487aunion allselect'Optimism' as blockchain,'ETH' as gas_token,traces.block_time,(try_cast(transactions.gas_used as uint256) * try_cast(transactions.gas_price as uint256)) as gas_paid_native_tokenfrom optimism.tracesjoin optimism.transactionson traces.tx_hash = transactions.hashwhere traces.successand traces.to = 0xff1a0f4744e8582DF1aE09D5611b887B6a12925Cunion allselect'Arbitrum' as blockchain,'ETH' as gas_token,traces.block_time,(try_cast(transactions.gas_used as uint256) * try_cast(transactions.gas_price as uint256)) as gas_paid_native_tokenfrom arbitrum.tracesjoin arbitrum.transactionson traces.tx_hash = transactions.hashwhere traces.successand traces.to = 0xff1a0f4744e8582DF1aE09D5611b887B6a12925Cunion allselect'BNB' as blockchain,'BNB' as gas_token,traces.block_time,(try_cast(transactions.gas_used as uint256) * try_cast(transactions.gas_price as uint256)) as gas_paid_native_tokenfrom bnb.tracesjoin bnb.transactionson traces.tx_hash = transactions.hashwhere traces.successand traces.to = 0x4D7E825f80bDf85e913E0DD2A2D54927e9dE1594