diff --git a/test/shard1/paymaster.test.ts b/test/shard1/paymaster.test.ts index 8a45678..f4f608b 100644 --- a/test/shard1/paymaster.test.ts +++ b/test/shard1/paymaster.test.ts @@ -149,7 +149,7 @@ describe('EntryPoint with paymaster', function () { }, accountOwner, entryPoint) await expect(entryPoint.callStatic.handleOps([op], beneficiaryAddress, { gasLimit: 1e7 - }).catch(rethrow())).to.revertedWith('TokenPaymaster: no balance') + })).to.revertedWith('FailedOp').withArgs(0, 'AA33 reverted: TokenPaymaster: no balance (pre-create)') }) it('should succeed to create account with tokens', async () => { @@ -193,7 +193,7 @@ describe('EntryPoint with paymaster', function () { if (!created) this.skip() await expect(entryPoint.callStatic.handleOps([createOp], beneficiaryAddress, { gasLimit: 1e7 - })).to.revertedWith('sender already constructed') + })).to.revertedWith('FailedOp').withArgs(0, 'AA10 sender already constructed') }) it('batched request should each pay for its share', async function () { diff --git a/test/shard2/entrypoint.test.ts b/test/shard2/entrypoint.test.ts index c965309..08737b6 100644 --- a/test/shard2/entrypoint.test.ts +++ b/test/shard2/entrypoint.test.ts @@ -343,7 +343,7 @@ describe('EntryPoint', function () { // using wrong nonce const op = await fillAndSign({ sender: account.address, nonce: 1234 }, accountOwner, entryPoint) await expect(entryPoint.callStatic.simulateValidation(op)).to - .revertedWith('AA25 invalid account nonce') + .revertedWith('FailedOp').withArgs(0, 'AA25 invalid account nonce') }) it('should report signature failure without revert', async () => { @@ -362,13 +362,13 @@ describe('EntryPoint', function () { verificationGasLimit: 1000 }, accountOwner, entryPoint) await expect(entryPoint.callStatic.simulateValidation(op)).to - .revertedWith('AA20 account not deployed') + .revertedWith('FailedOp').withArgs(0, 'AA20 account not deployed') }) it('should revert on oog if not enough verificationGas', async () => { const op = await fillAndSign({ sender: account.address, verificationGasLimit: 1000 }, accountOwner, entryPoint) await expect(entryPoint.callStatic.simulateValidation(op)).to - .revertedWith('AA23 reverted (or OOG)') + .revertedWith('FailedOp').withArgs(0, 'AA23 reverted (or OOG)') }) it('should succeed if validateUserOp succeeds', async () => { @@ -435,7 +435,7 @@ describe('EntryPoint', function () { }, accountOwner1, entryPoint) await expect( entryPoint.callStatic.simulateValidation(op) - ).to.revertedWith('gas values overflow') + ).to.revertedWith('AA94 gas values overflow') }) it('should fail creation for wrong sender', async () => { @@ -445,7 +445,7 @@ describe('EntryPoint', function () { verificationGasLimit: 3e6 }, accountOwner1, entryPoint) await expect(entryPoint.callStatic.simulateValidation(op1)) - .to.revertedWith('AA14 initCode must return sender') + .to.revertedWith('FailedOp').withArgs(0, 'AA14 initCode must return sender') }) it('should report failure on insufficient verificationGas (OOG) for creation', async () => { @@ -469,7 +469,7 @@ describe('EntryPoint', function () { maxFeePerGas: 0 }, accountOwner1, entryPoint) await expect(entryPoint.callStatic.simulateValidation(op1, { gasLimit: 1e6 })) - .to.revertedWith('AA13 initCode failed or OOG') + .to.revertedWith('FailedOp').withArgs(0, 'AA13 initCode failed or OOG') }) it('should succeed for creating an account', async () => { diff --git a/test/shard3/entrypoint.test.ts b/test/shard3/entrypoint.test.ts index 91d3964..1819b66 100644 --- a/test/shard3/entrypoint.test.ts +++ b/test/shard3/entrypoint.test.ts @@ -697,7 +697,7 @@ describe('EntryPoint', function () { await expect(entryPoint.callStatic.handleOps([createOp], beneficiaryAddress, { gasLimit: 1e7 - })).to.revertedWith('sender already constructed') + })).to.revertedWith('FailedOp').withArgs(0, 'AA10 sender already constructed') }) })