-
Notifications
You must be signed in to change notification settings - Fork 222
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
feat: pyth pull-based push oracle #1370
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Ignored Deployments
|
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 this seems pretty straightforward to me. I left a few suggestions.
@@ -0,0 +1,28 @@ | |||
[package] | |||
name = "common-test-utils" |
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.
I extracted this here to be able to use it in pyth-solana-receiver
and pyth-push-oracle
at the same time
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.
awesome!
|
||
pub mod config; | ||
pub mod error; | ||
pub mod price_update; | ||
|
||
declare_id!("rec5EKMGg6MxZYaMdyBfgwp4d5rB9T1VQH5pJv5LtFJ"); | ||
|
||
pub const PYTH_PUSH_ORACLE_ID: Pubkey = pubkey!("F9SP6tBXw9Af7BYauo7Y2R5Es2mpv8FP5aNCXMihp6Za"); |
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 confusing to me. You have a separate sdk.rs above for the push oracle which has some useful methods in it. It seems like there should either be one sdk for users of both push/pull, or two different ones. At the moment, it seems like a mix of both options (?)
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.
pyth-solana-receiver-sdk
is for consuming price updatespyth_solana_receiver::sdk
is for posting price updatespyth_push_oracle::sdk
is for updating price feeds
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.
For this program id, I need to put it here because otherwise there are some circular dependencies that break the code.
It is a program that CPIs into the pyth solana receiver to post updates.
This program enforces that:
The meat is in target_chains/solana/programs/pyth-push-oracle/src/lib.rs