Skip to content
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

Merged
merged 1 commit into from
Feb 15, 2024

Conversation

ksdumont
Copy link
Contributor

Description

Supra recently deployed to main net. I updated your oracle documentation to reflect these changes.

Copy link
Contributor

@eshaben eshaben left a 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
Copy link
Contributor

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)

Copy link
Contributor Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for clarifying!

@eshaben eshaben changed the base branch from master to eshaben/supra February 15, 2024 02:04
@eshaben
Copy link
Contributor

eshaben commented Feb 15, 2024

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! 💜

@eshaben eshaben merged commit a2c8acd into moonbeam-foundation:eshaben/supra Feb 15, 2024
1 check passed
@ksdumont
Copy link
Contributor Author

ksdumont commented Feb 15, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants