MLDZMNBridge to near-1
    Updated 2023-12-21
    ---------------------------------------------------------------------
    with price_tab as (
    select
    TIMESTAMP::date as day,
    SYMBOL,
    TOKEN_CONTRACT,
    avg(PRICE_USD) as price
    from near.price.fact_prices
    group by 1,2,3
    ),

    ---------------------------------------------------------------------
    -- Rainbow bride ethereum-near

    data_tx as (
    select
    tx_hash
    from ethereum.core.ez_decoded_event_logs
    where
    -- tx_hash = '0x950e80b8907e8beaab6cfb8a4bf0e1076a69757d6f71e7e4e46db7e2b8966a71'
    origin_function_signature = '0x0889bfe7'
    and
    contract_address = '0x23ddd3e3692d1861ed57ede224608875809e127f'
    and
    topics[0] = '0xdd85dc56b5b4da387bf69c28ec19b1d66e793e0d51b567882fa31dc50bbd32c5'
    and
    event_name = 'Locked'
    and
    DECODED_LOG:accountId not like '%aurora%'
    )


    select
    date_trunc('day',BLOCK_TIMESTAMP) as date,
    'Rainbow' as bridge,
    'Ethereum' as source,
    Last run: about 1 year ago
    DATE
    BRIDGE
    SOURCE
    DESTINATION
    DAILY_VOLUMES
    TOTAL_USERS
    TOTAL_TX
    TOTAL_VOLUME
    1
    2024-01-29 00:00:00.000RainbowEthereumNear46539.5154289591254180147.4143712
    2
    2024-01-28 00:00:00.000RainbowEthereumNear270.2739232254133607.8989422
    3
    2024-01-26 00:00:00.000RainbowEthereumNear5148.4845155816654133337.6250192
    4
    2024-01-25 00:00:00.000RainbowEthereumNear18447.62254128189.1405036
    5
    2024-01-24 00:00:00.000RainbowEthereumNear500.51154109741.5405036
    6
    2024-01-23 00:00:00.000RainbowEthereumNear9385.6425110673354109241.0405036
    7
    2024-01-22 00:00:00.000RainbowEthereumNear22909.9920454362354099855.3979926
    8
    2024-01-20 00:00:00.000RainbowEthereumNear635.9235760542254076945.4059471
    9
    2024-01-19 00:00:00.000RainbowEthereumNear501476.642628912354076309.4823711
    10
    2024-01-18 00:00:00.000RainbowEthereumNear26099.4743967764453574832.8397421
    11
    2024-01-17 00:00:00.000RainbowEthereumNear2299.3077403932253548733.3653454
    12
    2024-01-15 00:00:00.000RainbowEthereumNear39005.624769814553546434.057605
    13
    2024-01-14 00:00:00.000RainbowEthereumNear47841.141153507428.4328352
    14
    2024-01-12 00:00:00.000RainbowEthereumNear9365.354448424553459587.2928352
    15
    2024-01-11 00:00:00.000RainbowEthereumNear653.9475621222253450221.9383868
    16
    2024-01-10 00:00:00.000RainbowEthereumNear18635.636901294553449567.9908246
    17
    2024-01-09 00:00:00.000RainbowEthereumNear1857.7081153430932.3539233
    18
    2024-01-08 00:00:00.000RainbowEthereumNear33640.1628297993553429074.6459233
    19
    2024-01-07 00:00:00.000RainbowEthereumNear2904.6505460023353395434.4830935
    20
    2024-01-06 00:00:00.000RainbowEthereumNear5656.616502742353392529.8325475
    ...
    341
    30KB
    46s