Eman-Raz44- Balance Classification: Blast
    Updated 2025-03-22
    WITH OVERVIEW AS (with tab5 as (
    with tab1 as (select distinct data:call:transaction:from as user
    from axelar.axelscan.fact_gmp
    where data:approved:returnValues:contractAddress in
    ('0xce16F69375520ab01377ce7B88f5BA8C48F8D666',
    '0x492751eC3c57141deb205eC2da8bFcb410738630',
    '0xDC3D8e1Abe590BCa428a8a2FC4CfDbD1AcF57Bd9')
    and status = 'executed'
    and event = 'ContractCallWithToken'
    and simplified_status = 'received'
    and IS_CALL_FROM_RELAYER = 'false'
    and IS_INVALID_CALL = 'false'
    and IS_TWO_WAY = 'false'
    and gas_status = 'gas_paid_enough_gas'
    and (created_at::date >= '{{Start_Date}}' and created_at::date <= '{{End_Date}}')
    and data:value is not null),
    tab4 as (
    with tab3 as (
    with tab2 as (
    select from_address as user, -amount as amount, contract_address, symbol
    from blast.core.ez_token_transfers

    union all

    select to_address as user, amount, contract_address, symbol
    from blast.core.ez_token_transfers)

    select user, sum(amount) as balance, symbol, contract_address
    from tab2
    group by 1,3,4)

    select user, balance, symbol, contract_address
    from tab3
    where balance>0 and symbol is not NULL)

    select tab1.user as squid_user, balance, symbol, contract_address
    Auto-refreshes every 24 hours
    QueryRunArchived: QueryRun has been archived