-
Notifications
You must be signed in to change notification settings - Fork 369
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
Web3 usages should handle errors returned when view calls revert #2915
Labels
Comments
barbaraliau
added
Component: CLI
Component: ContractKit
Applications
Applications circle tasks
labels
Feb 19, 2021
This was referenced Dec 6, 2021
This was referenced Apr 3, 2022
This issue is stale and will be closed in 30 days without activity |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Expected Behavior
When a view call reverts it should be handled as an error.
Current Behavior
Due to ethereum/go-ethereum#19027 the
eth_call
RPC returns the error code as the return value which gets interpreted byweb3
be a valid value. This includes either casting it to anumber
orboolean
which makes it difficult to differentiate from valid values.This was discovered during the Baklava hotfix process when one of the view calls used by the CLI would revert and lead to the CLI reporting the hotfix was passing, when in fact it was not. This could lead to much more serious issues if not addressed.
The text was updated successfully, but these errors were encountered: