Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle contracts not found during revert check #1195

Merged

Conversation

jeffywu
Copy link
Contributor

@jeffywu jeffywu commented Aug 11, 2021

What I did

Added a check in _raise_if_reverted to skip the dev_revert_string lookup if the contract is not found. This can happen if the contract is deployed via another contract (or somehow otherwise not logged in the deployment map).

How I did it

I added an if statement.

How to verify it

Deploy a contract from inside a contract and check if it reverts. A test like this should pass:

with brownie.reverts():
    contract.transactionWillRevert()

Checklist

  • [YES?] I have confirmed that my PR passes all linting checks
  • [NO] I have included test cases
  • [N/A] I have updated the documentation
  • [YES] I have added an entry to the changelog

@iamdefinitelyahuman iamdefinitelyahuman merged commit fa6a131 into eth-brownie:master Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants