Commit 52d9e6b7 authored by ben-chain's avatar ben-chain Committed by GitHub

test[integration-tests]: l2geth call and creation OOG (#839)

parent c949803f
......@@ -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'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment