Escrows (#1014)
* Added basic Escrow * PullPayment now uses an Escrow, removing all trust from the contract * Abstracted the Escrow tests to a behaviour * Added ConditionalEscrow * Added RefundableEscrow. * RefundableCrowdsale now uses a RefundEscrow, removed RefundVault. * Renaming after code review. * Added log test helper. * Now allowing empty deposits and withdrawals. * Style fixes. * Minor review comments. * Add Deposited and Withdrawn events, removed Refunded * The base Escrow is now Ownable, users of it (owners) must provide methods to access it.
This commit is contained in:
committed by
Francisco Giordano
parent
c2ad8c3f57
commit
8fd072cf8e
@ -14,7 +14,6 @@ require('chai')
|
||||
|
||||
const SampleCrowdsale = artifacts.require('SampleCrowdsale');
|
||||
const SampleCrowdsaleToken = artifacts.require('SampleCrowdsaleToken');
|
||||
const RefundVault = artifacts.require('RefundVault');
|
||||
|
||||
contract('SampleCrowdsale', function ([owner, wallet, investor]) {
|
||||
const RATE = new BigNumber(10);
|
||||
@ -32,12 +31,10 @@ contract('SampleCrowdsale', function ([owner, wallet, investor]) {
|
||||
this.afterClosingTime = this.closingTime + duration.seconds(1);
|
||||
|
||||
this.token = await SampleCrowdsaleToken.new({ from: owner });
|
||||
this.vault = await RefundVault.new(wallet, { from: owner });
|
||||
this.crowdsale = await SampleCrowdsale.new(
|
||||
this.openingTime, this.closingTime, RATE, wallet, CAP, this.token.address, GOAL
|
||||
);
|
||||
await this.token.transferOwnership(this.crowdsale.address);
|
||||
await this.vault.transferOwnership(this.crowdsale.address);
|
||||
});
|
||||
|
||||
it('should create crowdsale with correct parameters', async function () {
|
||||
|
||||
Reference in New Issue
Block a user