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.
23 lines
833 B
23 lines
833 B
6 years ago
|
pragma solidity ^0.4.18;
|
||
|
|
||
|
import "../Crowdsale.sol";
|
||
|
import "../../lifecycle/Pausable.sol";
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @title PausableCrowdsale
|
||
|
* @dev Extension of Crowdsale contract where purchases can be paused and unpaused by the pauser role.
|
||
|
*/
|
||
|
contract PausableCrowdsale is Crowdsale, Pausable {
|
||
|
|
||
|
/**
|
||
|
* @dev Validation of an incoming purchase. Use require statements to revert state when conditions are not met. Use super to concatenate validations.
|
||
|
* Adds the validation that the crowdsale must not be paused.
|
||
|
* @param _beneficiary Address performing the token purchase
|
||
|
* @param _weiAmount Value in wei involved in the purchase
|
||
|
*/
|
||
|
function _preValidatePurchase(address _beneficiary, uint256 _weiAmount) internal view whenNotPaused {
|
||
|
return super._preValidatePurchase(_beneficiary, _weiAmount);
|
||
|
}
|
||
|
}
|