0-MIDtop swap path -swappers bw-bsc
    Updated 2024-07-13

    with act1 as (
    with tab1 as (
    select
    DECODED_LOG:fromAssetId as from_asset
    --,DECODED_LOG:toAssetId as to asset
    ,TX_HASH
    ,ORIGIN_FROM_ADDRESS
    from bsc.core.ez_decoded_event_logs
    where ORIGIN_TO_ADDRESS='0x1231deb6f5749ef6ce6943a275a1d3e7486f4eae'
    and EVENT_NAME='LiFiGenericSwapCompleted'
    and DECODED_LOG:integrator='binanceWallet'
    and TX_STATUS='SUCCESS'
    ),
    tab2 as (
    select ADDRESS
    ,SYMBOL
    from bsc.core.dim_contracts
    )
    select SYMBOL as f_asset
    ,TX_HASH
    ,ORIGIN_FROM_ADDRESS
    from tab1
    left join tab2
    on tab1.from_asset=tab2.ADDRESS
    ),
    -----------------
    act2 as (
    with tab1 as (
    select
    --DECODED_LOG:fromAssetId as from_asset
    DECODED_LOG:toAssetId as to_asset
    ,TX_HASH
    ,ORIGIN_FROM_ADDRESS
    from bsc.core.ez_decoded_event_logs
    where ORIGIN_TO_ADDRESS='0x1231deb6f5749ef6ce6943a275a1d3e7486f4eae'
    QueryRunArchived: QueryRun has been archived