From 0fe1ee555998640a014f4a535f2b0e60e5b05cc9 Mon Sep 17 00:00:00 2001 From: shahafn Date: Thu, 30 Jan 2025 14:05:23 +0200 Subject: [PATCH] Remove logs, fix test --- contracts/core/EntryPoint.sol | 4 ---- test/entrypoint.test.ts | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/contracts/core/EntryPoint.sol b/contracts/core/EntryPoint.sol index 9ba7ef05..eb820a33 100644 --- a/contracts/core/EntryPoint.sol +++ b/contracts/core/EntryPoint.sol @@ -721,7 +721,6 @@ contract EntryPoint is IEntryPoint, StakeManager, NonceManager, ReentrancyGuardT uint256 executionGasUsed = actualGas - opInfo.preOpGas; // this check is required for the gas used within EntryPoint and not covered by explicit gas limits actualGas += _getUnusedGasPenalty(executionGasUsed, mUserOp.callGasLimit); -// console.log("unused execution gas penalty", _getUnusedGasPenalty(executionGasUsed, mUserOp.callGasLimit)); } uint256 postOpUnusedGasPenalty; if (paymaster == address(0)) { @@ -730,7 +729,6 @@ contract EntryPoint is IEntryPoint, StakeManager, NonceManager, ReentrancyGuardT refundAddress = paymaster; if (context.length > 0) { actualGasCost = actualGas * gasPrice; -// console.log("actual gas and cost that paymaster gets", actualGas, actualGasCost); uint256 postOpPreGas = gasleft(); if (mode != IPaymaster.PostOpMode.postOpReverted) { try IPaymaster(paymaster).postOp{ @@ -744,13 +742,11 @@ contract EntryPoint is IEntryPoint, StakeManager, NonceManager, ReentrancyGuardT } uint256 postOpGasUsed = postOpPreGas - gasleft(); postOpUnusedGasPenalty = _getUnusedGasPenalty(postOpGasUsed, mUserOp.paymasterPostOpGasLimit); -// console.log("unused postOp gas penalty", _getUnusedGasPenalty(postOpGasUsed, mUserOp.paymasterPostOpGasLimit)); } } // Calculating a penalty for unused postOp gas actualGas += preGas - gasleft() + postOpUnusedGasPenalty; actualGasCost = actualGas * gasPrice; -// console.log("True actual gas and cost for tx", actualGas, actualGasCost); uint256 prefund = opInfo.prefund; if (prefund < actualGasCost) { if (mode == IPaymaster.PostOpMode.postOpReverted) { diff --git a/test/entrypoint.test.ts b/test/entrypoint.test.ts index 9e66a360..bf522d50 100644 --- a/test/entrypoint.test.ts +++ b/test/entrypoint.test.ts @@ -1267,7 +1267,7 @@ describe('EntryPoint', function () { const unpackedOp = { maxFeePerGas: 1, maxPriorityFeePerGas: 1, - callGasLimit: 5e4, + callGasLimit: 5e5, paymaster: paymaster.address, paymasterVerificationGasLimit: 1e6, callData: accountExecFromEntryPoint.data,