mirror of https://github.com/nucypher/nucypher.git
Update nucypher_agents script.
parent
80d6d536ef
commit
0411ab4be6
|
@ -42,71 +42,60 @@ emitter = StdoutEmitter(verbosity=2)
|
||||||
|
|
||||||
@click.command()
|
@click.command()
|
||||||
@click.option(
|
@click.option(
|
||||||
"--eth-provider",
|
"--network",
|
||||||
"eth_provider_uri",
|
"network",
|
||||||
|
help="TACo network",
|
||||||
|
type=click.Choice(NetworksInventory.SUPPORTED_NETWORK_NAMES),
|
||||||
|
default="lynx",
|
||||||
|
)
|
||||||
|
@click.option(
|
||||||
|
"--eth-endpoint",
|
||||||
|
"eth_endpoint",
|
||||||
help="ETH staking network provider URI",
|
help="ETH staking network provider URI",
|
||||||
type=click.STRING,
|
type=click.STRING,
|
||||||
required=True,
|
required=True,
|
||||||
)
|
)
|
||||||
@click.option(
|
@click.option(
|
||||||
"--eth-staking-network",
|
"--polygon-endpoint",
|
||||||
"eth_staking_network",
|
"polygon_endpoint",
|
||||||
help="ETH staking network",
|
help="Polygon network provider URI",
|
||||||
type=click.Choice(NetworksInventory.ETH_NETWORKS),
|
|
||||||
default="lynx",
|
|
||||||
)
|
|
||||||
@click.option(
|
|
||||||
"--coordinator-provider",
|
|
||||||
"coordinator_provider_uri",
|
|
||||||
help="Coordinator network provider URI",
|
|
||||||
type=click.STRING,
|
type=click.STRING,
|
||||||
required=True,
|
required=True,
|
||||||
)
|
)
|
||||||
@click.option(
|
|
||||||
"--coordinator-network",
|
|
||||||
"coordinator_network",
|
|
||||||
help="Coordinator network",
|
|
||||||
type=click.Choice(NetworksInventory.POLY_NETWORKS),
|
|
||||||
default="mumbai",
|
|
||||||
)
|
|
||||||
def nucypher_agents(
|
def nucypher_agents(
|
||||||
eth_provider_uri,
|
network,
|
||||||
eth_staking_network,
|
eth_endpoint,
|
||||||
coordinator_provider_uri,
|
polygon_endpoint,
|
||||||
coordinator_network,
|
|
||||||
):
|
):
|
||||||
staking_registry = ContractRegistry.from_latest_publication(
|
staking_registry = ContractRegistry.from_latest_publication(domain=network)
|
||||||
domain=eth_staking_network
|
emitter.echo(f"NOTICE: Connecting to {network} network", color="yellow")
|
||||||
)
|
|
||||||
emitter.echo(f"NOTICE: Connecting to {eth_staking_network} network", color="yellow")
|
|
||||||
|
|
||||||
taco_application_agent = ContractAgency.get_agent(
|
taco_application_agent = ContractAgency.get_agent(
|
||||||
agent_class=TACoApplicationAgent,
|
agent_class=TACoApplicationAgent,
|
||||||
registry=staking_registry,
|
registry=staking_registry,
|
||||||
provider_uri=eth_provider_uri,
|
provider_uri=eth_endpoint,
|
||||||
) # type: TACoApplicationAgent
|
) # type: TACoApplicationAgent
|
||||||
|
|
||||||
coordinator_network_registry = ContractRegistry.from_latest_publication(
|
registry = ContractRegistry.from_latest_publication(
|
||||||
domain=coordinator_network
|
domain=network
|
||||||
)
|
)
|
||||||
emitter.echo(f"NOTICE: Connecting to {coordinator_network} network", color="yellow")
|
|
||||||
|
|
||||||
taco_child_application_agent = ContractAgency.get_agent(
|
taco_child_application_agent = ContractAgency.get_agent(
|
||||||
agent_class=TACoChildApplicationAgent,
|
agent_class=TACoChildApplicationAgent,
|
||||||
registry=coordinator_network_registry,
|
registry=registry,
|
||||||
provider_uri=coordinator_provider_uri,
|
provider_uri=polygon_endpoint,
|
||||||
) # type: TACoChildApplicationAgent
|
) # type: TACoChildApplicationAgent
|
||||||
|
|
||||||
coordinator_agent = ContractAgency.get_agent(
|
coordinator_agent = ContractAgency.get_agent(
|
||||||
agent_class=CoordinatorAgent,
|
agent_class=CoordinatorAgent,
|
||||||
registry=coordinator_network_registry,
|
registry=registry,
|
||||||
provider_uri=coordinator_provider_uri,
|
provider_uri=polygon_endpoint,
|
||||||
) # type: CoordinatorAgent
|
) # type: CoordinatorAgent
|
||||||
|
|
||||||
subscription_manager_agent = ContractAgency.get_agent(
|
subscription_manager_agent = ContractAgency.get_agent(
|
||||||
agent_class=SubscriptionManagerAgent,
|
agent_class=SubscriptionManagerAgent,
|
||||||
registry=coordinator_network_registry,
|
registry=registry,
|
||||||
provider_uri=coordinator_provider_uri,
|
provider_uri=polygon_endpoint,
|
||||||
) # type: SubscriptionManagerAgent
|
) # type: SubscriptionManagerAgent
|
||||||
|
|
||||||
message = (
|
message = (
|
||||||
|
|
Loading…
Reference in New Issue