fix(eth): update legacy updateFee method pricing

This commit is contained in:
Ali Behjati 2023-08-31 11:04:18 +02:00
parent 85d5170ddb
commit e1ae1ad1c4
3 changed files with 7 additions and 4 deletions

2
package-lock.json generated
View File

@ -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",

View File

@ -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";
}
}

View File

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