Query editor
-- Shared CTE: RequestGasRefunded events (decoded from raw logs)-- Dune: TODO-- Tables: sonic.logs-- Used by: 09, 10---- Decodes RequestGasRefunded(uint256 indexed requestId, address indexed refundee, uint256 gasRefunded, bool refundedSuccessfully)-- from raw logs because this event is not yet indexed on Dune.---- When indexed tables become available, replace this query body with:-- SELECT * FROM paintswap_sonic.paintswapvrfcoordinator_evt_requestgasrefunded---- Contract: PaintswapVRFCoordinator 0x6E3efcB244e74Cb898A7961061fAA43C3cf79691-- Event sig: 0x6bb13b9f50296b838313f2acf49df683d924326c275a148dfb7871b356e4bc41WITH request_gas_refunded AS (SELECTblock_time AS evt_block_time,block_number AS evt_block_number,tx_hash AS evt_tx_hash,bytearray_to_uint256(topic1) AS requestId,CAST(topic2 AS varbinary) AS refundee,bytearray_to_uint256(substr(data, 1, 32)) AS gasRefunded,substr(data, 64, 1) = 0x01 AS refundedSuccessfullyFROM sonic.logsWHERE contract_address = 0x6E3efcB244e74Cb898A7961061fAA43C3cf79691AND topic0 = 0x6bb13b9f50296b838313f2acf49df683d924326c275a148dfb7871b356e4bc41)SELECT * FROM request_gas_refunded