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

feat: Add standard error support [APE-914] #99

Merged
merged 8 commits into from
May 31, 2023

Conversation

OwlOfMoistness
Copy link
Contributor

@OwlOfMoistness OwlOfMoistness commented Apr 30, 2023

What I did

Added a StandardError class object to provide support for built-in errors of the solidity compiler via the Panic(uint256) error.

fixes: Being able to support built-in errors inside the ape.reverts(StandardError.some_standard_error)

How I did it

Added the object in the _utils file and then imported the object in the init file

How to verify it

Checklist

  • Passes all linting checks (pre-commit and CI jobs)
  • No new test cases
  • Documentation has been updated
  • PR title follows Conventional Commit standard (will be automatically included in the changelog)

@vany365 vany365 changed the title Add standard error support Add standard error support [APE-914] Apr 30, 2023
@OwlOfMoistness OwlOfMoistness changed the title Add standard error support [APE-914] add: Add standard error support [APE-914] Apr 30, 2023
@OwlOfMoistness OwlOfMoistness changed the title add: Add standard error support [APE-914] feat: Add standard error support [APE-914] Apr 30, 2023
ape_solidity/_utils.py Outdated Show resolved Hide resolved
@antazoey antazoey force-pushed the feat/add_standard_error_support branch from e01f240 to 49c7997 Compare May 30, 2023 17:48
fubuloubu
fubuloubu previously approved these changes May 30, 2023
ape_solidity/compiler.py Outdated Show resolved Hide resolved
ape_solidity/exceptions.py Show resolved Hide resolved
Co-authored-by: El De-dog-lo <3859395+fubuloubu@users.noreply.github.com>
@antazoey
Copy link
Member

antazoey commented May 31, 2023

  • bump to next Ape version (still unreleased) or comment out tests or skip test

Copy link
Member

@fubuloubu fubuloubu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not ideal to use pkg-resources, but works for now

@antazoey
Copy link
Member

Not ideal to use pkg-resources, but works for now

we are already using it somewhere it seems, but at least for this part we can delete after 0.6.11 comes out

@antazoey antazoey enabled auto-merge (squash) May 31, 2023 19:05
@antazoey antazoey merged commit d3c391e into ApeWorX:main May 31, 2023
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.

3 participants