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

Ganache 7.7.x support and fixes for anvil #1652

Merged
merged 4 commits into from
Jan 29, 2023

Conversation

wirew0lf
Copy link
Contributor

What I did

  • Fixed anvil support. Anvil doesn't return the memory key in the debug_traceTransaction RPC response, this prevented from accessing the return_value property of a transaction, as well as events and other functionalities.
  • Added support for Ganache 7.7.x

Related issue: #1644

How I did it

Added the enableMemory parameter in the RPC debug_traceTransaction request, Anvil doesn't show the memory by default so this will enable anvil compatibility for return_value, events and traces.

Also added some checks before converting the "gasCost" and "pc" keys from hex to int. In Ganache 7.7.x gas is returned as a string in hex. However, unlike in nethermind gasCost and pc are ints, this caused an error when trying to convert the int and prevented brownie from working with the new ganache versions.

How to verify it

Pass the tests or check return_value property from a transaction in Anvil or Ganache 7.7.x.

Checklist

  • [ x] I have confirmed that my PR passes all linting checks
  • [ x] I have included test cases
  • [ x] I have updated the documentation
  • [ x] I have added an entry to the changelog

@iamdefinitelyahuman iamdefinitelyahuman merged commit 255de2d into eth-brownie:master Jan 29, 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.

2 participants