Skip to content
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

Closed
nategraf opened this issue Feb 24, 2020 · 1 comment
Closed

Web3 usages should handle errors returned when view calls revert #2915

nategraf opened this issue Feb 24, 2020 · 1 comment

Comments

@nategraf
Copy link
Contributor

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 by web3 be a valid value. This includes either casting it to a number or boolean 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.

@github-actions
Copy link
Contributor

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
Projects
None yet
Development

No branches or pull requests

2 participants