Query editor
with transfers AS (SELECTblockchain,evt_block_time,tr."from" AS address,- CAST(tr.value AS DOUBLE)/1e18 AS amount,contract_addressFROM evms.erc20_transfers trWHERE "from" not in ( 0x0000000000000000000000000000000000000000)and contract_address = 0x14778860e937f509e651192a90589de711fb88a9AND CAST(tr.value AS DOUBLE) > 0and blockchain in ('optimism','ethereum', 'bnb')UNION ALLSELECTblockchain,evt_block_time,tr."to" AS address,CAST(tr.value AS DOUBLE)/1e18 AS amount,contract_addressFROM evms.erc20_transfers trWHERE "to" not in ( 0x0000000000000000000000000000000000000000)and contract_address = 0x14778860e937f509e651192a90589de711fb88a9AND CAST(tr.value AS DOUBLE) > 0and blockchain in ('optimism','ethereum', 'bnb')),current_balances as(selectblockchain,address,sum(amount) current_balancefrom transfersgroup by 1,2 ),----LABELSall_logs as(select 'polygon' as chain, contract_address, block_time, topic0, topic1, topic2, topic3, data, tx_hashfrom polygon.logswhere block_number >= 45145069UNION ALLselect 'optimism' as chain, contract_address, block_time, topic0, topic1, topic2, topic3, data, tx_hashfrom optimism.logswhere block_number >= 107603860),account_deployments_logs as(select*,substr(a.topic2, 13) sender,substr(a.data, 13,20) factory,substr(a.data, 33+13,20) paymasterfrom all_logs awhere 1=1and topic0 = 0xd51a9c61267aa6196961883ecf5ff2da6619c37dac0fa92122513fb32c032d2d --AccountDeployedand contract_address = 0x5ff137d4b0fdcd49dca30c7cf57e578a026d2789