We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f8c8ac2 commit 3ab3f0dCopy full SHA for 3ab3f0d
target_chains/ethereum/contracts/contracts/pyth/Pyth.sol
@@ -370,6 +370,8 @@ abstract contract Pyth is
370
override
371
returns (PythStructs.TwapPriceFeed[] memory twapPriceFeeds)
372
{
373
+ // TWAP requires exactly 2 updates - one for the start point and one for the end point
374
+ // to calculate the time-weighted average price between those two points
375
if (updateData.length != 2) {
376
revert PythErrors.InvalidUpdateData();
377
}
0 commit comments