Skip to content

Commit

Permalink
Error when a missing contract is specified to read-storage. Previousl…
Browse files Browse the repository at this point in the history
…y this just silently exited
  • Loading branch information
UsmannK committed Nov 16, 2023
1 parent e3dcf1e commit 912d6b2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions slither/tools/read_storage/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from crytic_compile import cryticparser

from slither import Slither
from slither.exceptions import SlitherError
from slither.tools.read_storage.read_storage import SlitherReadStorage, RpcInfo


Expand Down Expand Up @@ -129,6 +130,8 @@ def main() -> None:

if args.contract_name:
contracts = slither.get_contract_from_name(args.contract_name)
if len(contracts) == 0:
raise SlitherError(f"Contract {args.contract_name} not found.")
else:
contracts = slither.contracts

Expand Down

0 comments on commit 912d6b2

Please sign in to comment.