scottincryptoWormhole Bridge Transactions
    Updated 2021-11-17
    select
    block_id
    , block_timestamp
    , chain_id
    , event_attributes:amount::numeric / 1e6 as amount
    , event_attributes:denom::string as denom
    , event_attributes:recipient::string as user
    , 'receive' as tx_direction
    , 'native' as token_type
    , 0 as wormhole_chain_id
    from terra.msg_events
    where event_attributes:contract_address::string = 'terra10nmmwe8r3g99a9newtqa7a75xfgs2e8z87r2sf'
    and event_type = 'from_contract'
    and event_attributes:action::string = 'complete_transfer_terra_native'
    and tx_status = 'SUCCEEDED'
    union all
    select
    block_id
    , block_timestamp
    , chain_id
    , event_attributes:"0_amount"::numeric / 1e6 as amount
    , event_attributes:"1_contract_address"::string as denom
    , event_attributes:recipient::string as user
    , 'receive' as tx_direction
    , 'non_native' as token_type
    , 0 as wormhole_chain_id
    from terra.msg_events
    where event_attributes:"0_contract_address"::string = 'terra10nmmwe8r3g99a9newtqa7a75xfgs2e8z87r2sf'
    and event_type = 'from_contract'
    and event_attributes:"0_action"::string = 'complete_transfer_wrapped'
    and tx_status = 'SUCCEEDED'
    union all
    select
    block_id
    , block_timestamp
    , chain_id
    Run a query to Download Data