Created
December 2, 2017 06:55
-
-
Save denispeplin/1899bb35e552bd348376fdaf2bf76fb2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uint saleTime = period * 1 days; | |
if(now < start + saleTime.div(4)) { | |
bonusTokens = tokens.div(4); | |
} else if(now >= start + saleTime.div(4) && now < start + saleTime.div(2)) { | |
bonusTokens = tokens.div(10); | |
} else if(now >= start + saleTime.div(2) && now > saleTime.div(4).mul(3)) { | |
bonusTokens = tokens.div(20); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Небольшое изменение алгоритма бонусов к этой статье: http://inaword.ru/blokchejn/pishem-smart-kontrakt-ethereum-eto-prosto-chast-9-ico-dobavlyaem-bonusy-investoram/#comment-1417