TODOs and housekeeping

pull/1480/head
David Núñez 2019-11-28 13:46:20 +01:00
parent 2caa88c68d
commit 428c7f2a0e
3 changed files with 10 additions and 3 deletions

View File

@ -791,6 +791,7 @@ class StakingInterfaceDeployer(BaseContractDeployer, UpgradeableContractMixin):
class PreallocationEscrowDeployer(BaseContractDeployer, UpgradeableContractMixin, OwnableContractMixin):
# TODO: Why does PreallocationEscrowDeployer has an UpgradeableContractMixin?
agency = PreallocationEscrowAgent
contract_name = agency.registry_contract_name
@ -809,7 +810,7 @@ class PreallocationEscrowDeployer(BaseContractDeployer, UpgradeableContractMixin
self.__beneficiary_address = NO_BENEFICIARY
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:
raise self.ContractDeploymentError("No beneficiary assigned to {}".format(self.contract.address))
agent = self.agency(registry=self.registry,

View File

@ -650,7 +650,7 @@ def collect_reward(click_config,
def preallocation(click_config,
# 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,
# Preallocation options
@ -669,7 +669,12 @@ def preallocation(click_config,
### Setup ###
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,
allocation_filepath=allocation_filepath)
#############

View File

@ -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
assert token_agent.get_balance(address=staker_address) >= balance_before_collecting
# TODO: Test preallocation commands