-
Notifications
You must be signed in to change notification settings - Fork 20k
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
internal/ethapi: return revert reason for eth_call #21083
Merged
Merged
Changes from 23 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
fd70cfe
internal/ethapi: return revert reason for eth_call
MariusVanDerWijden 6d13d42
internal/ethapi: moved revert reason logic to doCall
MariusVanDerWijden 23312e0
accounts/abi/bind/backends: added revert reason logic to simulated ba…
MariusVanDerWijden 05eb3d5
internal/ethapi: fixed linting error
MariusVanDerWijden 92bee6b
internal/ethapi: check if require reason can be unpacked
MariusVanDerWijden 024e5a7
internal/ethapi: better error logic
MariusVanDerWijden fbdc6bb
internal/ethapi: simplify logic
MariusVanDerWijden 9f8a0b5
internal/ethapi: return vmError()
MariusVanDerWijden 7b6fbca
internal/ethapi: move handling of revert out of docall
MariusVanDerWijden ca35628
graphql: removed revert logic until spec change
MariusVanDerWijden d77770d
rpc: internal/ethapi: added custom error types
MariusVanDerWijden 9f13c66
graphql: use returndata instead of return
MariusVanDerWijden cc37ce7
accounts/abi/bind/backends: added tests for revert reason
MariusVanDerWijden d9b4bc7
internal/ethapi: add errorCode to revert error
MariusVanDerWijden 304a63c
internal/ethapi: add errorCode of 3 to revertError
MariusVanDerWijden 693db4d
internal/ethapi: unified estimateGasErrors, simplified logic
MariusVanDerWijden 5048fd1
internal/ethapi: unified handling of errors in DoEstimateGas
MariusVanDerWijden c7765c0
rpc: print error data field
rjl493456442 4515f84
accounts/abi/bind/backends: unify simulatedBackend and RPC
rjl493456442 c9deb8a
internal/ethapi: added binary data to revertError data
MariusVanDerWijden 7cdf4ee
internal/ethapi: refactored unpacking logic into newRevertError
MariusVanDerWijden 53508c5
accounts/abi/bind/backends: fix EstimateGas
rjl493456442 2d3ef53
accounts, console, internal, rpc: minor error interface cleanups
karalabe 5a62532
Revert "accounts, console, internal, rpc: minor error interface clean…
fjl e5adaec
re-apply the good parts of 2d3ef53c53
fjl 440d603
rpc: add test for returning server error data from client
fjl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if the execution is reverted with e.g.
revert(0,0)
, so that the execution did revert, butlen(res.Revert())
is0
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And the same, I guess, if the revert-data is non-abi-encoded
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If revert(0,0) or the revert data is non-abi encoded, the error from res.Err is returned.
This is "execution reverted" for revert(0,0). I've added a test for this