Skip to content

Commit c31ee4d

Browse files
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]>
1 parent a189298 commit c31ee4d

File tree

1 file changed

+7
-5
lines changed
  • pages/price-feeds/use-real-time-data/pull-integration

1 file changed

+7
-5
lines changed

pages/price-feeds/use-real-time-data/pull-integration/evm.mdx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,9 @@ Then add the following line to your `remappings.txt` file:
4646
@pythnetwork/pyth-sdk-solidity/=node_modules/@pythnetwork/pyth-sdk-solidity
4747
```
4848

49-
<Callout type="warning" emoji="⚠️">
50-
**Why Update Prices?**
49+
## Why Update Prices
5150

52-
**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.
5352

5453
This design offers several advantages:
5554

@@ -63,8 +62,11 @@ In the Pull integration pattern, your contract must:
6362
2. Call `updatePriceFeeds()` to submit this data on-chain before reading prices
6463
3. Pay a small fee for each update (calculated via `getUpdateFee()`)
6564

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+
<Callout type="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.
6870
</Callout>
6971

7072
## Write Contract Code

0 commit comments

Comments
 (0)