diff --git a/contracts/test/semantics.ts b/contracts/test/semantics.ts index 8c399ae4..bead64b5 100644 --- a/contracts/test/semantics.ts +++ b/contracts/test/semantics.ts @@ -31,11 +31,6 @@ describe('EVM Semantics', () => { } }); - // Apparently `expect().to.be.revertedWithCustomError` doesn't work sometimes - // Otherwise we could do this: - //expect(c.testCustomRevert()).to.be.revertedWithCustomError(c, 'CustomError').withArgs(errorNum); - //expect(c.testCustomViewRevert()).to.be.revertedWithCustomError(c, 'CustomError').withArgs(errorNum); - it('Error string in view call', async () => { try { await c.testViewRevert(); @@ -45,19 +40,6 @@ describe('EVM Semantics', () => { } }); - it('Error string in tx', async () => { - // Perform transaction which is expected to revert - try { - const tx = await c.testRevert(); - await tx.wait(); - expect(false).to.be.true; - } catch (x: any) { - expect(x.data).eq( - '0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000d546869734973416e4572726f7200000000000000000000000000000000000000', - ); - } - }); - it('Custom revert in view call', async () => { // Perform view call, which is expected to revert try { @@ -68,15 +50,4 @@ describe('EVM Semantics', () => { expect(x.errorName).to.eq('CustomError'); } }); - - it('Custom error in tx', async () => { - // Perform transaction which is expected to revert - try { - const tx = await c.testCustomRevert(); - await tx.wait(); - expect(false).to.be.true; - } catch (x: any) { - expect(x.data).eq('0x110b3655' + ERROR_NUM.slice(2)); - } - }); });