Query editor
with arb_l2_treasury_timelock_traces as(select block_time, block_number, value, gas, gas_used, success, tx_index, sub_traces, error, tx_success, tx_hash, "from" -- address that inititaed the trace, to -- address what receied the trace, trace_address -- all returned traces, gives exact location in the call trace, "type" -- type of trace, address -- address of the trace creator, call_type, input -- input data for the trace, output ---output data for the tracefrom arbitrum.traceswherecall_type not in ('delegatecall','callcode','staticcall')--and tx_hash in (0x48a9f1c9a0aac642279f2bb9a9946083540ca69231739fefb869a4b249f62202, 0xaffc8e0aaa4cb4f212431990132e0e45cfbe9ceebfac1c8f63972fc1f1717445, 0x1d13f8035d437e191cfa1210c9920a521942f86aba22de6e5c9afa6d6e9801a5)-- and block_number in (205516988,205516762 ,192358159)and "from" in (0x2E041280627800801E90E9Ac83532fadb6cAd99A,0x32e7AF5A8151934F3787d0cD59EB6EDd0a736b1d,0xbF5041Fc07E1c866D15c749156657B8eEd0fb649) -- these are l1 surplus fee , l2 surplus fee , l2 base fee contracts which collect the fees, and every now and thenand to = 0xbfc1feca8b09a5c5d3effe7429ebe24b9c09ef58 --l2 treasury timelock)select *, sum(eth_amt) over(order by block_time) as eth_amt_cumufrom (select block_time as block_time , count(distinct tx_hash) as no_tx, sum(value)/1e18 as eth_amtfrom arb_l2_treasury_timelock_tracesgroup by 1)order by 1 desc-- on the 2nd trace of each tx, when the to = l2 treasury timelock address , take the value as the amount of eth-- we restrict to 'call' call_type only as 'call' typically are the type that can transfer eth-- 0x2E041280627800801E90E9Ac83532fadb6cAd99A l1 surplus fee ---- 0x32e7AF5A8151934F3787d0cD59EB6EDd0a736b1d l2 surplus fee -- 0x32e7AF5A8151934F3787d0cD59EB6EDd0a736b1d-- 0xbF5041Fc07E1c866D15c749156657B8eEd0fb649 l2 base fee ---- 0xbFc1FECa8B09A5c5D3EFfE7429eBE24b9c09EF58 l2 treasury timelock