diff --git a/integration-tests/test/rpc.spec.ts b/integration-tests/test/rpc.spec.ts index 66f3cfa23a5b..b0e0a3222ffe 100644 --- a/integration-tests/test/rpc.spec.ts +++ b/integration-tests/test/rpc.spec.ts @@ -135,6 +135,15 @@ describe('Basic RPC tests', () => { expectedReverterRevertData = encodeSolidityRevertMessage(revertMessage) }) + it('should correctly identify call out-of-gas', async () => { + await expect( + provider.call({ + ...revertingTx, + gasLimit: 21_000, + }) + ).to.be.rejectedWith('out of gas') + }) + it('should correctly return solidity revert data from a call', async () => { const revertData = await provider.call(revertingTx) const expectedRevertData = encodeSolidityRevertMessage(revertMessage) @@ -151,6 +160,15 @@ describe('Basic RPC tests', () => { expect(revertData).to.eq(expectedReverterRevertData) }) + it('should correctly identify contract creation out of gas', async () => { + await expect( + provider.call({ + ...revertingDeployTx, + gasLimit: 30_000, + }) + ).to.be.rejectedWith('out of gas') + }) + it('should return the correct error message when attempting to deploy unsafe initcode', async () => { // PUSH1 0x00 PUSH1 0x00 SSTORE const unsafeCode = '0x6000600055'