From 081ee7ab018d212ce8bcc17cd8905e70b89ce636 Mon Sep 17 00:00:00 2001 From: Alex Forshtat Date: Tue, 31 Oct 2023 12:46:24 +0200 Subject: [PATCH] Address PR comments --- contracts/core/EntryPoint.sol | 3 ++- test/entrypoint.test.ts | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/contracts/core/EntryPoint.sol b/contracts/core/EntryPoint.sol index 8e587074..afcaccf1 100644 --- a/contracts/core/EntryPoint.sol +++ b/contracts/core/EntryPoint.sol @@ -665,8 +665,9 @@ contract EntryPoint is IEntryPoint, StakeManager, NonceManager, ReentrancyGuard, try IPaymaster(paymaster).postOp{ gas: mUserOp.verificationGasLimit }(mode, context, actualGasCost) + // solhint-disable-next-line no-empty-blocks {} catch (bytes memory reason) { - revert(string(abi.encodePacked("AA96 postOp reverted", reason))); + revert(string(abi.encodePacked("AA96 reverted:", reason))); } } } diff --git a/test/entrypoint.test.ts b/test/entrypoint.test.ts index 01588fe6..86e6bad8 100644 --- a/test/entrypoint.test.ts +++ b/test/entrypoint.test.ts @@ -1107,7 +1107,9 @@ describe('EntryPoint', function () { callGasLimit: 1e6 }, account3Owner, entryPoint) const beneficiaryAddress = createAddress() - await entryPoint.handleOps([op], beneficiaryAddress) + const rcpt1 = await entryPoint.handleOps([op], beneficiaryAddress).then(async t => await t.wait()) + const logs1 = await entryPoint.queryFilter(entryPoint.filters.UserOperationEvent(), rcpt1.blockHash) + expect(logs1[0].args.success).to.be.false }) it('paymaster should pay for tx', async function () {