Afonso_DiazTotal
Updated 2025-03-16
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
pricet as (
select
hour::date as date,
avg(price) as token_price_usd
from
avalanche.price.ez_prices_hourly
where
token_address = '0x6e84a6216ea6dacc71ee8e6b0a5b7322eebc0fdd'
group by 1
),
txns as (
select
tx_hash,
block_timestamp,
origin_from_address as user,
decoded_log:value / 1e18 as amount,
iff(decoded_log:from = user, 'Stake', 'Unstake') as event_name,
'Avalanche' as chain
from
avalanche.core.ez_decoded_event_logs
where
event_name = 'Transfer'
and origin_to_address = '0x1a731b2299e22fbac282e7094eda41046343cb51'
and tx_status = 'SUCCESS'
and user in (decoded_log:from, decoded_log:to)
and contract_address = '0x6e84a6216ea6dacc71ee8e6b0a5b7322eebc0fdd'
and amount > 0
union all
select
tx_hash,
block_timestamp,