Merge pull request #2235 from UsmannK/usmannk/add-missing-contract-error

Raise an error when a missing contract is specified to read-storage
pull/2239/head
alpharush 1 year ago committed by GitHub
commit 456a414c84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      slither/tools/read_storage/__main__.py

@ -7,6 +7,7 @@ import argparse
from crytic_compile import cryticparser
from slither import Slither
from slither.exceptions import SlitherError
from slither.tools.read_storage.read_storage import SlitherReadStorage, RpcInfo
@ -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

Loading…
Cancel
Save