Remove SolidityError from eth-tester #1813
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 was wrong?
This is a backwards incompatible bugfix that returns eth-tester functionality to what it was before 5.13.0
@fubuloubu pointed out that vyper tests were failing since web3 converts eth-tester's
TransactionFailed
error to aSolidityError
, and we weren't handling the empty response message quite right. eth-tester couldn't decode the empty error message on arevert
. I added logic to try anddecode_single
on the error message, and if that fails, just return the plain, undecoded error message. I also discovered that we didn't have any tests that check what happens if the revert error message is empty, so I added some.When estimateGas gets reverted and doesn't have an error message, Parity returns a generic error message, so I opted to leave it as a ValueError, instead of catching it and returning a SolidityError, since I'm not sure we can reliably determine if it comes from a
revert
or not.How was it fixed?
I did a couple things in this PR:
Todo:
Cute Animal Picture