1

Is it possible that the Total supply is created at the time of creation of token for Privete-sale and then create an ICO contract for the Unsold tokens to sell them on crowdsale?

(i.e. It is hard to predict that how many tokens will be sold during Private sale (manual transfers by owner))

1
  • Plz mark my ans is accepted, if you feel ans is relevant and giving some direction towards your problem. Feb 11, 2018 at 17:42

1 Answer 1

0

You have to write a logic for that. Usefully total number of tokens are fixed. But if you want to change dynamically then you can. Its just method which returns the value. It's more like exchange will accept as a ico or not.

Find below code snippet

contract ABCComapny{
   bool private isICOEnabled = false;
   uint256 private TOTAL_NUMBER_TOKENS = 10000000000;
   uint256 private SOLD_TOKENS = 10000000000;

   function getTotalTokens() public returns(uint256){
         if(isICOEnabled){
               return TOTAL_NUMBER_TOKENS - SOLD_TOKENS;
         }
        returns TOTAL_NUMBER_TOKENS;
   }
}

When before ICO. You need to check deposit() if isICOEnabled is false then update SOLD_TOKENS.

When your planing to start ico then update isICOEnabled true. But be careful. Run the test cases. Before deployed in mainnet.

3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.