When ICO is finalized, I call finishMinting()
to prevent from adding new tokens to totalSupply.
contract MyTokenCrowdsale is Crowdsale, MintedCrowdsale, CappedCrowdsale, TimedCrowdsale, WhitelistedCrowdsale, RefundableCrowdsale {
...
function finalization() internal {
if(goalReached()) {
MintableToken _mintableToken = MintableToken(token);
_mintableToken.finishMinting();
}
}
However, if I want to deploy another crowdsale as a second round of ICO, I'm not sure how to set mintingFinished
back to false again so people can buyToken
again.
function finishMinting() public onlyOwner canMint returns (bool) {
mintingFinished = true;
emit MintFinished();
return true;
}
unFinishMinting()
that doesmintingFinished = false
. But I think that defeats the purpose offinishMinting
. :-)finishMinting
?unFinishMinting()
as you mentioned in the comment. Because there are actually certain cases where some companies are launching a couple of ICOs with their token. Any idea how they are dealing with this case with open-zeppelin?