Skip to content

feat(stylus) - Set up pyth receiver contract for stylus #2792

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

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

ayushboss
Copy link
Contributor

Summary

Built on the wormhole stylus contract, this PR establishes the framework for the Pyth contract and implements the get prices functions.

Rationale

These are the first steps to building out the Pyth stylus receiver contract.

How has this been tested?

  • Current tests cover my changes
  • Added new tests
  • Manually tested the code

Formal tests of the getter function will depend on further implementation. This will be added on in future PRs. the existing program builds at the moment.

ayushboss and others added 4 commits June 18, 2025 14:25
- Replace incorrect .try_read().ok_or() with proper .get() method calls
- Add zero-value check for publish_time to determine if price data exists
- Contract now compiles successfully without StorageGuard errors

Co-Authored-By: ayush.suresh@dourolabs.xyz <byteSlayer31037@gmail.com>
Copy link

vercel bot commented Jun 19, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
api-reference ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 20, 2025 1:09pm
component-library ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 20, 2025 1:09pm
developer-hub ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 20, 2025 1:09pm
entropy-debugger ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 20, 2025 1:09pm
entropy-explorer ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 20, 2025 1:09pm
insights ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 20, 2025 1:09pm
proposals ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 20, 2025 1:09pm
staking ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 20, 2025 1:09pm

@ayushboss ayushboss changed the base branch from main to pyth-wormhole-stylus-integration June 19, 2025 14:56
Copy link
Collaborator

@ali-behjati ali-behjati left a comment

Choose a reason for hiding this comment

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

sorry i'm confused. what's the difference between this and #2793? i think that one might have been on top of this?

}

// PriceInfo struct storing price information
pub type PriceInfoReturn = (U64, I32, I64, U64, I64, U64);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I forgot why we couldn't make this a type. it makes it very difficult to understand the response.

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