|
|
@ -16,8 +16,10 @@ contract FinalizableCrowdsale is Crowdsale, Ownable { |
|
|
|
|
|
|
|
|
|
|
|
event Finalized(); |
|
|
|
event Finalized(); |
|
|
|
|
|
|
|
|
|
|
|
// should be called after crowdsale ends, to do |
|
|
|
/** |
|
|
|
// some extra finalization work |
|
|
|
* @dev Must be called after crowdsale ends, to do some extra finalization |
|
|
|
|
|
|
|
* work. Calls the contract's finalization function. |
|
|
|
|
|
|
|
*/ |
|
|
|
function finalize() onlyOwner { |
|
|
|
function finalize() onlyOwner { |
|
|
|
require(!isFinalized); |
|
|
|
require(!isFinalized); |
|
|
|
require(hasEnded()); |
|
|
|
require(hasEnded()); |
|
|
@ -28,12 +30,11 @@ contract FinalizableCrowdsale is Crowdsale, Ownable { |
|
|
|
isFinalized = true; |
|
|
|
isFinalized = true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// end token minting on finalization |
|
|
|
/** |
|
|
|
// override this with custom logic if needed |
|
|
|
* @dev Can be overriden to add finalization logic. The overriding function |
|
|
|
|
|
|
|
* should call super.finalization() to ensure the chain of finalization is |
|
|
|
|
|
|
|
* executed entirely. |
|
|
|
|
|
|
|
*/ |
|
|
|
function finalization() internal { |
|
|
|
function finalization() internal { |
|
|
|
token.finishMinting(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|