Skip to content

Commit

Permalink
basic error handle contract not found error in initiate_ritual.py
Browse files Browse the repository at this point in the history
  • Loading branch information
KPrasch committed Aug 5, 2024
1 parent 0358c8c commit 31364a8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/initiate_ritual.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,13 @@ def cli(domain, duration, network, account, access_controller, fee_model, num_no
deployments = contracts_from_registry(filepath=registry_filepath, chain_id=chain_id)
coordinator = deployments[project.Coordinator.contract_type.name]

access_controller = deployments[getattr(project, access_controller).contract_type.name]
# auxiliary contracts
try:
access_controller = deployments[getattr(project, access_controller).contract_type.name]
fee_model = deployments[getattr(project, fee_model).contract_type.name]
except KeyError as e:
raise ValueError(f"Contract not found in registry for domain {domain}: {e}")

authority = transactor.get_account().address

while True:
Expand Down

0 comments on commit 31364a8

Please sign in to comment.