Query editor
-- BTC.b: show tx-level vs event-level addresses side-by-sideWITH t AS (SELECTevt_block_time,evt_tx_hash,contract_address AS token_contract, -- the token that emitted the event (BTC.b)"from" AS token_from, -- event-level: tokens moved out of this address"to" AS token_to, -- event-level: tokens moved into this addressvalue AS value_rawFROM erc20_avalanche_c.evt_transferWHERE contract_address = 0x152b9d0fdc40c096757f570a51e494bd4b943e50 -- BTC.bAND evt_block_time >= NOW() - INTERVAL '1' day)SELECTt.evt_block_time,t.evt_tx_hash,tx."from" AS tx_sender, -- tx-level: who started the transactiontx."to" AS tx_to, -- tx-level: the first contract calledt.token_from,t.token_to,t.token_contract,t.value_raw,CAST(t.value_raw AS DOUBLE)/1e8 AS amount_btc_b,CASEWHEN tx."to" = t.token_contract AND tx."from" = t.token_fromTHEN 'direct transfer()'ELSE 'via router/contract'END AS patternFROM tJOIN avalanche_c.transactions txON tx.hash = t.evt_tx_hashORDER BY t.evt_block_time DESCLIMIT 50;