From caa64c6e326a1d67994bc2cb5fa207750fd1f2a3 Mon Sep 17 00:00:00 2001 From: hazim-j Date: Sat, 29 Jul 2023 19:11:31 +1000 Subject: [PATCH] depth >= 2 --- pkg/tracer/BundlerExecutionTracer.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkg/tracer/BundlerExecutionTracer.js b/pkg/tracer/BundlerExecutionTracer.js index a2a11940..061e5fac 100644 --- a/pkg/tracer/BundlerExecutionTracer.js +++ b/pkg/tracer/BundlerExecutionTracer.js @@ -69,7 +69,7 @@ var tracer = { this.reverts.push(toHex(frame.getOutput())); } - if (this._depth >= 3) { + if (this._depth >= 2) { // Get the final gas item for the nested frame. var nested = Object.assign( {}, @@ -99,9 +99,7 @@ var tracer = { used - nested.used + Math.ceil((nested.required * 64) / 63); // Keep track of the final gas limit. - var gas = this._executionGasStack[this._depth]; - this.executionGasLimit = - gas.required + Math.ceil(gas.largestFrame / 63); + this.executionGasLimit = this._executionGasStack[this._depth]; } } },