This repository has been archived by the owner on Jul 9, 2021. It is now read-only.
[web3-wrapper] Throws when contract returns null #1246
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.
Description
#1240
#622
In 0x packages we attempt to validate a contract call by performing an
eth_call
before submitting a transaction. This is in order to detect any reverts or revert with reasons. For example, aneth_call
forcancelOrder
.0x Exchange cancelOrder has no return value although it may throw a Revert Reason:
So a successful return will not contain any data.
Successful Response:
Whereas error responses look like the following:
Revert without supplied reason response:
By removing this check we may end up with ambiguous results on Geth and Ganache when a revert occurs, since it is not possible to determine if the
0x
response is result of a revert (without reason) or a null return data.We have contacted Geth developers in removing this ambiguous case in future versions of Geth. Discussion can be found here.
Also contacted Ganache to see if we can agree on a standard
eth_call
response. trufflesuite/ganache#222Testing instructions
Types of changes
Checklist:
[WIP]
if necessary.[sol-cov] Fixed bug
.