Sbhn_NPStellar DECODE
    Updated 2025-02-17
    SELECT tx_result,
    to_varchar(base64_decode_binary(tx_result)) as data,
    regexp_substr_all((data), '.{16}') as datas,
    substr(data, 9, 8) AS transaction_fee_stroops,
    ethereum.public.udf_hex_to_int(datas[1]) AS operation_count,
    ethereum.public.udf_hex_to_int(datas[0]) / 10000000 AS transaction_fee_xlm,
    utils.udf_hex_to_string(datas[12]) as asset,
    ethereum.public.udf_hex_to_int(datas[17]) / 10000000 AS amount_xlm,
    (datas[6] || datas[7] || datas[8] || datas[9] || datas[10]) AS source_account_hex,
    datas[20] || datas[21] || datas[22] || datas[23] AS destination_account_hex
    from stellar.core.fact_transactions
    where transaction_hash = 'dbe95f7dcd14bf0a393c656ead3ace5e19e682ddb571439c442866e8ea1b7d05'

    select *
    from stellar.core.ez_operations
    where transaction_hash = 'dbe95f7dcd14bf0a393c656ead3ace5e19e682ddb571439c442866e8ea1b7d05'

    select distinct type_string
    from stellar.core.ez_operations
    join stellar.core.fact_accounts on account_id=op_source_account
    where asset_issuer = 'GBHNGLLIE3KWGKCHIKMHJ5HVZHYIK7WTBE4QF5PLAKL4CJGSEU7HZIW5'
    and asset_code = 'BENJI'
    -- and type_string != 'payment'


    select *
    from stellar.core.fact_operations
    where account = 'GBO7ZCKAGANPVPIRETHMIVQQUPIV5L5TK4JMCT7GT4BUWIDSQ6JODU3F'
    QueryRunArchived: QueryRun has been archived