Query editor
/* 1inch Crosschain Swaps with Token Amounts and USD Values=========================================================Event Signatures:- Source Escrow Creation = 0x0e534c62f0afd2fa0f0fa71198e8aa2d549f24daf2bb47de0d5486c7ce9288ca- Destination Escrow Creation = 0xc30e111dcc74fddc2c3a4d98ffb97adec4485c0a687946bf5b22c2a99c7ff96d- Canceled Escrow = 0x6e3be9294e58d10b9c8053cfd5e09871b67e442fe394d6b0870d336b9df984a9- Withdrawn Escrow = 0xe346f5c97a360db5188bfa5d3ec5f0583abde420c6ba4d08b6cfe61addc17105Source escrow creation parameters (ABI-encoded):orderHash, hashlock, maker, taker, token, amount, safetyDeposit, timelocks, destinationRecipientABI Layout (32-byte aligned, 1-indexed offsets):- Offset 1-32: orderHash (bytes32)- Offset 33-64: hashlock (bytes32)- Offset 65-96: maker (address, padded - actual address at 77-96)- Offset 97-128: taker (address, padded)- Offset 129-160: token (address, padded - actual address at 141-160)- Offset 161-192: amount (uint256)- Offset 193-224: safetyDeposit (uint256)- Offset 225+: timelocks + destinationRecipient*/WITH/* ------------------------------------------------------------------1) Pull ALL relevant logs just once------------------------------------------------------------------ */logs_of_interest AS (SELECTl.blockchain,l.tx_hash,l.topic0,l.contract_address,l.data,l.block_dateFROM evms.logs lWHEREl.block_date > timestamp '{{start_date}}'AND l.topic0 IN (0x0e534c62f0afd2fa0f0fa71198e8aa2d549f24daf2bb47de0d5486c7ce9288ca, -- source escrow create0xc30e111dcc74fddc2c3a4d98ffb97adec4485c0a687946bf5b22c2a99c7ff96d, -- destination escrow create0x6e3be9294e58d10b9c8053cfd5e09871b67e442fe394d6b0870d336b9df984a9, -- canceled0xe346f5c97a360db5188bfa5d3ec5f0583abde420c6ba4d08b6cfe61addc17105 -- withdrawn)),/* ------------------------------------------------------------------2) Pull Source Escrow Creations with token and amount------------------------------------------------------------------ */source_escrows AS (SELECTli.blockchain,li.tx_hash,t.address AS source_escrow_address,li.block_date,/* Standard fields */VARBINARY_SUBSTRING(li.data, 1, 32) AS orderHash,VARBINARY_SUBSTRING(li.data, 33, 32) AS hashlock,VARBINARY_SUBSTRING(li.data, 77, 20) AS maker,VARBINARY_SUBSTRING(li.data, 269, 20) AS DestRecipient,