Skip to content

Commit

Permalink
Make contract verification script generic with click options.
Browse files Browse the repository at this point in the history
  • Loading branch information
derekpierre committed Oct 11, 2023
1 parent 55797e3 commit 39535d3
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 13 deletions.
13 changes: 0 additions & 13 deletions scripts/lynx/verify.py

This file was deleted.

24 changes: 24 additions & 0 deletions scripts/verify.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
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


@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),
required=True,
)
def cli(network, registry_filepath):
"""Verify deployed contracts from a registry file."""
contracts = contracts_from_registry(
registry_filepath, chain_id=networks.active_provider.chain_id
)
verify_contracts(list(contracts.values()))

0 comments on commit 39535d3

Please sign in to comment.