Open gabriel-canaan opened 6 years ago
rootcore/blob/master/contracts/CrowdsaleController.sol Lines 145,161,176,193,211
function addToWhitelist(address _address) public managerOnly returns (bool added) { whiteList[_address] = true; return true; } function removeFromWhitelist(address _address) public managerOnly returns (bool added) { whiteList[_address] = false; return true; } function contributeETH() public payable between(startTime, endTime) whenNotPaused maxAccountContributionNotReached returns (uint256 amount) { return processContribution(); } function contributePreSale() public payable between(safeSub(startTime,PRESALE_DURATION), startTime) whenNotPaused validatePresaleMinPrice validatePresaleAddress returns (uint256 amount) { return processContribution(); } function contributeFiat(address _contributor, uint256 _amount) public payable managerOnly between(safeSub(startTime,PRESALE_DURATION), safeAdd(startTime, DURATION)) whenNotPaused returns (uint256 amount) { uint256 tokenAmount = computeReturn(_amount); totalEtherContributed = safeAdd(totalEtherContributed, _amount); // update the total contribution amount token.issue(_contributor, tokenAmount); // issue new funds to the contributor's address, provided by the manager, in the smart token token.issue(beneficiary, tokenAmount); // issue tokens to the beneficiary Contribution(_contributor, msg.value, tokenAmount); return tokenAmount; }
Functions should be grouped according to their visibility and ordered: constructor, fallback function (if exists), external, public, internal, private For better code readability.
rootcore/blob/master/contracts/CrowdsaleController.sol Lines 145,161,176,193,211