In Pyth.sol, here pyth-crosschain/target_chains/ethereum/contracts/contracts/pyth/Pyth.sol at 8e4049fd9e587fa6e7ee580554ef824cd7d2035e · pyth-network/pyth-crosschain · GitHub we have:
function parsePriceFeedUpdates(
bytes[] calldata updateData,
bytes32[] calldata priceIds,
uint64 minPublishTime,
uint64 maxPublishTime
)
external
payable
override
returns (PythStructs.PriceFeed[] memory priceFeeds)
{
(priceFeeds, ) = parsePriceFeedUpdatesWithConfig(
updateData,
priceIds,
minPublishTime,
maxPublishTime,
false,
false,
false
);
}
What I am interested in is the last false that refers to storeUpdatesIfFresh. See pyth-crosschain/target_chains/ethereum/contracts/contracts/pyth/Pyth.sol at 8e4049fd9e587fa6e7ee580554ef824cd7d2035e · pyth-network/pyth-crosschain · GitHub.
Then, in IPyth.sol pyth-crosschain/target_chains/ethereum/sdk/solidity/IPyth.sol at 8e4049fd9e587fa6e7ee580554ef824cd7d2035e · pyth-network/pyth-crosschain · GitHub
I read:
/// @notice Parse `updateData` and return price feeds of the given `priceIds` if they are all published
/// within `minPublishTime` and `maxPublishTime`.
///
/// You can use this method if you want to use a Pyth price at a fixed time and not the most recent price;
/// otherwise, please consider using `updatePriceFeeds`. This method may store the price updates on-chain, if they
/// are more recent than the current stored prices.
///
/// This method requires the caller to pay a fee in wei; the required fee can be computed by calling
/// `getUpdateFee` with the length of the `updateData` array.
///
///
/// @dev Reverts if the transferred fee is not sufficient or the updateData is invalid or there is
/// no update for any of the given `priceIds` within the given time range.
/// @param updateData Array of price update data.
/// @param priceIds Array of price ids.
/// @param minPublishTime minimum acceptable publishTime for the given `priceIds`.
/// @param maxPublishTime maximum acceptable publishTime for the given `priceIds`.
/// @return priceFeeds Array of the price feeds corresponding to the given `priceIds` (with the same order).
function parsePriceFeedUpdates(
bytes[] calldata updateData,
bytes32[] calldata priceIds,
uint64 minPublishTime,
uint64 maxPublishTime
) external payable returns (PythStructs.PriceFeed[] memory priceFeeds);
The important part is: This method may store the price updates on-chain, if they are more recent than the current stored prices.
If we are passing false to storeUpdatesIfFresh, then the data will not be stored, yet, the natspec says it may be stored. Either the value should be true or the natspec updated.