mondovmints
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
›
⌄
-- ggAVAX 0xA25EaF2906FA1a3a13EdAc9B9657108Af7B703e3
-- sAVAX 0x2b2c81e08f1af8835a78bb2a90ae924ace0ea4be
-- yyAVAX 0x6026a85e11bd895c934af02647e8c7b4ea2d9808
-- ankrAVAX 0xc3344870d52688874b06d844E0C36cc39FC727F6
with ggAVAX as (
SELECT
'ggAVAX' as token,
-- to_address,
sum(decoded_log:assets/pow(10,18)) as amount,
date_trunc('week', block_timestamp) as date,
sum(amount) over (order by date) as cumu_ggAVAX,
cumu_ggAVAX - COALESCE(cumu_ggAVAX, 0) AS ggAVAX_weekly_growth
FROM avalanche.core.ez_decoded_event_logs
WHERE contract_address = lower('0xA25EaF2906FA1a3a13EdAc9B9657108Af7B703e3')
AND event_name = 'Deposit'
GROUP BY date
),
sAVAX as (
SELECT
'sAVAX' as token,
-- to_address,
sum(decoded_log:amount/pow(10,18)) as amount,
date_trunc('week', block_timestamp) as date,
sum(amount) over (order by date) as cumu_sAVAX,
cumu_sAVAX - COALESCE(cumu_sAVAX, 0) AS sAVAX_weekly_growth
FROM avalanche.core.ez_decoded_event_logs
WHERE contract_address = lower('0x2b2c81e08f1af8835a78bb2a90ae924ace0ea4be')
AND event_name = 'Deposit'
GROUP BY date
),
yyAVAX as (
SELECT
'yyAVAX' as token,
Run a query to Download Data