Query editor
with arb_cu as (selectblock_time,hash,substring(data from 17 for 20) as token_address,substring(data from 49 for 20) as to_address,bytearray_to_int256(substring(data from 69 for 32))/1e18 as cu_amountfrom arbitrum.transactionswhere to = 0x22cca5dc96a4ac1ec32c9c7c5ad4d66254a24c35and substring(data from 1 for 4) = 0xd2ce7d65and substring(data from 17 for 20) = 0x89c49a3fa372920ac23ce757a029e6936c0b8e02 --cu tokenand block_time > cast('2024-03-01' as timestamp)),xai_fees as (selectevt_tx_hash as hash,value/1e18 as xai_feefrom erc20_arbitrum.evt_transferwhere evt_tx_hash in (selecthashfrom arb_cu)and contract_address = 0x4Cb9a7AE498CEDcBb5EAe9f25736aE7d428C9D66and to = 0xae21fda3de92de2fdaf606233b2863782ba046f9 --bridge fee transfer, this is later transfered to another address)selecta.*,x.xai_fee as xai_feefrom arb_cu aleft join xai_fees x on a.hash = x.hashorder by block_time