Crowdsale
contract Crowdsale
Crowdsale is a base contract for managing a token crowdsale. Crowdsales have a start and end timestamps, where investors can make token purchases and the crowdsale will assign them tokens based on a token per ETH rate. Funds collected are forwarded to a wallet as they arrive.
Source: crowdsale/Crowdsale.sol
Reference
Events
TokenPurchase
event TokenPurchase(address purchaser, address beneficiary, uint256 value, uint256 amount)
Event for token purchase logging.
- Parameters:
purchaser
- who paid for the tokensbeneficiary
- who got the tokensvalue
- weis paid for purchaseamount
- amount of tokens purchased
Functions
Crowdsale
function Crowdsale(uint256 _startTime, uint256 _endTime, uint256 _rate, address _wallet) public
- Parameters:
_startTime
- uint256_endTime
- uint256_rate
- uint256_wallet
- address
buyTokens
function buyTokens(address beneficiary) public payable
- Parameters:
beneficiary
- address
createTokenContract
function createTokenContract() internal returns (MintableToken)
- Returns:
- MintableToken
fallback
function () external payable
forwardFunds
function forwardFunds() internal
hasEnded
function hasEnded() public view returns (bool)
- Returns:
- bool
validPurchase
function validPurchase() internal view returns (bool)
- Returns:
- bool