-
Notifications
You must be signed in to change notification settings - Fork 33
Update Sui how-to guide with corrected code and IDs #698
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
base: main
Are you sure you want to change the base?
Conversation
1. The assertion in the Move contract was incorrect. 2. Update the testnet pyth state id in the CLI example. 3. The TS code was deprecated. Used the latest @mysten/sui instead. 4. Added explanatory comments.
@Tzal3x is attempting to deploy a commit to the Pyth Network Team on Vercel. A member of the Team first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Hey @aditya520 , mind taking a look? |
Hi, kind reminder regarding this PR as it would be beneficial for the community. @aditya520 |
My bad. I will review it this week. |
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.
This is awesome! Thank you so much for taking the time to make the changes. We appreciate it! And sorry for the long lag in getting this reviewed.
Just a small nit. Otherwise, this LGTM!
// Extract the price, decimal, and timestamp from the price struct and use them. | ||
let decimal_i64 = price::get_expo(&price_struct); | ||
let price_i64 = price::get_price(&price_struct); | ||
let timestamp_sec = price::get_timestamp(&price_struct); |
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.
nit: the function returns an I64 but nothing gets returned. Granted this is demonstration code but it'd be nice if it is something that can be copied and built with no change.
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.
Nice catch!
Description
Currently the Sui tutorial is not working at all. Several issues: an incorrect Move contract and the use of a deprecated Sui Typescript library. Plus incorrect use of state ids.
This PR fixes those issues by making the following changes:
@mysten/sui
instead.Type of Change
Areas Affected
https://docs.pyth.network/price-feeds/use-real-time-data/sui
Checklist
pre-commit run --all-files
to check for linting errorsRelated Issues
Closes #
Additional Notes
Contributor Information