-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added supra oracle info to moonbeam docs #845
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you @ksdumont! this is great! just one question 🙂
``` | ||
// Get the price of a pair from oracle data received from supra pull model | ||
|
||
function GetPairPrice(bytes calldata _bytesProof, uint256 pair) external |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you need to pass into the _bytesProof
parameter? and for the pair
parameter, is it the pair ID (found here)?
if it's not a straight-forward process to get the _bytesProof
, we can direct users back to your docs. But at the very least, it would be helpful to have an example of what you can pass in for Moonbase Alpha (if possible)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @eshaben, apologies for the late reply!
The _bytesProof
parameter is a byte-encoded value that contains the cryptographic proof for the price data. This proof ensures the authenticity and integrity of the price data being fetched from Supra's oracle.
As for the pair parameter, it indeed refers to the pair ID, which uniquely identifies the asset pair for which you are fetching the price data.
Getting the _bytesProof
requires you to be part of a cryptographic process where you request data from Supra's oracle, and the oracle responds with the data along with the proof (the _bytesProof). The smart contract then uses this proof to verify the authenticity of the data. It is pretty straightforward in our documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for clarifying!
Looks good. I'll merge it in to my local branch and make some changes for consistency with the rest of our docs before merging it into the main branch and publishing it. I'll let you know once we publish it! Thanks again for opening the PR! 💜 |
Awesome, thanks for the update. Could you let me know when it is published?
…On Wed, Feb 14, 2024 at 6:06 PM Erin Shaben ***@***.***> wrote:
Merged #845
<#845> into
eshaben/supra.
—
Reply to this email directly, view it on GitHub
<#845 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMMNET3IGKJ4BZELL6OXWF3YTVURLAVCNFSM6AAAAABBYP6JV6VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJRHAYDSMBWHEZDKMI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
.com>
--
Keith Dumont MS, OTR/L, RYT
|
Description
Supra recently deployed to main net. I updated your oracle documentation to reflect these changes.