예제 #1
0
def test_deployment_parameters(staking_escrow_deployer, token_deployer, token_economics):

    token_address = staking_escrow_deployer.contract.functions.token().call()
    assert token_deployer.contract_address == token_address

    staking_agent = StakingEscrowAgent()
    params = staking_agent.staking_parameters()
    assert token_economics.staking_deployment_parameters[1:] == params[1:]
    assert token_economics.staking_deployment_parameters[0]*60*60 == params[0]  # FIXME: Do we really want this?
def test_deployment_parameters(policy_manager_deployer,
                               staking_escrow_deployer):

    escrow_address = policy_manager_deployer.contract.functions.escrow().call()
    assert staking_escrow_deployer.contract_address == escrow_address

    staking_agent = StakingEscrowAgent()
    seconds_per_period = staking_agent.staking_parameters()[0]
    assert seconds_per_period == policy_manager_deployer.contract.functions.secondsPerPeriod(
    ).call()