vilppunumber_of_games_entered
    Updated 2024-05-07
    /*
    Get all game entries. Does not exclude cancels.
    - PTB rollovers
    - PTB entries
    - Moon and Doom entries (ETH and BTC).
    - YOLO entries and rollovers.
    */
    with games_entered as (
    select distinct
    block_timestamp,
    tx_hash,
    event_index as index,
    origin_from_address as user_address,
    'PokeTheBear' as type,
    array_size(decoded_log['rollovers'][0]['rolledOverRoundIds']) as number_of_rounds,
    from blast.core.ez_decoded_event_logs where contract_address = lower('0x0000000000acc01064aa5280da3f1c41a35827bc')
    and event_name = 'DepositsRolledOver'
    and tx_status = 'SUCCESS'
    union all
    select distinct
    block_timestamp,
    tx_hash,
    event_index as index,
    origin_from_address as user_address,
    'PokeTheBear' as type,
    cast(decoded_log['numberOfRounds'] as integer) as number_of_rounds,
    from blast.core.ez_decoded_event_logs where contract_address = lower('0x0000000000acc01064aa5280da3f1c41a35827bc')
    and event_name = 'RoundsEntered'
    and tx_status = 'SUCCESS'
    union all
    select distinct
    block_timestamp,
    tx_hash,
    event_index as index,
    origin_from_address as user_address,
    'MoonOrDoom' as type,
    QueryRunArchived: QueryRun has been archived