Flipside TeamShare of relock users
    Updated 2024-07-13
    with t1 as (select
    'veOLAS' as action,
    BLOCK_TIMESTAMP::date as day,
    ACCOUNT_ADDRESS as locker,
    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 locker,
    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'
    ),

    t2 as (select
    'relock veOLAS' as action,
    BLOCK_TIMESTAMP,
    ACCOUNT_ADDRESS as relocker,
    OLAS_AMOUNT


    from crosschain.olas.ez_olas_locking
    where EVENT_NAME = 'Deposit'
    and BLOCK_TIMESTAMP >= '2023-07-01'
    and ACCOUNT_ADDRESS in (select locker from t1)
    union all
    QueryRunArchived: QueryRun has been archived