Skip to content

feat(solana-receiver-sdk): add get_twap_no_older_than to consume TwapUpdates #2174

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 6 commits into from
Dec 9, 2024

Conversation

tejasbadadare
Copy link
Contributor

Purpose

Enables SDK users to easily deserialize and use TWAP prices stored in TwapUpdate accounts using get_twap_no_older_than . This function checks that the update is fully verified and not outdated, and returns a TwapPrice. To get unchecked prices, get_twap_unchecked is also available.

Testing

Added unit test

Copy link

vercel bot commented Dec 7, 2024

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 Dec 9, 2024 5:31pm
proposals ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 9, 2024 5:31pm
staking ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 9, 2024 5:31pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
component-library ⬜️ Ignored (Inspect) Visit Preview Dec 9, 2024 5:31pm
insights ⬜️ Ignored (Inspect) Visit Preview Dec 9, 2024 5:31pm

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.

Nice! Can you bump the crate version?

@tejasbadadare tejasbadadare merged commit b451050 into main Dec 9, 2024
5 of 8 checks passed
@tejasbadadare tejasbadadare deleted the tb/solana_receiver_sdk/consume_twap_updates branch December 9, 2024 17:26
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.

3 participants