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

Raise an error when a missing contract is specified to read-storage #2235

Merged
merged 1 commit into from
Nov 18, 2023

Conversation

UsmannK
Copy link
Contributor

@UsmannK UsmannK commented Nov 16, 2023

Before:

$ slither-read-storage 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 --contract-name WETH8 # woops! did you mean WETH9?
$ # silently fails

After

$ slither-read-storage 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 --contract-name WETH8
Traceback (most recent call last):
  File "/Users/usmannkhan/Development/slither/env/bin/slither-read-storage", line 8, in <module>
    sys.exit(main())
  File "/Users/usmannkhan/Development/slither/slither/tools/read_storage/__main__.py", line 134, in main
    raise SlitherError(f"Contract {args.contract_name} not found.")
slither.exceptions.SlitherError: Contract WETH8 not found.

@UsmannK UsmannK requested a review from 0xalpharush as a code owner November 16, 2023 22:20
@0xalpharush 0xalpharush changed the base branch from master to dev November 18, 2023 10:21
@0xalpharush 0xalpharush merged commit 456a414 into crytic:dev Nov 18, 2023
74 checks passed
@UsmannK UsmannK deleted the usmannk/add-missing-contract-error branch November 19, 2023 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants