Ali3NAEVO Airdrop Unclaimers
    Updated 2024-04-22
    with aevo_claims as (
    select a.BLOCK_TIMESTAMP, a.TO_ADDRESS, a.RAW_AMOUNT/1e18 as amount, a.tx_hash, b.TX_FEE
    from ethereum.core.fact_token_transfers a join ethereum.core.fact_transactions b
    on a.tx_hash=b.tx_hash
    where a.FROM_ADDRESS='0xd4b812dd7134f632c947ca11a2fb0f49082a2483'
    and a.ORIGIN_FUNCTION_SIGNATURE='0x2e7ba6ef' and STATUS='SUCCESS'
    and a.BLOCK_TIMESTAMP::date >='2024-03-13' and b.BLOCK_TIMESTAMP::date>='2024-03-13'),

    claimers as (select distinct to_address as claimer
    from aevo_claims
    group by 1),
    prices as (
    select * from (select date_trunc(day, hour) as day,
    TOKEN_ADDRESS, symbol, decimals,
    case when symbol in ('WBTC', 'WETH') then price else 1 end as price,
    row_number() over (partition by symbol order by hour desc) as rank
    from ethereum.price.ez_hourly_token_prices
    where TOKEN_ADDRESS in (
    '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
    '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599',
    '0xdac17f958d2ee523a2206206994597c13d831ec7',
    '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
    '0x83f20f44975d03b1b09e64809b757c47f942beea')
    )
    where rank=1),



    aevo_deposits as (
    -- Arbitrum
    select BLOCK_TIMESTAMP, 'Arbitrum' as chain,
    DECODED_LOG:receiver as depositor, 'USDC' as symbol,
    DECODED_LOG:depositAmount/1e6 as depositAmount, depositAmount as usdAmount,
    TX_HASH
    from arbitrum.core.ez_decoded_event_logs
    QueryRunArchived: QueryRun has been archived