pyth-network / pyth-crosschain

Crosschain Pyth programs and utilities
https://pyth.network
Other
144 stars 195 forks source link

feat(target_chains/ethereum): remove getPrice from IPyth #1811

Closed ali-bahjati closed 2 months ago

ali-bahjati commented 2 months ago

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.

vercel[bot] commented 2 months ago

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](https://vercel.com/pyth-web/xc-admin-frontend/CZzmuS6jmkYxgSqEJJhXw7wXJmkH)) | [Visit Preview](https://xc-admin-frontend-git-eth-remove-get-price-pyth-web.vercel.app) | | Aug 7, 2024 7:57am |