kasadeghUntitled Query
Updated 2022-11-30
999
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 Across_Bridges as
(
select block_timestamp,
tx_hash,
regexp_substr_all(SUBSTR(DATA, 3, len(DATA)), '.{64}') as Segmented_Data,
ethereum.public.udf_hex_to_int(Segmented_Data[0]) / pow(10,18) as amount,
ethereum.public.udf_hex_to_int(Segmented_Data[1]) as originChainId,
ethereum.public.udf_hex_to_int(Segmented_Data[2]) as destinationChainId,
origin_from_address,
origin_to_address,
contract_address,
event_inputs
from ethereum.core.fact_event_logs
where origin_to_address = lower('0x4D9079Bb4165aeb4084c526a32695dCfd2F77381')
and contract_address = lower('0x4D9079Bb4165aeb4084c526a32695dCfd2F77381')
and origin_from_address not in ('0x428ab2ba90eba0a4be7af34c9ac451ab061ac010','0xf7bac63fc7ceacf0589f25454ecf5c2ce904997c')
and tx_status = 'SUCCESS'
),
Across_Transfer as (
select block_timestamp,
tx_hash,
symbol,
amount,
amount_usd
from ethereum.core.ez_token_transfers
where tx_hash in (select distinct(tx_hash) from Across_Bridges)
union ALL
select block_timestamp,
tx_hash,
'ETH' as symbol,
amount,
amount_usd
from ethereum.core.ez_eth_transfers
Run a query to Download Data