Fix minor glitches of nucypher alice, nucypher bob, and nucypher-deploy

pull/1225/head
David Núñez 2019-08-26 22:40:13 +02:00 committed by Kieran R. Prasch
parent f6cf2b6dfd
commit 8ac80aca80
4 changed files with 11 additions and 7 deletions

View File

@ -120,6 +120,7 @@ class AliceControlJSONSerializer(CharacterControlJSONSerializer, MessageHandlerM
label=request['label'].encode(),
m=request['m'],
n=request['n'],
value=request['value'],
expiration=maya.MayaDT.from_iso8601(iso8601_string=request['expiration']))
return parsed_input

View File

@ -1,8 +1,7 @@
import click
from constant_sorrow.constants import NO_BLOCKCHAIN_CONNECTION
from nucypher.blockchain.eth.interfaces import BlockchainInterface
from nucypher.blockchain.eth.registry import BaseContractRegistry
from nucypher.blockchain.eth.interfaces import BlockchainInterfaceFactory
from nucypher.characters.banners import ALICE_BANNER
from nucypher.cli import actions, painting, types
from nucypher.cli.actions import get_nucypher_password, select_client_account, get_client_password
@ -125,6 +124,8 @@ def alice(click_config,
ETH_NODE = actions.get_provider_process()
provider_uri = ETH_NODE.provider_uri(scheme='file')
BlockchainInterfaceFactory.initialize_interface(provider_uri=provider_uri, poa=poa, sync=sync)
#
# Eager Actions (No Authentication Required)
#

View File

@ -1,7 +1,6 @@
import click
from nucypher.blockchain.eth.interfaces import BlockchainInterface
from nucypher.blockchain.eth.registry import BaseContractRegistry
from nucypher.blockchain.eth.interfaces import BlockchainInterfaceFactory
from nucypher.characters.banners import BOB_BANNER
from nucypher.cli import actions, painting
from nucypher.cli.actions import get_nucypher_password, select_client_account
@ -86,6 +85,8 @@ def bob(click_config,
# Eager Actions
#
BlockchainInterfaceFactory.initialize_interface(provider_uri=provider_uri, poa=poa, sync=sync)
if action == 'init':
"""Create a brand-new persistent Bob"""

View File

@ -81,7 +81,6 @@ def deploy(action,
allocations Deploy pre-allocation contracts.
upgrade Upgrade NuCypher existing proxy contract deployments.
rollback Rollback a proxy contract's target.
status Echo owner information and bare contract metadata.
transfer-tokens Transfer tokens to another address.
transfer-ownership Transfer ownership of contracts to another address.
"""
@ -120,11 +119,13 @@ def deploy(action,
# Connect to Registry
#
default_registry_filepath = os.path.join(DEFAULT_CONFIG_ROOT, BaseContractRegistry.REGISTRY_NAME)
# Establish a contract registry from disk if specified
registry_filepath = registry_outfile or registry_infile
registry_filepath = registry_outfile or registry_infile or default_registry_filepath
if dev:
# TODO: Need a way to detect a geth--dev registry filepath here. (then deprecate the --dev flag)
registry_filepath = os.path.join(DEFAULT_CONFIG_ROOT, 'dev_contract_registry.json')
registry_filepath = os.path.join(config_root, 'dev_contract_registry.json')
registry = LocalContractRegistry(filepath=registry_filepath)
emitter.echo(f"Using contract registry filepath {registry.filepath}")