marquMayan Sol - Transfers to Solana by token
    Updated 2024-02-03
    with

    bridge_txs as (

    select

    block_timestamp
    , tx_hash
    , origin_from_address

    from ethereum.core.ez_decoded_event_logs
    where tx_status = 'SUCCESS'
    and event_removed = 'false'
    and origin_to_address = '0xf3f04555f8fda510bfc77820fd6eb8446f59e72d' -- Mayan Finance
    and contract_address = '0x98f3c9e6e3face36baad05fe09d375ef1464288b' -- Wormhole Ethereum Core Bridge
    and event_name = 'LogMessagePublished'
    and decoded_log :sender = '0xf3f04555f8fda510bfc77820fd6eb8446f59e72d'
    and substr(decoded_log :payload, 139, 2) = '01' -- Solana Wormhole Chain ID
    and block_timestamp ::date > current_date() - interval '{{weeks}} weeks'
    ),

    transfers as (

    select

    bridge_txs.*
    , coalesce(ifnull(tokens.symbol, left(tokens.contract_address, 8)), 'ETH') as symbol
    , coalesce(tokens.amount, eths.amount, 0) as amount
    , coalesce(tokens.amount_usd
    , eths.amount_usd
    , iff(tokens.contract_address in ('0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', '0xdac17f958d2ee523a2206206994597c13d831ec7')
    , tokens.amount
    , 0)
    ) as amount_usd

    from bridge_txs
    Last run: about 1 year ago
    DATE
    SYMBOL
    Bridge Transfers
    Users
    Vol. USD
    1
    2024-02-03 00:00:00.000USDT7715849.919323095
    2
    2024-01-25 00:00:00.000WETH767037.235167445
    3
    2024-01-22 00:00:00.000WBTC112199.72231633
    4
    2024-01-14 00:00:00.000USDC3230219240.424038489
    5
    2024-01-23 00:00:00.000DAI118267.784948
    6
    2024-01-19 00:00:00.000ETH155147620711.32
    7
    2024-01-31 00:00:00.000WETH221140.43672
    8
    2024-01-09 00:00:00.000WETH11685.275425308
    9
    2024-01-30 00:00:00.000UNI1156.137312909
    10
    2024-01-29 00:00:00.000ETH2391861139858.9
    11
    2024-01-23 00:00:00.000USDC3635447915.100958464
    12
    2024-01-13 00:00:00.000USDT10973285.584526833
    13
    2024-01-20 00:00:00.000USDT161513006.560181538
    14
    2024-01-30 00:00:00.000WBTC3313276.20461075
    15
    2024-02-02 00:00:00.000BSKT1131.41
    16
    2024-01-24 00:00:00.000SOL1164.814560128
    17
    2024-01-09 00:00:00.000USDT161529232.954165128
    18
    2024-02-01 00:00:00.000USDC4641660996.266406791
    19
    2024-01-15 00:00:00.000WETH11507.924
    20
    2024-01-08 00:00:00.000USDT171633323.010325278
    ...
    146
    8KB
    8s