Query editor
-- Monthly Ethereum DA fees through the Dencun transition.-- Single continuous series for the ATIA delisting memo chart.-- Pre-Dencun: calldata fees from 7 major L2 batcher addresses.-- Post-Dencun: all Ethereum blob fees, entire blob layer.WITH l2_batchers AS (SELECT batcher FROM UNNEST(ARRAY[0x6887246668a3b87f54deb3b94ba47a6f63f32985,0x5050f69a9786f081509234f1a7f4684b5e5b76c9,0xff00000000000000000000000000000000000010,0x0d3250c3d5facb74ac15834096397a3ef790ec99,0xc1b634853cb333d3ad8663715b08f41a3aec47cc,0xcf2898225ed05be911d3709d9417e86e0b4cfc8f,0x2c169dfe5fbba12957bdd0ba47d9cedbfe260ca7]) AS t(batcher)),pre_dencun_calldata AS (SELECTDATE_TRUNC('month', t.block_date) AS month,SUM(CAST(t.gas_used AS DOUBLE) * CAST(t.gas_price AS DOUBLE)) / 1e18 AS fees_ethFROM ethereum.transactions tINNER JOIN l2_batchers b ON t."from" = b.batcherWHERE t.block_date >= DATE '2024-01-01'AND t.block_date < DATE '2024-03-13'GROUP BY DATE_TRUNC('month', t.block_date)),post_dencun_blob_txs AS (SELECTt.block_date,t.hash,CAST(CARDINALITY(t.blob_versioned_hashes) AS DOUBLE) * 131072.0 AS blob_gas_used_dblFROM ethereum.transactions tWHERE t.block_date >= DATE '2024-03-13'AND CARDINALITY(t.blob_versioned_hashes) > 0),post_dencun_blob_prices AS (SELECTblock_date,tx_hash,CAST(MAX(blob_gas_price) AS DOUBLE) AS blob_gas_price_dblFROM ethereum.logsWHERE block_date >= DATE '2024-03-13'AND blob_gas_price > 0GROUP BY block_date, tx_hash),post_dencun_daily AS (SELECTb.block_date,SUM(b.blob_gas_used_dbl * COALESCE(p.blob_gas_price_dbl, 0)) / 1e18 AS fees_ethFROM post_dencun_blob_txs bLEFT JOIN post_dencun_blob_prices pON b.hash = p.tx_hash AND b.block_date = p.block_dateGROUP BY b.block_date),post_dencun_monthly AS (