0xHaM-dTest 1
    Updated 8 days ago
    WITH eth_to_ronin_native as (
    select
    'ethereum'::VARCHAR as blockchain
    , 'axie infinity: ronin bridge v2'::VARCHAR as platfrom
    , edl.block_number::INT as block_number
    , edl.block_timestamp::TIMESTAMP as block_timestamp
    , edl.tx_hash::VARCHAR as tx_hash
    , 'ethereum'::VARCHAR as source_chain
    , 'ronin'::VARCHAR as destination_chain
    , edl.origin_to_address::VARCHAR as bridge_address
    , edl.origin_from_address::VARCHAR as source_address
    , edl.decoded_log['receipt']['ronin']['addr']::VARCHAR as destination_address
    , 'outbound'::VARCHAR as direction
    , edl.decoded_log['receipt']['mainchain']['tokenAddr']::VARCHAR as token_address
    , coalesce(pr.symbol,dc.symbol)::VARCHAR as token_symbol
    , edl.decoded_log['receipt']['info']['quantity']::DOUBLE as amount_unadj
    , (edl.decoded_log['receipt']['info']['quantity']/pow(10,pr.decimals))::DOUBLE as amount
    , (edl.decoded_log['receipt']['info']['quantity']/pow(10,pr.decimals))*pr.price::DOUBLE as amount_usd
    , current_timestamp() as inserted_timestamp
    , current_timestamp() as modified_timestamp
    -- , row_number() over (order by edl.block_timestamp asc, edl.tx_hash asc) as ez_bridge_activity_id
    from ethereum.core.ez_decoded_event_logs edl
    left join crosschain.price.ez_prices_hourly pr
    on (date_trunc('hour',edl.block_timestamp)=pr.hour and edl.decoded_log['receipt']['mainchain']['tokenAddr']=pr.token_address)
    left join ethereum.core.dim_contracts dc
    on (edl.decoded_log['receipt']['mainchain']['tokenAddr']=dc.address)
    where 1=1
    and edl.block_timestamp >= '2025-01-01'
    and edl.topics[0]=lower('0xd7b25068d9dc8d00765254cfb7f5070f98d263c8d68931d937c7362fa738048b')
    and pr.blockchain='ethereum'
    )

    -- ,
    -- final as (
    select
    block_timestamp::date as date
    Last run: 8 days ago
    DATE
    TOKEN_SYMBOL
    BRIDGE_TRANSACTIONS
    USERS
    VOLUME
    1
    2025-01-27 00:00:00.000WETH4135125119.770228915
    2
    2025-01-15 00:00:00.000USDC181458732.657499181
    3
    2025-01-16 00:00:00.000BANANA441454.645802444
    4
    2025-03-30 00:00:00.000USDC14111319.149132546
    5
    2025-02-19 00:00:00.000USDC2722443838.570467379
    6
    2025-03-25 00:00:00.000AXS8648311.958178926
    7
    2025-02-26 00:00:00.000BANANA1120.49166329
    8
    2025-01-16 00:00:00.000USDC1087147.45005763
    9
    2025-02-12 00:00:00.000BANANA54674.709962569
    10
    2025-01-20 00:00:00.000BANANA33384.998773919
    11
    2025-03-22 00:00:00.000BANANA11104.808437556
    12
    2025-01-05 00:00:00.000AXS224068.308475076
    13
    2025-01-04 00:00:00.000YGG112263.27523575
    14
    2025-01-11 00:00:00.000APRS1154.743667585
    15
    2025-01-21 00:00:00.000AXS5429409.027500003
    16
    2025-03-13 00:00:00.000WETH7568242474.073895629
    17
    2025-03-17 00:00:00.000AXS141011016.778687979
    18
    2025-01-09 00:00:00.000AXS6612246.56310011
    19
    2025-02-01 00:00:00.000PIXEL1135.44156145
    20
    2025-02-09 00:00:00.000PIXEL11119.485124467
    ...
    497
    26KB
    12s