Эх сурвалжийг харах

fix(eth): update legacy updateFee method pricing

Ali Behjati 2 жил өмнө
parent
commit
e1ae1ad1c4

+ 1 - 1
package-lock.json

@@ -58612,7 +58612,7 @@
     },
     "target_chains/ethereum/contracts": {
       "name": "@pythnetwork/pyth-evm-contract",
-      "version": "1.3.0",
+      "version": "1.3.1",
       "license": "ISC",
       "dependencies": {
         "@certusone/wormhole-sdk": "^0.9.22",

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

@@ -98,7 +98,10 @@ abstract contract Pyth is
     function getUpdateFee(
         uint updateDataSize
     ) public view returns (uint feeAmount) {
-        return singleUpdateFeeInWei() * updateDataSize;
+        // In the accumulator update data a single update can contain
+        // up to 255 messages and we charge a singleUpdateFee per each
+        // message
+        return 255 * singleUpdateFeeInWei() * updateDataSize;
     }
 
     function getUpdateFee(
@@ -679,6 +682,6 @@ abstract contract Pyth is
     }
 
     function version() public pure returns (string memory) {
-        return "1.3.0";
+        return "1.3.1";
     }
 }

+ 1 - 1
target_chains/ethereum/contracts/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@pythnetwork/pyth-evm-contract",
-  "version": "1.3.0",
+  "version": "1.3.1",
   "description": "",
   "private": "true",
   "devDependencies": {