Flipside Data ScienceBridge to Boba via Nucleus
    Updated 4 days ago
    with bridge as (
    SELECT distinct
    t.tx_hash as tx_id,
    t.block_timestamp as block_timestamp,
    t.to_Address as address,
    1 as action_count,
    TRUE as valid,
    1 as quest_step,
    'BOBA' as currency,
    t.amount,
    ap.price as ap_price,
    p.price as p_price,
    t.amount*ap.price / p.price as token_amount,
    tx.tx_fee as fee_amount


    FROM boba.core.ez_token_transfers t
    LEFT JOIN boba.core.fact_transactions tx
    on t.tx_hash = tx.tx_hash
    left join boba.price.ez_prices_hourly p
    on p.hour = date_trunc('hour', t.block_timestamp)
    and p.token_Address = '0xa18bf3994c0cc6e3b63ac420308e5383f53120d7'
    left join ethereum.price.ez_prices_hourly ap
    on ap.hour = date_trunc('hour', t.block_timestamp)
    and ap.is_native = TRUE

    WHERE
    -- t.block_timestamp::date >= current_date - 2
    -- and tx.block_timestamp::date >= current_date - 2
    lower(t.to_Address) in (:userAddresses)
    and t.block_timestamp :: date >= :startsAt
    and tx.block_timestamp :: date >= :startsAt
    and t.origin_to_address = lower('0x3a464f746d23ab22155710f44db16dca53e0775e')
    and t.from_address = lower('0x0000000000000000000000000000000000000000')
    and t.contract_Address = '0x52e4d8989fa8b3e1c06696e7b16def5d7707a0d1'

    Last run: 4 days ago
    QUEST_ID
    BLOCK_TIMESTAMP
    TX_ID
    ACTION_COUNT
    ADDRESS
    VALID
    QUEST_STEP
    TOKEN_AMOUNT
    FEE_AMOUNT
    CURRENCY
    1
    :questId2025-03-17 09:00:43.0000x0212934fd952520d86ce4f6be96f7ef6d184ab5fef7f8adbb5d9946198368c0f10x2c3c48dcfa3875b5d181033a5fffe1584270462aTRUE181.6134375890.00001967783799BOBA
    1
    200B
    2s