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

Commit 53c5d9f

Browse files
authored
Merge pull request #31 from pyth-network/doc
Point reader to function variants in readme
2 parents ff8168d + 54051f0 commit 53c5d9f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ contract ExampleContract {
3939
pyth.updatePriceFeeds{value: fee}(priceUpdateData);
4040
4141
bytes32 priceID = 0xf9c0172ba10dfa4d19088d94f5bf61d3b54d5bd7483a322a982e1373ee8ea31b;
42+
// Read the current value of priceID, aborting the transaction if the price has not been updated recently.
43+
// Every chain has a default recency threshold which can be retrieved by calling the getValidTimePeriod() function on the contract.
44+
// Please see IPyth.sol for variants of this function that support configurable recency thresholds and other useful features.
4245
return pyth.getPrice(priceID);
4346
}
4447
}

0 commit comments

Comments
 (0)