RefundablePostDeliveryCrowdsale.sol 699 B

1234567891011121314151617181920
  1. pragma solidity ^0.5.0;
  2. import "./RefundableCrowdsale.sol";
  3. import "./PostDeliveryCrowdsale.sol";
  4. /**
  5. * @title RefundablePostDeliveryCrowdsale
  6. * @dev Extension of RefundableCrowdsale contract that only delivers the tokens
  7. * once the crowdsale has closed and the goal met, preventing refunds to be issued
  8. * to token holders.
  9. */
  10. contract RefundablePostDeliveryCrowdsale is RefundableCrowdsale, PostDeliveryCrowdsale {
  11. function withdrawTokens(address beneficiary) public {
  12. require(finalized(), "RefundablePostDeliveryCrowdsale: not finalized");
  13. require(goalReached(), "RefundablePostDeliveryCrowdsale: goal not reached");
  14. super.withdrawTokens(beneficiary);
  15. }
  16. }