cypherOP airdrop actions
Updated 2023-04-06
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 op_claims as (select
date_trunc('day', block_timestamp) as day,
tx_hash,
to_address as claimer,
raw_amount/1e18 as amount
from optimism.core.fact_token_transfers
where contract_address = lower('0x4200000000000000000000000000000000000042') --OP token
and from_address = lower('0xfedfaf1a10335448b7fa0268f56d2b44dbd357de') --claim contract
),
total_claimed as (select
distinct(claimer) as unique_claimer,
sum(amount) as total_claimed
from op_claims
group by unique_claimer),
sushi_sells as (select
origin_from_address as seller,
sum(amount_in) as sell_amount
from optimism.sushi.ez_swaps
where origin_from_address in (select unique_claimer from total_claimed)
and token_in = lower('0x4200000000000000000000000000000000000042')
and block_timestamp > '2022-05-31 23:45:00'
group by seller
),
transfers as ( select
from_address as sender,
sum(raw_amount/1e18) as op_amount
from optimism.core.fact_token_transfers
where contract_address = lower('0x4200000000000000000000000000000000000042')
and from_address in (select unique_claimer from total_claimed)
and block_timestamp > '2022-05-31 23:45:00'
group by sender
),
Run a query to Download Data