From 51cf856380bc977c8c33a7d82d161dc6096a84cc Mon Sep 17 00:00:00 2001 From: Ali Behjati Date: Thu, 31 Aug 2023 11:04:18 +0200 Subject: [PATCH] fix(eth): update legacy updateFee method pricing --- package-lock.json | 2 +- target_chains/ethereum/contracts/contracts/pyth/Pyth.sol | 7 +++++-- target_chains/ethereum/contracts/package.json | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 50617c94c4..044ed06ea3 100644 --- a/package-lock.json +++ b/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", diff --git a/target_chains/ethereum/contracts/contracts/pyth/Pyth.sol b/target_chains/ethereum/contracts/contracts/pyth/Pyth.sol index 01ce154226..6803177e02 100644 --- a/target_chains/ethereum/contracts/contracts/pyth/Pyth.sol +++ b/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"; } } diff --git a/target_chains/ethereum/contracts/package.json b/target_chains/ethereum/contracts/package.json index c24bce9cf2..0a0050ef29 100644 --- a/target_chains/ethereum/contracts/package.json +++ b/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": {