You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Restructure to have section heading with Important note in callout
Per feedback from @nidhi-singh02:
- Added 'Why Update Prices' as a section heading
- Moved explanatory content outside the callout
- Kept only the Important note about StalePrice errors in the callout
Co-Authored-By: Nidhi Singh <[email protected]>
**Pyth uses a pull-based oracle model**. Unlike traditional push oracles that automatically update prices on-chain at regular intervals, Pyth requires users to explicitly update the on-chain price before reading it.
51
+
Pyth uses a pull-based oracle model. Unlike traditional push oracles that automatically update prices on-chain at regular intervals, Pyth requires users to explicitly update the on-chain price before reading it.
53
52
54
53
This design offers several advantages:
55
54
@@ -63,8 +62,11 @@ In the Pull integration pattern, your contract must:
63
62
2. Call `updatePriceFeeds()` to submit this data on-chain before reading prices
64
63
3. Pay a small fee for each update (calculated via `getUpdateFee()`)
65
64
66
-
**Important**: If you don't update the price or if the on-chain price becomes too stale, calls to `getPriceNoOlderThan()` will revert with a `StalePrice` error (0x19abf40e). See [how to fetch price updates](../../fetch-price-updates) for more details.
67
-
65
+
<Callouttype="warning"emoji="⚠️">
66
+
**Important**: If you don't update the price or if the on-chain price becomes
67
+
too stale, calls to `getPriceNoOlderThan()` will revert with a `StalePrice`
68
+
error (0x19abf40e). See [how to fetch price
69
+
updates](../../fetch-price-updates) for more details.
0 commit comments