Pine AnalyticsBlast Stablecoin 1
Updated 2024-10-05
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 tab1 as (
-- Burn
select
date_trunc('day', block_timestamp) as Date,
sum(case when symbol like 'MUSD' then -1.3*amount else -1*amount end) as amount
from blast.core.ez_token_transfers
where contract_address in ('0x4300000000000000000000000000000000000003', '0xeb466342c4d449bc9f53a865d5cb90586f405215',
'0x4fee793d435c6d2c10c135983bb9d6d4fc7b9bbd', '0x837fe561e9c5dfa73f607fda679295dbc2be5e40',
'0x5d3a1ff2b6bab83b63cd9ad0787074081a52ef34')
and to_address = '0x0000000000000000000000000000000000000000'
group by 1
UNION ALL
-- mint
select
date_trunc('day', block_timestamp) as Date,
sum(case when symbol like 'MUSD' then 1.3*amount else amount end) as amount
from blast.core.ez_token_transfers
where contract_address in ('0x4300000000000000000000000000000000000003', '0xeb466342c4d449bc9f53a865d5cb90586f405215',
'0x4fee793d435c6d2c10c135983bb9d6d4fc7b9bbd', '0x837fe561e9c5dfa73f607fda679295dbc2be5e40',
'0x5d3a1ff2b6bab83b63cd9ad0787074081a52ef34')
and from_address = '0x0000000000000000000000000000000000000000'
group by 1
)
, tab2 as (
select
Date,
sum(amount) as Net_Amount
from tab1
group by 1
)
SELECT
QueryRunArchived: QueryRun has been archived