I am developing an ICO contract that has a presale and main crowdsale event and I'm really new to this having experience of building only basic ICOs. I wanted to know what the best way would be to differentiate between those two because the investors would have different authorities based on when they invested on tokens.

During my google search I landed to the link below.

Pre ico and ico crowdsale contracts

However, it was closed with no answer and I couldn't figure out what the best way to deal with it would be. Or How the contracts generally handle such events. Would it be by creating two different contracts or using different start and end times.


1 Answer 1


I can see two ways of approaching it.

  1. If you have created a common DAO, let the token buyers be associated with it. Both PreICO, ICO results can be sent to same DAO, by which they have controls in it.
  2. Have a single contract programmed in such a way that behaving differently based on date for PreICO or ICO

Hope this helps.

EDIT : With help from above mentioned options, instead of using the date and time stamps, you can use a variable whose value would be incremented by one each time the startSale() function is called. That way one could easily differentiate between the sale stage/type without having to worry about the timestamps and sale dates.

  • @Rejesh Do you have an example cope with pre-ICO and ICO in one smart contract? Apr 4, 2018 at 10:17

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.