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
Confirm whether a Supra oracle-storage contract is already deployed
On the Lumia network you're targeting.
Fetch the signed price update
Once confirmed, fetch the signed price update from Supra's off-chain feed endpoint for the pair you need.
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
Last updated
Was this helpful?