elsinaopen
    Updated 2025-04-06
    select *
    -- date_trunc('day', block_timestamp) as date,
    -- count(distinct tx_hash) as tx_count,
    -- count(distinct from_address) as unique_user,
    -- sum(value) as Collateral,
    -- sum(CAST(utils.udf_hex_to_int(CONCAT('0x', SUBSTR(input_data, 75, 64))) AS NUMERIC)/1e18 )AS musd_borrow
    from mezo.testnet.fact_transactions
    where
    to_address = '0x20faea18b6a1d0fcdbccfffe3d164314744baf30' --BorrowerOperations contract
    and tx_succeeded = 'True'
    and ORIGIN_FUNCTION_SIGNATURE = '0x8f09162b' --openTrove
    -- group by 1
    -- order by date asc


    -- 0x 12559 empty
    -- 0x60806040 3552 create contract
    -- 0x095ea7b3 2606 approve
    -- 0xff8c6463 2184 buy NFT from market
    -- 0x8f09162b 1816 openTrove
    -- 0x6a761202 1691 execTransaction
    -- 0x611f0f61 662 contract created
    -- 0x61078061 556 contract created
    QueryRunArchived: QueryRun has been archived