From 3caa62e1e001677d3e6feffd5150c369f8c01cd7 Mon Sep 17 00:00:00 2001 From: Dror Tirosh Date: Thu, 8 Feb 2024 22:41:32 +0200 Subject: [PATCH] formatting --- contracts/core/EntryPoint.sol | 36 +++++++++++++++++------------------ reports/gas-checker.txt | 30 ++++++++++++++--------------- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/contracts/core/EntryPoint.sol b/contracts/core/EntryPoint.sol index 5efabea0..8c60208d 100644 --- a/contracts/core/EntryPoint.sol +++ b/contracts/core/EntryPoint.sol @@ -444,10 +444,10 @@ contract EntryPoint is IEntryPoint, StakeManager, NonceManager, ReentrancyGuard, uint256 requiredPrefund, uint256 verificationGasLimit ) - internal - returns ( - uint256 validationData - ) + internal + returns ( + uint256 validationData + ) { unchecked { uint256 preGas = gasleft(); @@ -463,7 +463,7 @@ contract EntryPoint is IEntryPoint, StakeManager, NonceManager, ReentrancyGuard, : requiredPrefund - bal; } try - IAccount(sender).validateUserOp{ + IAccount(sender).validateUserOp{ gas: verificationGasLimit }(op, opInfo.userOpHash, missingAccountFunds) returns (uint256 _validationData) { @@ -515,11 +515,11 @@ contract EntryPoint is IEntryPoint, StakeManager, NonceManager, ReentrancyGuard, paymasterInfo.deposit = deposit - requiredPreFund; uint256 pmVerificationGasLimit = mUserOp.paymasterVerificationGasLimit; try - IPaymaster(paymaster).validatePaymasterUserOp{gas: pmVerificationGasLimit}( - op, - opInfo.userOpHash, - requiredPreFund - ) + IPaymaster(paymaster).validatePaymasterUserOp{gas: pmVerificationGasLimit}( + op, + opInfo.userOpHash, + requiredPreFund + ) returns (bytes memory _context, uint256 _validationData) { context = _context; validationData = _validationData; @@ -610,12 +610,12 @@ contract EntryPoint is IEntryPoint, StakeManager, NonceManager, ReentrancyGuard, // and multiplied without causing overflow. uint256 verificationGasLimit = mUserOp.verificationGasLimit; uint256 maxGasValues = mUserOp.preVerificationGas | - verificationGasLimit | - mUserOp.callGasLimit | - mUserOp.paymasterVerificationGasLimit | - mUserOp.paymasterPostOpGasLimit | - mUserOp.maxFeePerGas | - mUserOp.maxPriorityFeePerGas; + verificationGasLimit | + mUserOp.callGasLimit | + mUserOp.paymasterVerificationGasLimit | + mUserOp.paymasterPostOpGasLimit | + mUserOp.maxFeePerGas | + mUserOp.maxPriorityFeePerGas; require(maxGasValues <= type(uint120).max, "AA94 gas values overflow"); uint256 requiredPreFund = _getRequiredPrefund(mUserOp); @@ -679,8 +679,8 @@ contract EntryPoint is IEntryPoint, StakeManager, NonceManager, ReentrancyGuard, actualGasCost = actualGas * gasPrice; if (mode != IPaymaster.PostOpMode.postOpReverted) { try IPaymaster(paymaster).postOp{ - gas: mUserOp.paymasterPostOpGasLimit - }(mode, context, actualGasCost, gasPrice) + gas: mUserOp.paymasterPostOpGasLimit + }(mode, context, actualGasCost, gasPrice) // solhint-disable-next-line no-empty-blocks {} catch { bytes memory reason = Exec.getReturnData(REVERT_REASON_MAX_LEN); diff --git a/reports/gas-checker.txt b/reports/gas-checker.txt index 34478994..5c1970e3 100644 --- a/reports/gas-checker.txt +++ b/reports/gas-checker.txt @@ -12,44 +12,44 @@ ║ │ │ │ (delta for │ (compared to ║ ║ │ │ │ one UserOp) │ account.exec()) ║ ╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ -║ simple │ 1 │ 79916 │ │ ║ +║ simple │ 1 │ 79940 │ │ ║ ╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ ║ simple - diff from previous │ 2 │ │ 42138 │ 13159 ║ ╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ -║ simple │ 10 │ 459309 │ │ ║ +║ simple │ 10 │ 459333 │ │ ║ ╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ -║ simple - diff from previous │ 11 │ │ 42205 │ 13226 ║ +║ simple - diff from previous │ 11 │ │ 42193 │ 13214 ║ ╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ -║ simple paymaster │ 1 │ 86066 │ │ ║ +║ simple paymaster │ 1 │ 86078 │ │ ║ ╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ -║ simple paymaster with diff │ 2 │ │ 40977 │ 11998 ║ +║ simple paymaster with diff │ 2 │ │ 40989 │ 12010 ║ ╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ -║ simple paymaster │ 10 │ 455142 │ │ ║ +║ simple paymaster │ 10 │ 455034 │ │ ║ ╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ -║ simple paymaster with diff │ 11 │ │ 41041 │ 12062 ║ +║ simple paymaster with diff │ 11 │ │ 41017 │ 12038 ║ ╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ -║ big tx 5k │ 1 │ 180972 │ │ ║ +║ big tx 5k │ 1 │ 180984 │ │ ║ ╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ -║ big tx - diff from previous │ 2 │ │ 142660 │ 17436 ║ +║ big tx - diff from previous │ 2 │ │ 142648 │ 17424 ║ ╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ -║ big tx 5k │ 10 │ 1464891 │ │ ║ +║ big tx 5k │ 10 │ 1464927 │ │ ║ ╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ -║ big tx - diff from previous │ 11 │ │ 142644 │ 17420 ║ +║ big tx - diff from previous │ 11 │ │ 142608 │ 17384 ║ ╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ ║ paymaster+postOp │ 1 │ 87743 │ │ ║ ╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ -║ paymaster+postOp with diff │ 2 │ │ 42642 │ 13663 ║ +║ paymaster+postOp with diff │ 2 │ │ 42630 │ 13651 ║ ╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ ║ paymaster+postOp │ 10 │ 471800 │ │ ║ ╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ -║ paymaster+postOp with diff │ 11 │ │ 42687 │ 13708 ║ +║ paymaster+postOp with diff │ 11 │ │ 42651 │ 13672 ║ ╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ ║ token paymaster │ 1 │ 128772 │ │ ║ ╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ ║ token paymaster with diff │ 2 │ │ 66381 │ 37402 ║ ╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ -║ token paymaster │ 10 │ 726382 │ │ ║ +║ token paymaster │ 10 │ 726454 │ │ ║ ╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ -║ token paymaster with diff │ 11 │ │ 66473 │ 37494 ║ +║ token paymaster with diff │ 11 │ │ 66377 │ 37398 ║ ╚════════════════════════════════╧═══════╧═══════════════╧════════════════╧═════════════════════╝