* Adding solhint, working on style fixes. * Upgraded to solhint 1.5.0. * Removed all references to Solium * Updated mocks to make the pass the new linter rules. * Reformatted the .solhint.json file a bit. * Removed Solium configuration files. * Remove Solium dependency. * Add comment explaing disabled time rule in TokenVesting. * Revert to the old (ugly?) style. * Revert SignatureBouncerMock style. * Fix ERC165InterfacesSupported interface.
22 lines
837 B
Solidity
22 lines
837 B
Solidity
pragma solidity ^0.5.0;
|
|
|
|
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);
|
|
}
|
|
}
|