Afonso_DiazSmart Contracts Balances
Updated 2024-04-15
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
deposit as (
select
to_address as contract_address,
sum(amount) as increase_volume
from blast.core.ez_native_transfers
group by 1
),
withdraw as (
select
from_address as contract_address,
sum(amount) as decrease_volume
from blast.core.ez_native_transfers
group by 1
),
contract_address_list as (
select
to_address as contract_address,
tx_hash as creation_tx_hash
from blast.core.fact_traces
where type in ('CREATE')
and identifier = 'CREATE_ORIGIN'
and tx_status = 'SUCCESS'
and contract_address is not null
and trace_status = 'SUCCESS'
),
balances as (
select
contract_address,
increase_volume - nvl(decrease_volume, 0) as balance_eth
from deposit
left join withdraw
QueryRunArchived: QueryRun has been archived