@@ -17,14 +17,9 @@ import "account-abstraction/core/UserOperationLib.sol";
17
17
import "@openzeppelin/contracts/utils/introspection/ERC165.sol " ;
18
18
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol " ;
19
19
20
- /*
21
- * Account-Abstraction (EIP-4337) singleton EntryPoint implementation.
22
- * Only one instance required on each chain.
23
- */
24
-
25
- /// @custom:security-contact https://bounty.ethereum.org
26
20
contract EntryPoint is IEntryPoint , StakeManager , NonceManager , ReentrancyGuard {
27
- // ERC165
21
+ // Custom event for bubbling up callphase reverts.
22
+ error CallPhaseReverted (bytes reason );
28
23
29
24
using UserOperationLib for PackedUserOperation;
30
25
@@ -289,10 +284,13 @@ contract EntryPoint is IEntryPoint, StakeManager, NonceManager, ReentrancyGuard
289
284
bool success = Exec.call (mUserOp.sender, 0 , callData, callGasLimit);
290
285
if (! success) {
291
286
bytes memory result = Exec.getReturnData (REVERT_REASON_MAX_LEN);
292
- if (result.length > 0 ) {
293
- emit UserOperationRevertReason (opInfo.userOpHash, mUserOp.sender, mUserOp.nonce, result);
294
- }
295
- mode = IPaymaster.PostOpMode.opReverted;
287
+ revert CallPhaseReverted (result);
288
+
289
+ //bytes memory result = Exec.getReturnData(REVERT_REASON_MAX_LEN);
290
+ //if (result.length > 0) {
291
+ // emit UserOperationRevertReason(opInfo.userOpHash, mUserOp.sender, mUserOp.nonce, result);
292
+ //}
293
+ //mode = IPaymaster.PostOpMode.opReverted;
296
294
}
297
295
}
298
296
@@ -517,7 +515,7 @@ contract EntryPoint is IEntryPoint, StakeManager, NonceManager, ReentrancyGuard
517
515
518
516
function _accountValidation (uint256 opIndex , PackedUserOperation calldata userOp , UserOpInfo memory outOpInfo )
519
517
public
520
- returns (uint256 validationData , uint256 paymasterValidationData , uint256 paymasterVerificationGasLimit )
518
+ returns (uint256 validationData , uint256 _paymasterValidationData , uint256 paymasterVerificationGasLimit )
521
519
{
522
520
uint256 preGas = gasleft ();
523
521
MemoryUserOp memory mUserOp = outOpInfo.mUserOp;
0 commit comments