purifrotten-amethyst
    Updated 2024-10-02
    with badge_minters as (
    select
    decoded_log ['to'] as minter,
    min_by(tx_hash,BLOCK_TIMESTAMP) as first_badge
    from berachain.testnet.fact_decoded_event_logs
    where
    CONTRACT_ADDRESS = lower('0x886D2176D899796cD1AfFA07Eff07B9b2B80f1be')
    and decoded_log ['from'] = lower('0x0000000000000000000000000000000000000000')
    group by 1
    )
    select minter, first_badge, NONCE from badge_minters m
    join berachain.testnet.fact_transactions t on lower(t.TX_HASH)=lower(m.first_badge)
    where nonce <= 2
    QueryRunArchived: QueryRun has been archived