Skip to content
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(target_chains/ethereum): remove getPrice from IPyth #1811

Merged
merged 2 commits into from
Aug 8, 2024

Conversation

ali-bahjati
Copy link
Collaborator

@ali-bahjati ali-bahjati commented Aug 5, 2024

getPrice method uses a configured default staleness from the Pyth contract which is normally set to 60 seconds. While this is enough for some types protocols it's very high for latency-sensitive protocols and protocols should use set their own desired staleness. This change removes this method and getEmaPrice and leaves protocols with getPriceUnsafe or getPriceNoOlderThan.

The contract will still support the getPrice method to avoid breaking existing users of it.

Copy link

vercel bot commented Aug 5, 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 Aug 7, 2024 7:57am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
xc-admin-frontend ⬜️ Ignored (Inspect) Visit Preview Aug 7, 2024 7:57am

@@ -23,18 +23,19 @@ abstract contract AbstractPyth is IPyth {
public
view
virtual
override
Copy link
Member

Choose a reason for hiding this comment

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

Can we add the same @notice to getValidTimePeriod() as well?

@ali-bahjati ali-bahjati merged commit 2c599bd into main Aug 8, 2024
6 checks passed
@ali-bahjati ali-bahjati deleted the eth/remove-get-price branch August 8, 2024 11:48
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