adapt contracts for upgradeability

This commit is contained in:
Francisco Giordano
2018-04-18 18:10:26 -03:00
parent 89c32f5dd7
commit f9fc8d2e96
17 changed files with 68 additions and 37 deletions

View File

@ -16,13 +16,15 @@ contract('TokenVesting', function ([_, owner, beneficiary]) {
const amount = new BigNumber(1000);
beforeEach(async function () {
this.token = await MintableToken.new({ from: owner });
this.token = await MintableToken.new();
await this.token.initialize(owner);
this.start = latestTime() + duration.minutes(1); // +1 minute so it starts after contract instantiation
this.cliff = duration.years(1);
this.duration = duration.years(2);
this.vesting = await TokenVesting.new(beneficiary, this.start, this.cliff, this.duration, true, { from: owner });
this.vesting = await TokenVesting.new();
await this.vesting.initialize(owner, beneficiary, this.start, this.cliff, this.duration, true);
await this.token.mint(this.vesting.address, amount, { from: owner });
});