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
{{ message }}
This repository was archived by the owner on Nov 28, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: pages/price-feeds/use-real-time-data/pull-integration/evm.mdx
+15-12Lines changed: 15 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,18 +50,21 @@ Then add the following line to your `remappings.txt` file:
50
50
51
51
<Callouttype="warning"emoji="⚠️">
52
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.
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.
0 commit comments