0xHaM-d#2 Receivers Interaction
Updated 2023-02-20
999
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 Airdrop1 as (
SELECT
event_inputs:recipient as wallet1,
sum(event_inputs:amount/1e18) as claimed_amount
from
optimism.core.fact_event_logs
where
origin_to_address = '0xfedfaf1a10335448b7fa0268f56d2b44dbd357de'
and origin_function_signature = '0x2e7ba6ef'
and event_name = 'Claimed'
and tx_status = 'SUCCESS'
GROUP by 1
)
, Airdrop2 as (
SELECT
To_ADDRESS as wallet,
sum(RAW_AMOUNT/1e18) as amt
FROM optimism.core.fact_token_transfers
WHERE ORIGIN_FROM_ADDRESS = '0x5bc45d36577df70a7865c1d8af47cdf7db3efbd8'
AND ORIGIN_TO_ADDRESS = '0xbe9a9b1b07f027130e56d8569d1aea5dd5a86013'
AND CONTRACT_ADDRESS = '0x4200000000000000000000000000000000000042'
AND To_ADDRESS NOT IN (SELECT wallet1 FROM Airdrop1)
GROUP by 1
)
, stakeTb as (
SELECT
DELEGATOR as usr,
COUNT(DISTINCT TX_HASH) as tx_cnt
FROM optimism.core.fact_delegations
WHERE DELEGATOR IN (SELECT wallet FROM Airdrop2)
GROUP by 1
)
, swapTb as (
SELECT
ORIGIN_FROM_ADDRESS as usr,
COUNT(DISTINCT TX_HASH) as tx_cnt
Run a query to Download Data