Query editor
WITH nitro_arb_initiated AS (SELECTtx_hash AS init_tx_hash,block_time AS init_time,bytearray_substring(topic1, 13, 20) AS destination, -- indexed: recipient on L1bytearray_to_uint256(topic3) AS position, -- indexed: join keybytearray_to_uint256(bytearray_substring(data, 129, 32)) AS callvalue_wei -- 5th word in data (see layout below)-- data word layout (32 bytes each, 1-indexed byte offsets):-- bytes 1-32 : caller (offset 1)-- bytes 33-64 : arbBlockNum (offset 33)-- bytes 65-96 : ethBlockNum (offset 65)-- bytes 97-128 : timestamp (offset 97)-- bytes 129-160: callvalue (offset 129) <- ETH amount, in wei-- bytes 161+ : dynamic `data` field (calldata to execute on L1)FROM arbitrum.logsWHERE contract_address = 0x0000000000000000000000000000000000000064 -- ArbSysAND topic0 = 0x3e7aafa77dbf186b7fd488006beff893744caa3c4f6f299e8a709fa2087374fc -- L2ToL1Tx (Nitro)),nitro_finalized AS (-- ONLY the current Nitro Outbox. Its 3rd event field is hardcoded zero-- and the data word ("transactionIndex") is the real, globally-unique-- join value, confirmed 1:1 against `position` (both range ~[0,164160)-- per Dune, 2026-07-26). Do NOT add the classic Outbox addresses here ---- see caveat #1 for why that corrupts results.SELECT bytearray_to_uint256(bytearray_substring(data, 1, 32)) AS transaction_indexFROM ethereum.logsWHERE contract_address = 0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840 -- Outbox (current, Nitro)AND topic0 = 0x20af7f3bbfe38132b8900ae295cd9c8d1914be7052d061a511f3f728dab18964 -- OutBoxTransactionExecuted),classic_arb_initiated AS (-- Pre-Nitro ArbSys's L2ToL1Transaction event. 83,565 of these exist-- on-chain (confirmed via Dune, 2026-07-26) and were previously entirely-- unscanned by this file.-- IMPORTANT (2026-07-26, real user-caught bug): `indexInBatch` here is-- NOT the Outbox's Merkle-path `index` used at claim time -- confirmed-- via a real matched pair (tx 0xc9166c81..., L2 event indexInBatch=6 vs-- the actual L1 claim's index=57, same withdrawal proven via 5 other-- exactly-matching fields). An earlier version of this file joined on-- (batch_number, indexInBatch) and produced a false "still unclaimed"-- for a withdrawal that was ACTUALLY CLAIMED -- the 3-pair "spot check"-- that seemed to confirm that join was a coincidental integer match,-- not a real one (batch/index values are dense small integers on both-- sides, so accidental collisions are common). Fixed below by joining-- on the same fields the contract's own `calculateItemHash` uses to-- build the Merkle leaf (destination/destAddr, arbBlockNum/l2Block,-- ethBlockNum/l1Block, timestamp, callvalue/amount) -- pulled from the-- L1 claim's CALLDATA (not its event, which doesn't carry these-- fields), and verified byte-for-byte against the real tx above.SELECTtx_hash AS init_tx_hash,block_time AS init_time,bytearray_substring(topic1, 13, 20) AS destination,bytearray_to_uint256(topic3) AS batch_number, -- indexed: join key part 1bytearray_to_uint256(bytearray_substring(data, 65, 32)) AS arb_block_num, -- join key part 2bytearray_to_uint256(bytearray_substring(data, 97, 32)) AS eth_block_num, -- join key part 3bytearray_to_uint256(bytearray_substring(data, 129, 32)) AS l2_timestamp, -- join key part 4bytearray_to_uint256(bytearray_substring(data, 161, 32)) AS callvalue_wei -- join key part 5-- data word layout for the classic event (1-indexed byte offsets):