Flipside Teamrelock new+2
    Updated 2024-07-13
    -- any wallet which has tokens before the cut off 1st July 2023 is part of the founding member group.
    -- So it makes sense to only consider those wallets for the relock questions, as it then answers the questions
    -- people have around founding members behaviour wrt selling/holding the token

    with t1 as (select
    'veOLAS' as action,
    BLOCK_TIMESTAMP::date as day,
    ACCOUNT_ADDRESS,
    OLAS_AMOUNT


    from crosschain.olas.ez_olas_locking
    where EVENT_NAME = 'Deposit'
    and BLOCK_TIMESTAMP < '2023-07-01'
    union all

    select
    'buOLAS' as action,
    BLOCK_TIMESTAMP::date as day,
    DECODED_LOG:account as ACCOUNT_ADDRESS,
    DECODED_LOG:amount/1e18 as OLAS_AMOUNT
    from ethereum.core.ez_decoded_event_logs
    where CONTRACT_ADDRESS = '0xb09ccf0dbf0c178806aaee28956c74bd66d21f73' -- buOLAS
    and TOPICS[0] = '0x0e31f07bae79135368ff475cf6c7f6abb31e0fd731e03c18ad425bd9406cf0c0'
    and EVENT_NAME = 'Lock'
    and BLOCK_TIMESTAMP < '2023-07-01'
    ),

    final as (
    select
    BLOCK_TIMESTAMP,
    tx_hash,
    ACCOUNT_ADDRESS,
    OLAS_AMOUNT
    from crosschain.olas.ez_olas_locking
    where EVENT_NAME = 'Deposit'
    QueryRunArchived: QueryRun has been archived