mboveiriOP 3
Updated 2022-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
26
27
28
29
30
31
32
33
34
35
36
›
⌄
with claimers as
(
select
origin_from_address as user,
round(raw_amount/1e18) as amount_claimed,
case when round(raw_amount/1e18) = 777 then 'Optimism Users'
when round(raw_amount/1e18) = 2469 then 'Repeat Optimism Users'
when round(raw_amount/1e18) = 272 then 'DAO Voters'
when round(raw_amount/1e18) = 1190 then 'Multisig Signers'
when round(raw_amount/1e18) = 556 then 'Gitcoin Donors'
when round(raw_amount/1e18) = 409 then 'Users Priced Out of Ethereum'
else 'Overlap Bonuses' end as cat
from optimism.core.fact_token_transfers
where origin_to_address = '0xfedfaf1a10335448b7fa0268f56d2b44dbd357de'
and contract_address = '0x4200000000000000000000000000000000000042'
and origin_function_signature = '0x2e7ba6ef'
),
rec as (
select
to_address as user,
sum(raw_amount/1e18) as amount_recieved
from optimism.core.fact_token_transfers
where to_address in (select user from claimers)
and contract_address = '0x4200000000000000000000000000000000000042'
group by 1
),
send as (
select
from_address as user,
sum(raw_amount/1e18) as amount_send
from optimism.core.fact_token_transfers
where from_address in (select user from claimers)
and contract_address = '0x4200000000000000000000000000000000000042'
group by 1
)
Run a query to Download Data