Commit ebdba082 by George Spasov

Added overridable getTokenAmount function

parent a74b7bd4
......@@ -59,12 +59,16 @@ contract Crowdsale {
return new MintableToken();
}
// fallback function can be used to buy tokens
function () external payable {
buyTokens(msg.sender);
}
// Override this function to create logic for periodization
function getTokenAmount(uint256 weiAmount) internal constant returns(uint256) {
return weiAmount.mul(rate);
}
// low level token purchase function
function buyTokens(address beneficiary) public payable {
require(beneficiary != address(0));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment