SupraOracles Price Feeds
What is SupraOracles?
SupraOracles is a novel, high-throughput Oracle & IntraLayer: a vertically integrated toolkit of cross-chain solutions (data oracles, asset bridges, automation network, and more) that interlink all blockchains, public (L1s and L2s) or private (enterprises).
How to use SupraOracles' Price Feeds
Integrating with SupraOracles' Price Feeds is quick and easy. SupraOracles currently supports many Solidity/EVM-based networks, like DFK Chain TestNet, and non-EVM networks such as Sui and Aptos.
To see all of the networks SupraOracles supports, please visit SupraOracles' Networks!
To get started, you will want to visit SupraOracles' docs site and review the documentation or continue to follow this guide for a quick start.
Step 1: Create The S-Value Interface
Add the following code to the Solidity smart contract that you wish to retrieve an S-Value.
This creates the interface that you will later apply in order to fetch a price from SupraOracles.
Step 2: Configure The S-Value Feed Address
To fetch the S-Value from a SupraOracles smart contract, you must first find the S-Value Feed Address for the chain of your choice.
For DFK Chain TestNet, the address is: 0x700a89Ba8F908af38834B9Aba238b362CFfB665F
When you have the proper address, create an instance of the S-Value Feed using the interface we previously defined for DFK Chain TestNet:
Step 3: Get The S-Value Crypto Price
Now you can simply access the S-Value Crypto Price of our supported market pairs. In this step, we'll get the price of ETH/USDT (eth_usdt) by applying the following code to our Smart Contract.
Here's an example of what your implementation should look like
Tada! You now have a method in your Smart Contract that you can call at any time to retrieve the price of ETH in USDT!
Extra: S-Value Feeds with ethers.js
For additional tutorials and guides based on example use-cases, please refer to the Supra docs.
Going Further with SupraOracles
If you want to take the next step, consider registering for the Supra Network Activate Program (SNAP).
The Supra Network Activate Program (SNAP) offers companies discounted oracle credits, technical documentation, and customer support to embed much-needed oracles and VRF/RNG. SNAP supports Web3 scaling and growth to buffer costs which could typically inhibit a company’s success.
The SNAP program is partnered with some of Web3's most prolific names who are helping with project selection and qualification.
Connect with us!
Still looking for answers? We got them! Check out all the ways you can reach us:
Last updated