Return JSON-RPC error on eth_call revert #724
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.
Return a JSON-RPC error when calling
eth_call
results inrevert
. We decided to return the same error code and message as Parity: https://github.com/paritytech/parity-ethereum/blob/7fb33796b17a474242f24d364522ebe5c8a5beef/rpc/src/v1/helpers/errors.rs#L44.We know this is not a full implementation, but it enables us to run more tests from the OpenZeppelin suite, in particular the ones that check the revert status. We decided to stop here because there's an ongoing discussion about the RPC interface, and it'll be best for us to spend the resources when the dust is settled.
Here are some interesting links I found when investigating how to implement this: