Skip to content

Commit

Permalink
SSTORE reverts when gas left is below 2300 (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
forshtat authored Sep 20, 2023
1 parent a5d2c0f commit 65f56cf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/bundler/src/BundlerCollectorTracer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,10 @@ export function bundlerCollectorTracer (): BundlerCollectorTracer {
this.lastThreeOpcodes.shift()
}
// this.debug.push(this.lastOp + '-' + opcode + '-' + log.getDepth() + '-' + log.getGas() + '-' + log.getCost())
if (log.getGas() < log.getCost()) {
if (log.getGas() < log.getCost() || (
// special rule for SSTORE with gas metering
opcode === 'SSTORE' && log.getGas() < 2300)
) {
this.currentLevel.oog = true
}

Expand Down

0 comments on commit 65f56cf

Please sign in to comment.