Skip to content

Commit

Permalink
throw if postOp reverts
Browse files Browse the repository at this point in the history
  • Loading branch information
mouseless0x committed Oct 23, 2024
1 parent fb1d306 commit 0c30866
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions src/v07/EntryPoint.sol
Original file line number Diff line number Diff line change
Expand Up @@ -719,22 +719,25 @@ contract EntryPoint is
{

} catch {
emit PostOpRevertReason(
opInfo.userOpHash,
opInfo.mUserOp.sender,
opInfo.mUserOp.nonce,
Exec.getReturnData(REVERT_REASON_MAX_LEN)
);
actualGas = preGas - gasleft() + opInfo.preOpGas;
(
actualGasCost,
paymasterPostOpGasLimit
) = _postExecution(
IPaymaster.PostOpMode.postOpReverted,
opInfo,
context,
actualGas
revert FailedOpWithRevert(
0, "AA50 postOp reverted", Exec.getReturnData(REVERT_REASON_MAX_LEN)
);
//emit PostOpRevertReason(
// opInfo.userOpHash,
// opInfo.mUserOp.sender,
// opInfo.mUserOp.nonce,
// Exec.getReturnData(REVERT_REASON_MAX_LEN)
//);
//actualGas = preGas - gasleft() + opInfo.preOpGas;
//(
// actualGasCost,
// paymasterPostOpGasLimit
//) = _postExecution(
// IPaymaster.PostOpMode.postOpReverted,
// opInfo,
// context,
// actualGas
//);
}
paymasterPostOpGasLimit = remainingGas - gasleft();
}
Expand Down

0 comments on commit 0c30866

Please sign in to comment.