Skip to content

Commit

Permalink
Merge pull request #173 from 0xPolygonHermez/hotfix/vcounters-deploy
Browse files Browse the repository at this point in the history
Fix handling steps for deploy
  • Loading branch information
krlosMata authored May 6, 2024
2 parents 624370f + 6353899 commit cd984f4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/virtual-counters-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -1154,6 +1154,7 @@ module.exports = class VirtualCountersManager {
this._reduceCounters(10, 'S');
for (let i = 0; i < input.pushBytes; i++) {
this._reduceCounters(10, 'S');
this._SHLarith();
}
}
} else {
Expand Down Expand Up @@ -1351,7 +1352,7 @@ module.exports = class VirtualCountersManager {

_opcode(input) {
this._reduceCounters(12, 'S');
if (input.isCreate2 || input.isCreate || input.isDeploy) {
if (input.isCreate2 || input.isCreate) {
this._mLoadX();
this._SHRarith();
}
Expand Down Expand Up @@ -1697,8 +1698,8 @@ module.exports = class VirtualCountersManager {
}

_SHLarith() {
this._reduceCounters(100, 'S');
this._reduceCounters(4, 'B');
this._reduceCounters(40, 'S');
this._reduceCounters(2, 'B');
this._reduceCounters(2, 'A');
}

Expand Down

0 comments on commit cd984f4

Please sign in to comment.