mirror of https://github.com/nucypher/nucypher.git
Bug Fixes: Deployment actor uses self.blockchain for deployer and agent init; Use pyevm as default provider URI
parent
81e082e4ad
commit
6f18850230
|
@ -168,7 +168,8 @@ class Deployer(NucypherTokenActor):
|
|||
|
||||
def deploy_miner_contract(self, secret: bytes):
|
||||
|
||||
miner_escrow_deployer = MinerEscrowDeployer(deployer_address=self.deployer_address,
|
||||
miner_escrow_deployer = MinerEscrowDeployer(blockchain=self.blockchain,
|
||||
deployer_address=self.deployer_address,
|
||||
secret_hash=secret)
|
||||
|
||||
txhashes = miner_escrow_deployer.deploy()
|
||||
|
@ -177,7 +178,8 @@ class Deployer(NucypherTokenActor):
|
|||
|
||||
def deploy_policy_contract(self, secret: bytes):
|
||||
|
||||
policy_manager_deployer = PolicyManagerDeployer(deployer_address=self.deployer_address,
|
||||
policy_manager_deployer = PolicyManagerDeployer(blockchain=self.blockchain,
|
||||
deployer_address=self.deployer_address,
|
||||
secret_hash=secret)
|
||||
|
||||
txhashes = policy_manager_deployer.deploy()
|
||||
|
@ -186,14 +188,16 @@ class Deployer(NucypherTokenActor):
|
|||
|
||||
def deploy_escrow_proxy(self, secret: bytes):
|
||||
|
||||
escrow_proxy_deployer = UserEscrowProxyDeployer(deployer_address=self.deployer_address,
|
||||
escrow_proxy_deployer = UserEscrowProxyDeployer(blockchain=self.blockchain,
|
||||
deployer_address=self.deployer_address,
|
||||
secret_hash=secret)
|
||||
|
||||
txhashes = escrow_proxy_deployer.deploy()
|
||||
return txhashes
|
||||
|
||||
def deploy_user_escrow(self):
|
||||
user_escrow_deployer = UserEscrowDeployer(deployer_address=self.deployer_address,
|
||||
user_escrow_deployer = UserEscrowDeployer(blockchain=self.blockchain,
|
||||
deployer_address=self.deployer_address,
|
||||
allocation_registry=self.allocation_registy)
|
||||
|
||||
user_escrow_deployer.deploy()
|
||||
|
|
|
@ -239,14 +239,8 @@ class BlockchainInterface:
|
|||
provider = EthereumTesterProvider(ethereum_tester=eth_tester)
|
||||
|
||||
elif uri_breakdown.netloc == 'geth':
|
||||
# TODO: Auto gethdev
|
||||
# https://web3py.readthedocs.io/en/stable/providers.html # geth-dev-proof-of-authority
|
||||
# from web3.auto.gethdev import w3
|
||||
|
||||
# Hardcoded gethdev IPC provider
|
||||
provider = IPCProvider(ipc_path='/tmp/geth.ipc', timeout=timeout)
|
||||
# w3 = Web3(providers=(provider))
|
||||
# w3.middleware_stack.inject(geth_poa_middleware, layer=0)
|
||||
|
||||
else:
|
||||
raise ValueError("{} is an invalid or unsupported blockchain provider URI".format(provider_uri))
|
||||
|
|
|
@ -73,7 +73,7 @@ class NodeConfiguration(ABC):
|
|||
__TEMP_CONFIGURATION_DIR_PREFIX = "nucypher-tmp-"
|
||||
|
||||
# Blockchain
|
||||
__DEFAULT_PROVIDER_URI = 'tester://geth'
|
||||
__DEFAULT_PROVIDER_URI = 'tester://pyevm' # FIXME: Needs to be updated in tandem with manual providers for interface.connect
|
||||
|
||||
# Registry
|
||||
__REGISTRY_NAME = 'contract_registry.json'
|
||||
|
|
|
@ -89,7 +89,7 @@ class TesterBlockchain(Blockchain):
|
|||
|
||||
umbral_priv_key = UmbralPrivateKey.gen_key()
|
||||
address = self.interface.w3.personal.importRawKey(private_key=umbral_priv_key.to_bytes(),
|
||||
password=insecure_password)
|
||||
passphrase=insecure_password)
|
||||
|
||||
assert self.interface.unlock_account(address, password=insecure_password, duration=None), 'Failed to unlock {}'.format(address)
|
||||
addresses.append(address)
|
||||
|
|
Loading…
Reference in New Issue