freemartianYour BasePaint Earning
Updated 2023-11-07
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
›
⌄
with brush_mints as (
SELECT
nft_to_address as Brush_minter,
count(tx_hash) * 0.0026 as Brush_Cost
from base.core.ez_nft_transfers
where event_type = 'mint'
and nft_address = '0xd68fe5b53e7e1abeb5a4d0a6660667791f39263a'
group by 1),
Paints as (
select
to_address as Painter,
sum(eth_value) as earning
from base.core.fact_traces
WHERE from_address = '0xba5e05cb26b78eda3a2f8e3b3814726305dcac83'
and identifier != 'CALL_ORIGIN'
and to_address = '0xd32ff954ff23caa08573f248a267cf6ddf6db10b'
group by Painter)
select Painter, earning - Brush_Cost
from paints, brush_mints
where Painter = '0xd32ff954ff23caa08573f248a267cf6ddf6db10b'
Run a query to Download Data