blockchain = BlockchainInterfaceFactory.get_interface( provider_uri=self.provider_uri) emitter.echo(message="Reading Latest Chaindata...") blockchain.connect() return blockchain except Exception as e: if debug: raise click.secho(str(e), bold=True, fg='red') raise click.Abort group_blockchain_options = group_options( BlockchainOptions, provider_uri=option_provider_uri(), poa=option_poa, light=option_light, registry_filepath=option_registry_filepath, network=option_network, ) class MultiSigOptions: __option_name__ = 'multisig_options' def __init__(self, checksum_address, signer_uri, hw_wallet): self.checksum_address = checksum_address self.signer_uri = signer_uri self.hw_wallet = hw_wallet
signer = Signer.from_signer_uri( self.signer_uri) if self.signer_uri else None return self.__create_bidder(registry=registry, signer=signer, hw_wallet=hw_wallet, transacting=True) def create_transactionless_bidder(self, registry): return self.__create_bidder(registry, transacting=False) group_worklock_options = group_options( WorkLockOptions, bidder_address=option_bidder_address, signer_uri=option_signer_uri, provider_uri=option_provider_uri(required=True), network=option_network(required=True), registry_filepath=option_registry_filepath, ) @click.group() def worklock(): """ Participate in NuCypher's WorkLock to obtain NU tokens """ pass @worklock.command() @group_worklock_options
emitter = setup_emitter(general_config) registry = get_registry(network=self.network, registry_filepath=self.registry_filepath) blockchain = connect_to_blockchain(emitter=emitter, provider_uri=self.provider_uri) return emitter, registry, blockchain group_registry_options = group_options( RegistryOptions, geth=option_geth, poa=option_poa, light=option_light, registry_filepath=option_registry_filepath, network=option_network(), provider_uri=option_provider_uri( default=os.environ.get(NUCYPHER_ENVVAR_PROVIDER_URI)), ) @click.group() def status(): """Echo a snapshot of live NuCypher Network metadata.""" @status.command() @group_registry_options @group_general_config def network(general_config, registry_options): """Overall information of the NuCypher Network.""" emitter, registry, blockchain = registry_options.setup( general_config=general_config)
except Exception as e: if debug: raise click.secho(str(e), bold=True, fg='red') raise click.Abort if self.registry_filepath: registry = LocalContractRegistry(filepath=self.registry_filepath) else: registry = InMemoryContractRegistry.from_latest_publication(network=self.network) return registry group_registry_options = group_options( RegistryOptions, provider_uri=option_provider_uri(default="auto://"), geth=option_geth, poa=option_poa, light=option_light, registry_filepath=option_registry_filepath, network=option_network, ) @click.group() def status(): """ Echo a snapshot of live NuCypher Network metadata. """ pass