Skip to content
This repository was archived by the owner on Nov 28, 2025. It is now read-only.

Commit e07a7df

Browse files
Fix formatting (prettier and trailing whitespace)
Co-Authored-By: Nidhi Singh <[email protected]>
1 parent 52d65bd commit e07a7df

File tree

1 file changed

+15
-12
lines changed
  • pages/price-feeds/use-real-time-data/pull-integration

1 file changed

+15
-12
lines changed

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

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,21 @@ Then add the following line to your `remappings.txt` file:
5050

5151
<Callout type="warning" emoji="⚠️">
5252
**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-
54-
This design offers several advantages:
55-
- **Lower costs**: You only pay for price updates when you need them
56-
- **Lower latency**: You can fetch the latest price update directly from Pyth's low-latency oracle network and submit it on-chain immediately
57-
- **Flexibility**: Different applications can update prices at different frequencies based on their needs
58-
59-
In the Pull integration pattern, your contract must:
60-
1. Accept `priceUpdate` data from the caller (fetched from [Hermes](../../how-pyth-works/hermes))
61-
2. Call `updatePriceFeeds()` to submit this data on-chain before reading prices
62-
3. Pay a small fee for each update (calculated via `getUpdateFee()`)
63-
64-
**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.
53+
54+
This design offers several advantages:
55+
56+
- **Lower costs**: You only pay for price updates when you need them
57+
- **Lower latency**: You can fetch the latest price update directly from Pyth's low-latency oracle network and submit it on-chain immediately
58+
- **Flexibility**: Different applications can update prices at different frequencies based on their needs
59+
60+
In the Pull integration pattern, your contract must:
61+
62+
1. Accept `priceUpdate` data from the caller (fetched from [Hermes](../../how-pyth-works/hermes))
63+
2. Call `updatePriceFeeds()` to submit this data on-chain before reading prices
64+
3. Pay a small fee for each update (calculated via `getUpdateFee()`)
65+
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+
6568
</Callout>
6669

6770
## Write Contract Code

0 commit comments

Comments
 (0)