diff --git a/deployment/registry.py b/deployment/registry.py index ff688f41..79f533c3 100644 --- a/deployment/registry.py +++ b/deployment/registry.py @@ -4,11 +4,10 @@ from typing import Dict, List, NamedTuple, Optional from ape.contracts import ContractInstance -from eth_typing import ChecksumAddress -from eth_utils import to_checksum_address - from deployment.params import get_contract_container from deployment.utils import check_registry_filepath +from eth_typing import ChecksumAddress +from eth_utils import to_checksum_address class RegistryEntry(NamedTuple): @@ -191,12 +190,12 @@ def merge_registries( return output_filepath -def contracts_from_registry(registry_filepath: Path): - registry_entries = read_registry(filepath=registry_filepath) - deployments = list() +def contracts_from_registry(filepath: Path) -> Dict[str, ContractInstance]: + registry_entries = read_registry(filepath=filepath) + deployments = dict() for registry_entry in registry_entries: contract_type = registry_entry.contract_name contract_container = get_contract_container(contract_type) contract_instance = contract_container.at(registry_entry.contract_address) - deployments.append(contract_instance) + deployments[contract_type] = contract_instance return deployments diff --git a/scripts/lynx/verify.py b/scripts/lynx/verify.py index 9d5228c3..4c463bb6 100644 --- a/scripts/lynx/verify.py +++ b/scripts/lynx/verify.py @@ -7,4 +7,4 @@ def main(): contracts = contracts_from_registry(REGISTRY_FILEPATH) - verify_contracts(contracts) + verify_contracts(list(contracts.values()))