testteam-internalNekodex User Creation events copy
    Updated 2024-09-04
    -- 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