swap function params
This commit is contained in:
parent
a70ddb1b91
commit
f7a3745732
|
@ -163,13 +163,14 @@ contract VotingToManageEmissionFunds is VotingTo {
|
|||
uint256 _emissionReleaseTime, // unix timestamp
|
||||
uint256 _emissionReleaseThreshold, // seconds
|
||||
uint256 _distributionThreshold, // seconds
|
||||
address _emissionFunds,
|
||||
uint256 _minBallotDuration
|
||||
uint256 _minBallotDuration, // seconds
|
||||
address _emissionFunds
|
||||
) public onlyOwner {
|
||||
require(_emissionReleaseTime > getTime());
|
||||
require(_emissionReleaseThreshold > 0);
|
||||
require(_distributionThreshold > ballotCancelingThreshold());
|
||||
require(_emissionReleaseThreshold > _distributionThreshold);
|
||||
require(_minBallotDuration < _distributionThreshold);
|
||||
require(_emissionFunds != address(0));
|
||||
_init(_minBallotDuration);
|
||||
_setNoActiveBallotExists(true);
|
||||
|
|
|
@ -180,8 +180,8 @@ module.exports = function(deployer, network, accounts) {
|
|||
demoMode ? moment.utc().add(10, 'minutes').unix() : moment.utc().add(3, 'months').unix(),
|
||||
demoMode ? 3600 : 7776000, // emissionReleaseThreshold: 1 hour for demo, 3 months for production
|
||||
demoMode ? 1500 : 604800, // distributionThreshold: 25 minutes for demo, 7 days for production
|
||||
emissionFunds.address,
|
||||
minBallotDuration
|
||||
minBallotDuration,
|
||||
emissionFunds.address
|
||||
);
|
||||
|
||||
// Initialize ProxyStorage
|
||||
|
|
|
@ -99,23 +99,23 @@ contract('VotingToManageEmissionFunds [all features]', function (accounts) {
|
|||
emissionReleaseTime,
|
||||
emissionReleaseThreshold,
|
||||
distributionThreshold,
|
||||
emissionFunds.address,
|
||||
minBallotDuration,
|
||||
emissionFunds.address,
|
||||
{from: accounts[8]}
|
||||
).should.be.rejectedWith(ERROR_MSG);
|
||||
await voting.init(
|
||||
emissionReleaseTime,
|
||||
emissionReleaseThreshold,
|
||||
300,
|
||||
emissionFunds.address,
|
||||
minBallotDuration
|
||||
minBallotDuration,
|
||||
emissionFunds.address
|
||||
).should.be.rejectedWith(ERROR_MSG);
|
||||
await voting.init(
|
||||
emissionReleaseTime,
|
||||
emissionReleaseThreshold,
|
||||
distributionThreshold,
|
||||
emissionFunds.address,
|
||||
minBallotDuration
|
||||
minBallotDuration,
|
||||
emissionFunds.address
|
||||
).should.be.fulfilled;
|
||||
|
||||
rewardByBlock = await RewardByBlock.new();
|
||||
|
@ -165,8 +165,8 @@ contract('VotingToManageEmissionFunds [all features]', function (accounts) {
|
|||
emissionReleaseTime,
|
||||
emissionReleaseThreshold,
|
||||
distributionThreshold,
|
||||
emissionFunds.address,
|
||||
minBallotDuration
|
||||
minBallotDuration,
|
||||
emissionFunds.address
|
||||
).should.be.rejectedWith(ERROR_MSG);
|
||||
});
|
||||
});
|
||||
|
@ -1055,8 +1055,8 @@ contract('VotingToManageEmissionFunds [all features]', function (accounts) {
|
|||
emissionReleaseTime,
|
||||
emissionReleaseThreshold,
|
||||
distributionThreshold,
|
||||
emissionFunds.address,
|
||||
minBallotDuration
|
||||
minBallotDuration,
|
||||
emissionFunds.address
|
||||
).should.be.fulfilled;
|
||||
});
|
||||
it('may only be called by ProxyStorage', async () => {
|
||||
|
|
|
@ -99,23 +99,23 @@ contract('VotingToManageEmissionFunds upgraded [all features]', function (accoun
|
|||
emissionReleaseTime,
|
||||
emissionReleaseThreshold,
|
||||
distributionThreshold,
|
||||
emissionFunds.address,
|
||||
minBallotDuration,
|
||||
emissionFunds.address,
|
||||
{from: accounts[8]}
|
||||
).should.be.rejectedWith(ERROR_MSG);
|
||||
await voting.init(
|
||||
emissionReleaseTime,
|
||||
emissionReleaseThreshold,
|
||||
300,
|
||||
emissionFunds.address,
|
||||
minBallotDuration
|
||||
minBallotDuration,
|
||||
emissionFunds.address
|
||||
).should.be.rejectedWith(ERROR_MSG);
|
||||
await voting.init(
|
||||
emissionReleaseTime,
|
||||
emissionReleaseThreshold,
|
||||
distributionThreshold,
|
||||
emissionFunds.address,
|
||||
minBallotDuration
|
||||
minBallotDuration,
|
||||
emissionFunds.address
|
||||
).should.be.fulfilled;
|
||||
|
||||
rewardByBlock = await RewardByBlock.new();
|
||||
|
@ -172,8 +172,8 @@ contract('VotingToManageEmissionFunds upgraded [all features]', function (accoun
|
|||
emissionReleaseTime,
|
||||
emissionReleaseThreshold,
|
||||
distributionThreshold,
|
||||
emissionFunds.address,
|
||||
minBallotDuration
|
||||
minBallotDuration,
|
||||
emissionFunds.address
|
||||
).should.be.rejectedWith(ERROR_MSG);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue