Afonso_DiazMint
Updated 2024-12-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
ggavax_main as (
select
tx_hash,
block_timestamp,
decoded_log:assets / 1e18 as amount_avax,
decoded_log:shares / 1e18 as amount_share,
origin_from_address as user,
case event_name
when 'Deposit' then 'Mint'
when 'Withdraw' then 'Redeem'
end as event_name,
'ggAVAX' as protocol
from avalanche.core.ez_decoded_event_logs
where
event_name in ('Deposit', 'Withdraw')
and contract_address = '0xa25eaf2906fa1a3a13edac9b9657108af7b703e3'
and tx_hash in (select distinct tx_hash from avalanche.core.ez_decoded_event_logs where '0x0000000000000000000000000000000000000000' in (decoded_log:from, decoded_log:to) and event_name = 'Transfer')
),
savax_main as (
select
tx_hash,
block_timestamp,
decoded_log:avaxAmount / 1e18 as amount_avax,
decoded_log:shareAmount / 1e18 as amount_share,
origin_from_address as user,
case event_name
when 'Submitted' then 'Mint'
when 'Redeem' then 'Redeem'
end as event_name,
'sAVAX' as protocol
from
avalanche.core.ez_decoded_event_logs
where
event_name in ('Submitted', 'Redeem')
and contract_address = '0x2b2c81e08f1af8835a78bb2a90ae924ace0ea4be'
QueryRunArchived: QueryRun has been archived