Query editor
-- Shared CTE: Actual oracle gas costs from fulfillment transactions-- Dune: TODO-- Tables: paintswap_sonic.paintswapvrfcoordinator_evt_randomwordsfulfilled-- sonic.transactions-- Used by: 09, 10---- Gets the real gas cost paid by the oracle for each fulfillment transaction-- by joining fulfillment events with sonic.transactions.---- Visualization: Area chart-- Title: Daily Oracle Gas Costs-- X-axis: day-- Y-axis: oracle_gas_s-- Secondary: fulfillment_txsWITH fulfillment_txs AS (SELECT DISTINCT evt_tx_hash AS tx_hashFROM paintswap_sonic.paintswapvrfcoordinator_evt_randomwordsfulfilled),daily_oracle_gas AS (SELECTdate_trunc('day', t.block_time) AS day,COUNT(*) AS fulfillment_txs,CAST(SUM(CAST(t.gas_used AS DOUBLE) * CAST(t.gas_price AS DOUBLE)) / 1e18 AS DECIMAL(38,6)) AS oracle_gas_sFROM sonic.transactions tINNER JOIN fulfillment_txs ft ON t.hash = ft.tx_hashGROUP BY 1)SELECT * FROM daily_oracle_gas ORDER BY day