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

refactor: change startTime and endTime types to uint64 in MockPyth and related ABIs

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

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

@@ -236,8 +236,8 @@ contract MockPyth is AbstractPyth {
      */
     function createTwapPriceFeedUpdateData(
         bytes32 id,
-        uint startTime,
-        uint endTime,
+        uint64 startTime,
+        uint64 endTime,
         int64 price,
         uint64 conf,
         int32 expo,

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

@@ -35,9 +35,9 @@ contract PythStructs {
         // The price ID.
         bytes32 id;
         // Start time of the TWAP
-        uint startTime;
+        uint64 startTime;
         // End time of the TWAP
-        uint endTime;
+        uint64 endTime;
         // TWAP price
         Price twap;
         // Down slot ratio represents the ratio of price feed updates that were missed or unavailable

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

@@ -589,14 +589,14 @@
             "type": "bytes32"
           },
           {
-            "internalType": "uint256",
+            "internalType": "uint64",
             "name": "startTime",
-            "type": "uint256"
+            "type": "uint64"
           },
           {
-            "internalType": "uint256",
+            "internalType": "uint64",
             "name": "endTime",
-            "type": "uint256"
+            "type": "uint64"
           },
           {
             "components": [

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

@@ -479,14 +479,14 @@
             "type": "bytes32"
           },
           {
-            "internalType": "uint256",
+            "internalType": "uint64",
             "name": "startTime",
-            "type": "uint256"
+            "type": "uint64"
           },
           {
-            "internalType": "uint256",
+            "internalType": "uint64",
             "name": "endTime",
-            "type": "uint256"
+            "type": "uint64"
           },
           {
             "components": [

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

@@ -30,11 +30,6 @@
     "name": "InvalidTwapUpdateDataSet",
     "type": "error"
   },
-  {
-    "inputs": [],
-    "name": "InvalidUpdateData",
-    "type": "error"
-  },
   {
     "inputs": [],
     "name": "NoFreshUpdate",
@@ -190,6 +185,16 @@
         "name": "id",
         "type": "bytes32"
       },
+      {
+        "internalType": "uint64",
+        "name": "startTime",
+        "type": "uint64"
+      },
+      {
+        "internalType": "uint64",
+        "name": "endTime",
+        "type": "uint64"
+      },
       {
         "internalType": "int64",
         "name": "price",
@@ -206,14 +211,9 @@
         "type": "int32"
       },
       {
-        "internalType": "uint64",
-        "name": "publishTime",
-        "type": "uint64"
-      },
-      {
-        "internalType": "uint64",
-        "name": "publishSlot",
-        "type": "uint64"
+        "internalType": "uint32",
+        "name": "downSlotsRatio",
+        "type": "uint32"
       }
     ],
     "name": "createTwapPriceFeedUpdateData",
@@ -728,14 +728,14 @@
             "type": "bytes32"
           },
           {
-            "internalType": "uint256",
+            "internalType": "uint64",
             "name": "startTime",
-            "type": "uint256"
+            "type": "uint64"
           },
           {
-            "internalType": "uint256",
+            "internalType": "uint64",
             "name": "endTime",
-            "type": "uint256"
+            "type": "uint64"
           },
           {
             "components": [

+ 4 - 4
target_chains/ethereum/sdk/solidity/abis/PythUtils.json

@@ -101,14 +101,14 @@
             "type": "bytes32"
           },
           {
-            "internalType": "uint256",
+            "internalType": "uint64",
             "name": "startTime",
-            "type": "uint256"
+            "type": "uint64"
           },
           {
-            "internalType": "uint256",
+            "internalType": "uint64",
             "name": "endTime",
-            "type": "uint256"
+            "type": "uint64"
           },
           {
             "components": [