testteam-internalNekodex User Creation events copy
Updated 2024-09-04Copy Reference Fork
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
›
⌄
-- forked from Sandesh / Nekodex User Creation events @ https://flipsidecrypto.xyz/Sandesh/q/lxzfhXNeVY9m/nekodex-user-creation-events
with swappers as (
select
block_number,
block_timestamp,
tx_hash,
to_address as user_address,
'trader' as type
from
optimism.core.fact_traces
where
1 = 1
and block_timestamp >= '2024-04-12'
and identifier = 'CREATE2_0_0_0_0'
and from_address = '0x6723b44abeec4e71ebe3232bd5b455805badd22f'
and TX_STATUS = 'SUCCESS'
),
only_claimers as (
select
block_number,
block_timestamp,
tx_hash,
('0x' || substr(topics [2], -40)) as user_address,
'claimer' as type
from
optimism.core.fact_event_logs
where
1 = 1
and block_timestamp >= '2024-04-12'
and topics [0] = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'
and topics [1] = '0x0000000000000000000000006a2aad2e20ef62b5b56e4e2b5e342e53ee7fa04f'
and user_address not in (
select
address
from
QueryRunArchived: QueryRun has been archived