mirror of https://github.com/nucypher/nucypher.git
TODOs and housekeeping
parent
2caa88c68d
commit
428c7f2a0e
|
@ -791,6 +791,7 @@ class StakingInterfaceDeployer(BaseContractDeployer, UpgradeableContractMixin):
|
||||||
|
|
||||||
|
|
||||||
class PreallocationEscrowDeployer(BaseContractDeployer, UpgradeableContractMixin, OwnableContractMixin):
|
class PreallocationEscrowDeployer(BaseContractDeployer, UpgradeableContractMixin, OwnableContractMixin):
|
||||||
|
# TODO: Why does PreallocationEscrowDeployer has an UpgradeableContractMixin?
|
||||||
|
|
||||||
agency = PreallocationEscrowAgent
|
agency = PreallocationEscrowAgent
|
||||||
contract_name = agency.registry_contract_name
|
contract_name = agency.registry_contract_name
|
||||||
|
@ -809,7 +810,7 @@ class PreallocationEscrowDeployer(BaseContractDeployer, UpgradeableContractMixin
|
||||||
self.__beneficiary_address = NO_BENEFICIARY
|
self.__beneficiary_address = NO_BENEFICIARY
|
||||||
self.__allocation_registry = allocation_registry or self.__allocation_registry()
|
self.__allocation_registry = allocation_registry or self.__allocation_registry()
|
||||||
|
|
||||||
def make_agent(self) -> EthereumContractAgent:
|
def make_agent(self) -> 'PreallocationEscrowDeployer':
|
||||||
if self.__beneficiary_address is NO_BENEFICIARY:
|
if self.__beneficiary_address is NO_BENEFICIARY:
|
||||||
raise self.ContractDeploymentError("No beneficiary assigned to {}".format(self.contract.address))
|
raise self.ContractDeploymentError("No beneficiary assigned to {}".format(self.contract.address))
|
||||||
agent = self.agency(registry=self.registry,
|
agent = self.agency(registry=self.registry,
|
||||||
|
|
|
@ -650,7 +650,7 @@ def collect_reward(click_config,
|
||||||
def preallocation(click_config,
|
def preallocation(click_config,
|
||||||
|
|
||||||
# Stake Options
|
# Stake Options
|
||||||
poa, registry_filepath, config_file, provider_uri, staking_address, hw_wallet,
|
poa, light, registry_filepath, config_file, provider_uri, staking_address, hw_wallet,
|
||||||
beneficiary_address, allocation_filepath,
|
beneficiary_address, allocation_filepath,
|
||||||
|
|
||||||
# Preallocation options
|
# Preallocation options
|
||||||
|
@ -669,7 +669,12 @@ def preallocation(click_config,
|
||||||
### Setup ###
|
### Setup ###
|
||||||
emitter = _setup_emitter(click_config)
|
emitter = _setup_emitter(click_config)
|
||||||
|
|
||||||
STAKEHOLDER, blockchain = _create_stakeholder(config_file, provider_uri, poa, registry_filepath, staking_address,
|
STAKEHOLDER, blockchain = _create_stakeholder(config_file,
|
||||||
|
provider_uri,
|
||||||
|
poa,
|
||||||
|
light,
|
||||||
|
registry_filepath,
|
||||||
|
staking_address,
|
||||||
beneficiary_address=beneficiary_address,
|
beneficiary_address=beneficiary_address,
|
||||||
allocation_filepath=allocation_filepath)
|
allocation_filepath=allocation_filepath)
|
||||||
#############
|
#############
|
||||||
|
|
|
@ -577,5 +577,6 @@ def test_collect_rewards_integration(click_runner,
|
||||||
# The beneficiary has withdrawn her staking rewards, which are now in the staking contract
|
# The beneficiary has withdrawn her staking rewards, which are now in the staking contract
|
||||||
assert token_agent.get_balance(address=staker_address) >= balance_before_collecting
|
assert token_agent.get_balance(address=staker_address) >= balance_before_collecting
|
||||||
|
|
||||||
|
# TODO: Test preallocation commands
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue