rajs1. Hop Protocol by Asset
Updated 2022-06-18
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 raw_table as
(
SELECT
event_inputs:chainId as chain_id,
case when origin_to_address = '0x3d4cc8a61c7528fd86c55cfe061a78dcba48edd1' then 'DAI'
when origin_to_address = '0xb8901acb165ed027e32754e0ffe830802919727f' then 'WETH'
when origin_to_address = '0x22b1cbb8d98a01a3b71d034bb899775a76eb1cc2' then 'MATIC'
when origin_to_address = '0x3666f603cc164936c1b87e207f36beba4ac5f18a' then 'USDC'
when origin_to_address = '0x3e4a3a4796d16c0cd582c382691998f7c06420b6' then 'USDT'
when origin_to_address = '0xb98454270065a31d71bf635f6f7ee6a518dfb849' then 'WBTC'
end as symbol,
case when origin_to_address = '0x3d4cc8a61c7528fd86c55cfe061a78dcba48edd1' then '18'
when origin_to_address = '0xb8901acb165ed027e32754e0ffe830802919727f' then '18'
when origin_to_address = '0x22b1cbb8d98a01a3b71d034bb899775a76eb1cc2' then '18'
when origin_to_address = '0x3666f603cc164936c1b87e207f36beba4ac5f18a' then '6'
when origin_to_address = '0x3e4a3a4796d16c0cd582c382691998f7c06420b6' then '6'
when origin_to_address = '0xb98454270065a31d71bf635f6f7ee6a518dfb849' then '8'
end as decimals,
event_inputs:amount as raw_amount,
block_timestamp,
origin_from_address,
tx_hash
from ethereum.core.fact_event_logs
where origin_to_address in
(
'0x3d4cc8a61c7528fd86c55cfe061a78dcba48edd1', --DAI
'0xb8901acb165ed027e32754e0ffe830802919727f', --ETH
'0x22b1cbb8d98a01a3b71d034bb899775a76eb1cc2', --MATIC
'0x3666f603cc164936c1b87e207f36beba4ac5f18a', --USDC
'0x3e4a3a4796d16c0cd582c382691998f7c06420b6', -- USDT
'0xb98454270065a31d71bf635f6f7ee6a518dfb849' --WBTC
)
and event_name = 'TransferSentToL2'
and block_timestamp >= CURRENT_DATE - interval '180 days'
)
,
Run a query to Download Data