Aditya Arora 9 months ago
parent
commit
5f20dc113a
1 changed files with 10 additions and 0 deletions
  1. 10 0
      target_chains/ethereum/contracts/contracts/pyth/Pyth.sol

+ 10 - 0
target_chains/ethereum/contracts/contracts/pyth/Pyth.sol

@@ -379,6 +379,16 @@ abstract contract Pyth is
                     revert PythErrors.InvalidUpdateData();
                 }
 
+                for (uint j = 0; j < numUpdatesFirst; j++) {
+                    PythInternalStructs.TwapPriceInfo memory twapPriceInfoFirst;
+                    PythInternalStructs.TwapPriceInfo memory twapPriceInfoSecond;
+                    bytes32 priceIdFirst;
+                    bytes32 priceIdSecond;
+
+                    (offsetFirst, twapPriceInfoFirst, priceIdFirst) = extractPriceInfoFromMerkleProof(digestFirst, encodedFirst, offsetFirst);
+                    (offsetSecond, twapPriceInfoSecond, priceIdSecond) = extractPriceInfoFromMerkleProof(digestSecond, encodedSecond, offsetSecond);
+                }
+
                 
             } else {
                 revert PythErrors.InvalidUpdateData();