forked from nucypher/nucypher-contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Derive the registry filepath from the specified domain cli option, in…
…stead of taking the registry filepath as a cli option.
- Loading branch information
1 parent
96b8b6e
commit 6eb9eb6
Showing
5 changed files
with
52 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,27 @@ | ||
from pathlib import Path | ||
|
||
import click | ||
from ape import networks | ||
from ape.cli import NetworkBoundCommand, network_option | ||
from deployment.registry import contracts_from_registry | ||
from deployment.utils import verify_contracts | ||
from deployment.utils import registry_filepath_from_domain, verify_contracts | ||
|
||
|
||
@click.command(cls=NetworkBoundCommand) | ||
@network_option(required=True) | ||
@click.option( | ||
"--registry-filepath", | ||
"-r", | ||
help="Filepath to registry file", | ||
type=click.Path(dir_okay=False, exists=True, path_type=Path), | ||
"--domain", | ||
"-d", | ||
help="TACo domain", | ||
type=click.STRING, | ||
required=True, | ||
) | ||
def cli(network, registry_filepath): | ||
def cli(network, domain): | ||
"""Verify deployed contracts from a registry file.""" | ||
registry_filepath = registry_filepath_from_domain(domain=domain) | ||
contracts = contracts_from_registry( | ||
registry_filepath, chain_id=networks.active_provider.chain_id | ||
) | ||
verify_contracts(list(contracts.values())) | ||
|
||
|
||
if __name__ == "__main__": | ||
cli() |