Forráskód Böngészése

chore: rename downSlotRatio to downSlotsRatio

Daniel Chew 7 hónapja
szülő
commit
c842b9def5

+ 2 - 2
target_chains/ethereum/contracts/contracts/pyth/Pyth.sol

@@ -601,14 +601,14 @@ abstract contract Pyth is
         twapPriceFeed.startTime = twapPriceInfoStart.publishTime;
         twapPriceFeed.endTime = twapPriceInfoEnd.publishTime;
 
-        // Calculate downSlotRatio as a value between 0 and 1,000,000
+        // Calculate downSlotsRatio as a value between 0 and 1,000,000
         // 0 means no slots were missed, 1,000,000 means all slots were missed
         uint64 totalDownSlots = twapPriceInfoEnd.numDownSlots -
             twapPriceInfoStart.numDownSlots;
         uint64 downSlotsRatio = (totalDownSlots * 1_000_000) / slotDiff;
 
         // Safely downcast to uint32 (sufficient for value range 0-1,000,000)
-        twapPriceFeed.downSlotRatio = uint32(downSlotsRatio);
+        twapPriceFeed.downSlotsRatio = uint32(downSlotsRatio);
 
         return twapPriceFeed;
     }

+ 2 - 2
target_chains/ethereum/sdk/solidity/IPythEvents.sol

@@ -22,13 +22,13 @@ interface IPythEvents {
     /// @param endTime End time of the TWAP.
     /// @param twapPrice Price of the TWAP.
     /// @param twapConf Confidence interval of the TWAP.
-    /// @param downSlotRatio Down slot ratio of the TWAP.
+    /// @param downSlotsRatio Down slot ratio of the TWAP.
     event TwapPriceFeedUpdate(
         bytes32 indexed id,
         uint64 startTime,
         uint64 endTime,
         int64 twapPrice,
         uint64 twapConf,
-        uint32 downSlotRatio
+        uint32 downSlotsRatio
     );
 }

+ 3 - 3
target_chains/ethereum/sdk/solidity/MockPyth.sol

@@ -284,7 +284,7 @@ contract MockPyth is AbstractPyth {
             endTime,
             twapFeed.twap.price,
             twapFeed.twap.conf,
-            twapFeed.downSlotRatio
+            twapFeed.downSlotsRatio
         );
     }
 
@@ -342,13 +342,13 @@ contract MockPyth is AbstractPyth {
         twapPriceFeed.twap.expo = twapPriceInfoStart.expo;
         twapPriceFeed.twap.publishTime = twapPriceInfoEnd.publishTime;
 
-        // Calculate downSlotRatio as a value between 0 and 1,000,000
+        // Calculate downSlotsRatio as a value between 0 and 1,000,000
         uint64 totalDownSlots = twapPriceInfoEnd.numDownSlots -
             twapPriceInfoStart.numDownSlots;
         uint64 downSlotsRatio = (totalDownSlots * 1_000_000) / slotDiff;
 
         // Safely downcast to uint32 (sufficient for value range 0-1,000,000)
-        twapPriceFeed.downSlotRatio = uint32(downSlotsRatio);
+        twapPriceFeed.downSlotsRatio = uint32(downSlotsRatio);
 
         return twapPriceFeed;
     }

+ 1 - 1
target_chains/ethereum/sdk/solidity/PythStructs.sol

@@ -41,6 +41,6 @@ contract PythStructs {
         // TWAP price
         Price twap;
         // Down slot ratio
-        uint32 downSlotRatio;
+        uint32 downSlotsRatio;
     }
 }

+ 2 - 2
target_chains/ethereum/sdk/solidity/abis/AbstractPyth.json

@@ -81,7 +81,7 @@
       {
         "indexed": false,
         "internalType": "uint32",
-        "name": "downSlotRatio",
+        "name": "downSlotsRatio",
         "type": "uint32"
       }
     ],
@@ -627,7 +627,7 @@
           },
           {
             "internalType": "uint32",
-            "name": "downSlotRatio",
+            "name": "downSlotsRatio",
             "type": "uint32"
           }
         ],

+ 2 - 2
target_chains/ethereum/sdk/solidity/abis/IPyth.json

@@ -66,7 +66,7 @@
       {
         "indexed": false,
         "internalType": "uint32",
-        "name": "downSlotRatio",
+        "name": "downSlotsRatio",
         "type": "uint32"
       }
     ],
@@ -517,7 +517,7 @@
           },
           {
             "internalType": "uint32",
-            "name": "downSlotRatio",
+            "name": "downSlotsRatio",
             "type": "uint32"
           }
         ],

+ 1 - 1
target_chains/ethereum/sdk/solidity/abis/IPythEvents.json

@@ -66,7 +66,7 @@
       {
         "indexed": false,
         "internalType": "uint32",
-        "name": "downSlotRatio",
+        "name": "downSlotsRatio",
         "type": "uint32"
       }
     ],

+ 2 - 2
target_chains/ethereum/sdk/solidity/abis/MockPyth.json

@@ -122,7 +122,7 @@
       {
         "indexed": false,
         "internalType": "uint32",
-        "name": "downSlotRatio",
+        "name": "downSlotsRatio",
         "type": "uint32"
       }
     ],
@@ -722,7 +722,7 @@
           },
           {
             "internalType": "uint32",
-            "name": "downSlotRatio",
+            "name": "downSlotsRatio",
             "type": "uint32"
           }
         ],