BlockTrackermain swap copy
    Updated 2025-04-05
    with trades_data as (
    select
    block_timestamp,
    tx_hash,
    origin_from_address as trader,
    decoded_log:dstToken as dstToken,
    decoded_log:returnAmount as returnAmount_raw,
    decoded_log:spentAmount as spentAmount_raw,
    decoded_log:srcToken as srcToken
    from swell.core.ez_decoded_event_logs
    where 1 = 1
    and event_name = 'Swapped'
    and contract_address = '0xe5c689d34e03611ac55a603831b00606a8800514'
    and TX_SUCCEEDED
    and block_timestamp::date >= '2024-12-12'
    )
    ,
    tokens_info as (
    select
    address,
    symbol,
    decimals
    from swell.core.dim_contracts
    union all
    select
    '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee' as address,
    'ETH' as symbol,
    18 as decimals
    )
    ,
    main as (
    select
    block_timestamp,
    tx_hash,
    trader,
    srcToken,
    QueryRunArchived: QueryRun has been archived