Updated 2024-07-02
    with all_data as (
    select
    event_name,
    block_timestamp,
    tx_hash,
    origin_from_address,
    '0x4300000000000000000000000000000000000003' as token_address,
    DECODED_LOG : amount :: int /pow(10, 18) as amount
    from blast.core.ez_decoded_event_logs
    where contract_address = '0x4a1d9220e11a47d8ab22ccd82da616740cf0920a'
    and event_name IN ('Deposit', 'Withdraw')
    and block_timestamp::date >= '2024-02-29'
    and tx_status = 'SUCCESS'
    union all
    select
    event_name,
    block_timestamp,
    tx_hash,
    origin_from_address,
    '0x4300000000000000000000000000000000000004' as token_address,
    DECODED_LOG : amount :: int / pow(10, 18) as amount
    from blast.core.ez_decoded_event_logs
    where contract_address = '0x44f33bc796f7d3df55040cd3c631628b560715c2'
    and event_name IN ('Deposit', 'Withdraw')
    and block_timestamp::date >= '2024-02-29'
    and tx_status = 'SUCCESS'
    union all
    select
    case when event_name = 'CollateralDeposit' then 'Deposit' else 'Withdraw' end as event_name,
    block_timestamp,
    tx_hash,
    origin_from_address,
    case when contract_address IN ('0x105e285f1a2370d325046fed1424d4e73f6fa2b0',
    '0x23eba06981b5c2a6f1a985bdce41bd64d18e6dfa')
    then '0x4300000000000000000000000000000000000004'
    when contract_address = Lower('0xC877B52c628Dba77fC55F1DDb140747155C9b39D')
    QueryRunArchived: QueryRun has been archived