Skip to content

Commit

Permalink
Crowdsale docs improvements. (#1446)
Browse files Browse the repository at this point in the history
* Added a small Crowdsale fallback gas warning.

* Fixed a couple typos.

(cherry picked from commit 94692ac)
  • Loading branch information
nventuro authored and come-maiz committed Oct 20, 2018
1 parent 95411da commit 6e53c4e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions contracts/crowdsale/Crowdsale.sol
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ contract Crowdsale {

/**
* @dev fallback function ***DO NOT OVERRIDE***
* Note that other contracts will transfer fund with a base gas stipend
* of 2300, which is not enough to call buyTokens. Consider calling
* buyTokens directly when purchasing tokens from a contract.
*/
function () external payable {
buyTokens(msg.sender);
Expand Down Expand Up @@ -100,15 +103,15 @@ contract Crowdsale {
}

/**
* @return the mount of wei raised.
* @return the amount of wei raised.
*/
function weiRaised() public view returns (uint256) {
return _weiRaised;
}

/**
* @dev low level token purchase ***DO NOT OVERRIDE***
* @param beneficiary Address performing the token purchase
* @param beneficiary Recipient of the token purchase
*/
function buyTokens(address beneficiary) public payable {

Expand Down Expand Up @@ -188,7 +191,7 @@ contract Crowdsale {
}

/**
* @dev Executed when a purchase has been validated and is ready to be executed. Not necessarily emits/sends tokens.
* @dev Executed when a purchase has been validated and is ready to be executed. Doesn't necessarily emit/send tokens.
* @param beneficiary Address receiving the tokens
* @param tokenAmount Number of tokens to be purchased
*/
Expand Down

0 comments on commit 6e53c4e

Please sign in to comment.