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 and raise VM / TX related Errors #4

Closed
antazoey opened this issue Oct 19, 2021 · 3 comments
Closed

Handle and raise VM / TX related Errors #4

antazoey opened this issue Oct 19, 2021 · 3 comments
Labels
category: feature New feature or request

Comments

@antazoey
Copy link
Member

antazoey commented Oct 19, 2021

Overview

Handle hardhat specific VM errors for a consistent ape experience as well as enabling support for ape test reverts-checking.

Specification

  • Will require not inheriting from ape_http
  • Catch errors related to contract logic and raise ContractLogicError (from ape.exceptions)
  • Raise OutOfGasError when the transaction runs out of gas
  • Raise VirtualMachineError for all other errors that occur in VM

^ See ape-http implementation as an example, but NOTE: the errors will be different so handling them will be different. One major difference may be the OutOfGasError, which has a base error that does not get raised in Geth but it does in Hardhat.

Dependencies

na

@antazoey
Copy link
Member Author

Here is what we are thinking so far on the intended use-case for ape-http: ApeWorX/ape#198

@antazoey
Copy link
Member Author

Looking at this more, the middleware aspect may not be needed. It is worth experimenting with, as it may be a better spot ti manipulate response data earlier on.

@antazoey antazoey changed the title raise VirtualMachineErrors raise VirtualMachineErrors and ContractLogicErrors Nov 7, 2021
@antazoey antazoey changed the title raise VirtualMachineErrors and ContractLogicErrors Handle and raise VM / TX related Errors Nov 7, 2021
@antazoey
Copy link
Member Author

Fixed in #10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant