210 rows today at 7:58 AM
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
37
38
39
40
with
'0xae7ab96520de3a18e5e111b5eaab095312d7fe84' as steth,
'0xd15a672319cf0352560ee76d9e89eab0889046d3' as burner,
'0x0000000000000000000000000000000000000000' as nil,
'Transfer(address,address,uint256)' as sig_transfer,
'StETHBurnt(bool,uint256,uint256)' as sig_burnt,
minted as (
select
date_trunc('week', timestamp) as time,
sum(sum(input_2_value_uint256)) over (order by time) as amount
from
evm_events_ethereum_mainnet
where
address = steth
and signature = sig_transfer
and input_0_value_address = nil
group by
time
),
burnt as (
select
date_trunc('week', timestamp) as time,
sum(sum(input_1_value_uint256)) over (order by time) as amount
from
evm_events_ethereum_mainnet
where
address = burner
and signature = sig_burnt
group by
time
)
select
minted.time as chart_x,
token_usd_amount('ethereum', 'mainnet', steth, chart_x, minted.amount - burnt.amount) as chart_y
from
minted left join burnt on minted.time = burnt.time
order by
minted.time