Thanks for your prompt answer last time!
Your answer has been the most helpful during my learning of ICO, and I can't wait to read the whole book you are writing now!
However I have 3 more questions if you can help me out, and I feel sorry for occupying your time, and I'm more thank ok if I can pay you via ETH or BTC for helping me answer these!
(1) For a newly created ERC20 token, how can you send them to various wallets? For example I want to send 60% to ICO sale address, 20% to my ICO foundation address, 20% to team address.
(2) How can you set a locked date for the purchased ERC20 tokens to be release to each investor's wallet? For example this ICO I'm going to run want to send ERC20 tokens to each investor 2 weeks after the end of ICO, because we need time to verify each KYC customer and prevent investors from selling their tokens early during ICO.
(3) How can you set the discounted price of a token during pre-sale? And how can you set date for pre-sale and date for main-sale?
I can pay you in ETH/BTC If you can help me answer questions in ways of code just like what you did for this article: hashnode.com/post/how-to-build-your-own-ethereum-…
really appreciate your help!
Thanks,
Roy
Hi Roy!
Thanks for the question. Happy to help.
I updated the said article and wrote a new one which focuses on real world aspects like presale, discounts, distribution of tokens etc. You can read it here. It answers your first and last question.
The associated code for the above article is on GitHub. Let me mention the line numbers so that you can easily find it and understand the process.
(1) Token Distribution
(2) You can add a 2-week lock-up period to the token contract itself. The following code will give you the basic idea:
address owner; //With this modifier, only the owner can call the transfer function //Others can transfer only when the current timestamp is more than certain timestamp. modifier notPaused{ require(now > <SOME FUTURE TIMESTAMP> || msg.sender == owner); _; } function ERC20Token() { owner = msg.sender; } // Not the usage of `notPaused` modifier function transfer(address to, uint256 amount) public notPaused returns (bool) { //rest of function }So, until your token sale is over (or certain vesting period is reached), no one can transfer their tokens.
(3) Presale discount
I hope this helps! :)