You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
674 B
27 lines
674 B
pragma solidity ^0.4.23;
|
|
|
|
import "../Crowdsale.sol";
|
|
import "../../token/ERC20/MintableToken.sol";
|
|
|
|
|
|
/**
|
|
* @title MintedCrowdsale
|
|
* @dev Extension of Crowdsale contract whose tokens are minted in each purchase.
|
|
* Token ownership should be transferred to MintedCrowdsale for minting.
|
|
*/
|
|
contract MintedCrowdsale is Crowdsale {
|
|
|
|
/**
|
|
* @dev Overrides delivery by minting tokens upon purchase.
|
|
* @param _beneficiary Token purchaser
|
|
* @param _tokenAmount Number of tokens to be minted
|
|
*/
|
|
function _deliverTokens(
|
|
address _beneficiary,
|
|
uint256 _tokenAmount
|
|
)
|
|
internal
|
|
{
|
|
require(MintableToken(token).mint(_beneficiary, _tokenAmount));
|
|
}
|
|
}
|
|
|