rajsUntitled Query
Updated 2022-08-18Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
›
⌄
SELECT
tokenflow_eth.hextoint(topics[2])::integer as token_id,
origin_from_address as trader,
tokenflow_eth.hextoint(substr(data,3,64)) as is_open,
tokenflow_eth.hextoint(substr(data,67,64)) as is_long,
tokenflow_eth.hextoint(substr(data,131,64)) / pow(10,18) as amount,
tokenflow_eth.hextoint(substr(data,195,64)) / pow(10,18) as total_cost,
tokenflow_eth.hextoint(substr(data,259,64)) / pow(10,18) as total_fee,
tokenflow_eth.hextoint(substr(data,323,64)) / pow(10,18) as swap_fee,
*
-- distinct origin_function_signature
from optimism.core.fact_event_logs
-- where tx_hash = '0xbfec11c9758b95c933385185b4ec52282bcdbf19329c1f9f877387081c571b10'
where origin_to_address = '0xcce7819d65f348c64b7beb205ba367b3fe33763b'
and topics[0] = '0xf74837aa66b0393a1c687b44e30275519696e95458ad4a8bf7657e2364a73450'
and origin_function_signature = '0x8bc36969'
order by block_timestamp desc
-- limit 1
Run a query to Download Data