Skip to content

Update the Pragma oracle tutorial for the v14 oracle redeployment #200

@Keinberger

Description

@Keinberger

Background

Pragma redeployed their Miden oracle for the v14 protocol (astraly-labs/pragma-miden), which changed both the deployment addresses and the consumer-facing interface. The tutorials repo's v14 migration (#186) only updated the SDK API surface of the "Consuming On-Chain Price Data from the Pragma Oracle" Rust tutorial — it still targets Pragma's pre-v14 deployment.

Problem

The Rust oracle tutorial fails at runtime against the current testnet:

  1. The hardcoded oracle account ID and get_median procedure root reference Pragma's pre-v14 deployment, which is no longer live.
  2. The v14 oracle changed its consumer interface — the trading pair is now a faucet-ID pair, publishers are registered in a storage map instead of value slots, and get_median returns [is_tracked, median_price, amount].

Proposed Solution

Update the tutorial — the MASM contract, the Rust client code, and the embedded snippets in the docs — for Pragma's v14 oracle: the new oracle address and get_median procedure root, the v14 foreign-procedure-invocation ABI, map-based publisher discovery, and faucet-pair-keyed storage proofs. Verify end-to-end against the live v14 testnet oracle.

Any thoughts on this are highly appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions