Skip to content

feat(lazer/sui): initialize #2964

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

Merged
merged 9 commits into from
Aug 19, 2025
Merged

feat(lazer/sui): initialize #2964

merged 9 commits into from
Aug 19, 2025

Conversation

tejasbadadare
Copy link
Contributor

Summary

Initializes pyth_lazer contract modules and includes a rough draft of a function to parse & verify a Lazer payload based off this example.

How has this been tested?

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

Copy link

vercel bot commented Aug 19, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
api-reference Ready Ready Preview Comment Aug 19, 2025 6:10pm
component-library Ready Ready Preview Comment Aug 19, 2025 6:10pm
developer-hub Ready Ready Preview Comment Aug 19, 2025 6:10pm
entropy-explorer Ready Ready Preview Comment Aug 19, 2025 6:10pm
insights Ready Ready Preview Comment Aug 19, 2025 6:10pm
proposals Ready Ready Preview Comment Aug 19, 2025 6:10pm
staking Ready Ready Preview Comment Aug 19, 2025 6:10pm

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.

LGTM. Please address my comments before merging.

Copy link
Contributor

@darunrs darunrs left a comment

Choose a reason for hiding this comment

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

Awesome work man! No other comments than the ones Ali already gave.

Comment on lines +11 to +13
public fun new_invalid(): Channel {
Channel::Invalid
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these functions auto-generated or just necessary boilerplate?

Copy link
Contributor Author

@tejasbadadare tejasbadadare Aug 19, 2025

Choose a reason for hiding this comment

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

Move has a strict object ownership model, struct/enum fields can only be directly accessed in the module where they are defined. So yeah unfortunately these boilerplate getters and setters are required to open up access to other modules

/// Get a reference to the feeds vector of the update
public fun feeds(update: &Update): vector<Feed> {
update.feeds
}
Copy link
Contributor

Choose a reason for hiding this comment

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

newline

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.

4 participants