BlockTrackerVolume Growth % [30 D]
Updated 2024-05-06
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 swap_data as (
select
block_number,
block_timestamp,
tx_hash,
event_index,
contract_address,
decoded_log : fromAssetId :: string as "fromAssetId",
decoded_log : toAssetId :: string as "toAssetId",
decoded_log : fromAmount :: int as "fromAmount",
decoded_log : toAmount :: int as "toAmount",
decoded_log : receiver :: string as receiver,
decoded_log : transactionId :: string as "transactionId"
from base.core.ez_decoded_event_logs
where event_name = 'LiFiGenericSwapCompleted'
and decoded_log:integrator :: string = 'jumper.exchange'
and block_timestamp::date >= '2023-08-19'
)
, result as (
select s.* ,
case when s."fromAssetId" = '0x0000000000000000000000000000000000000000' then 'ETH' else b.symbol end as from_symbol,
case when s."toAssetId" = '0x0000000000000000000000000000000000000000' then 'ETH' else c.symbol end as to_symbol,
case when s."fromAssetId" = '0x0000000000000000000000000000000000000000' then s."fromAmount" / pow(10, 18) else s."fromAmount" / pow(10, b.decimals) end as from_amount,
case when s."toAssetId" = '0x0000000000000000000000000000000000000000' then s."toAmount" / pow(10, 18) else s."toAmount" / pow(10, c.decimals) end as to_amount
from swap_data s
left join base.price.ez_asset_metadata b ON s."fromAssetId" = b.token_address
left join base.price.ez_asset_metadata c ON s."toAssetId" = c.token_address
)
,
prices as (
select
date_trunc('hour', hour) as date,
symbol,
QueryRunArchived: QueryRun has been archived