For the complete documentation index, see llms.txt. This page is also available as Markdown.

Read price feeds with Supra

You want to pull a price feed into a contract on Lumia, using Supra's pull-oracle model.

Who this is for: developers building a contract that needs an oracle-sourced value. Prerequisites: Oracles & Attestation (concept); Networks & Endpoints. Time: varies, depending on whether a Supra oracle-storage contract for the pair you need is already deployed on the network you're targeting.

Supra is named in Lumia's documentation as an integrated oracle provider.

How the integration mechanism generally works

Supra's oracle is typically a pull model: your app fetches a signed price update off-chain (from Supra's data feed service), then submits it on-chain to a Supra verifier/storage contract as part of the same transaction that consumes it, rather than reading a value that's already sitting on-chain.

Steps

1

Confirm whether a Supra oracle-storage contract is already deployed

On the Lumia network you're targeting.

2

Fetch the signed price update

Once confirmed, fetch the signed price update from Supra's off-chain feed endpoint for the pair you need.

3

Submit the update alongside your consuming transaction

Per Supra's verify-then-read pattern.

Verify it worked

Once you have a real contract address and a working fetch, the on-chain verify call should succeed and the price value it returns should match what you fetched off-chain for the same round.

Troubleshooting

No contract address or feed endpoint to call

Confirm the contract address and feed endpoint with Supra or Lumia directly for the network you're targeting; do not substitute values from a different chain's Supra deployment.

Verify call reverts

A stale or already-consumed signed update is the most common cause in Supra's pull model generally; fetch a fresh update per transaction.

Last updated

Was this helpful?