Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- modifier inActivePeriod() {
- require((startFirstStepICO < now && now <= endFirstStepICO) || (starSecondStepICO < now && now <= endSecondStepICO));
- _;
- }
- // low level token purchase function
- function buyTokens(address _sender) inActivePeriod payable {
- require(_sender != 0x0);
- require(msg.value >= minTransactionAmount);
- uint256 weiAmount = msg.value;
- raisedForEther = raisedForEther.add(weiAmount);
- // calculate token amount to be created
- uint256 tokens = weiAmount.mul(rate);
- tokens += getBonus(tokens);
- tokenReserve(_sender, tokens);
- forwardFunds();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement