Moesei sw 2
    Updated 2023-08-28
    with
    MAINTAB as
    (select
    BLOCK_TIMESTAMP ,
    tx_id from
    sei.core.fact_msg_attributes
    where
    MSG_TYPE = 'wasm'
    and
    ATTRIBUTE_KEY = 'action'
    and
    ATTRIBUTE_VALUE = 'swap' )

    , tb2 as (
    select
    tx_id ,
    ATTRIBUTE_VALUE as swapper


    from
    sei.core.fact_msg_attributes
    where
    MSG_TYPE = 'wasm'

    and
    ATTRIBUTE_KEY = 'sender'

    ) ,

    tb3 as (
    select
    tx_id ,

    ATTRIBUTE_VALUE as asset_out


    Run a query to Download Data