Skip to content

eth_estimateGas can succeed even though a transaction will fail for txs close to the gas limit #764

@platocrat

Description

@platocrat

Describe the bug
After resolving his error with CALL_EXCEPTION in #717, @kesar is running into this new error when running his integration tests with yarn test:ovm:

AssertionError: Expected event "Deployed" to be emitted, but it wasn't

For context as to why this AssertionError is being thrown, his MarketFactory.sol contract has emits a Deployed event after creating MarketERC721.
See the create method of MarketFactory.sol for reference.

To Reproduce
Steps to reproduce the behavior:

  1. Clone @kesar's project: git clone git@github.com:PrediqtCom/prediqt-core.git
  2. Install project deps: yarn
  3. Start optimism/ops containers
  4. Compile prediqt-core contracts for the OVM and run integration tests: yarn hardhat compile --network optimism && yarn test:ovm
  5. See error:

Screen Shot 2021-05-05 at 10 30 01 AM

Expected behavior
We expect to receive an error message regarding the contract failing to deploy, however, it appears that the contract is failing silently.

Additional context
In MarketERC721 there is a check for an acceptable timestamp. We've confirmed that this works on L1 by changing the resolution value in Market.test.ts and seeing that the require message is returned when the _timestamp is less than block.timestamp.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bugsS-confirmedStatus: A confirmed bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions