Arioop standard bridge in - where are they used?
Updated 2023-01-06Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
with bridge as (
select
BLOCK_TIMESTAMP,
'ETH' as Symbol,
TX_HASH,
ORIGIN_FROM_ADDRESS,
AMOUNT_USD
from ethereum.core.ez_eth_transfers
where 1=1
and ETH_TO_ADDRESS = '0x99c9fc46f92e8a1c0dec1b1747d010903e884be1'
and AMOUNT_USD is not null
union ALL
select
BLOCK_TIMESTAMP,
Symbol,
TX_HASH,
ORIGIN_FROM_ADDRESS,
AMOUNT_USD
from ethereum.core.ez_token_transfers
where 1=1
and TO_ADDRESS = '0x99c9fc46f92e8a1c0dec1b1747d010903e884be1'
and AMOUNT_USD is not null
),
used as (
select
f.block_timestamp,
f.tx_hash,
f.event_name,
f.origin_from_address,
row_number() over (partition by f.ORIGIN_FROM_ADDRESS order by f.block_timestamp asc) as r
from optimism.core.fact_event_logs f join bridge b
on f.origin_from_address = b.origin_from_address
and f.block_timestamp > b.block_timestamp
qualify r <= 1
Run a query to Download Data