Ganache 7.7.x support and fixes for anvil #1652
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What I did
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