contract PausableRedemption is RocketBase {
  event PauseRedemption();
  event UnpauseRedemption();

  // Whether redemption is paused or not
  // Stored in RocketStorage
  // bool public token.redemptionPaused = false;

  /**
   * @dev Modifier to make a function callable only when the contract redemption is not paused.
   */
  modifier whenRedemptionNotPaused() {
    require(!redemptionPaused());
    _;
  }

  /**
   * @dev Modifier to make a function callable only when the contract redemption is paused.
   */
  modifier whenRedemptionPaused() {
    require(redemptionPaused());
    _;
  }

  /**
   * @dev returns the redemptionPaused status from contract storage
   */
  function redemptionPaused() public view returns (bool) {
    return rocketStorage.getBool(keccak256("token.redemptionPaused"));
  }

  /**
   * @dev called by the owner to pause, triggers stopped state
   */
  function pauseRedemption() onlyOwner whenRedemptionNotPaused public {
    rocketStorage.setBool(keccak256("token.redemptionPaused"), true);
    emit PauseRedemption();
  }

  /**
   * @dev called by the owner to unpause redemption, returns to normal state
   */
  function unpauseRedemption() onlyOwner whenRedemptionPaused public {
    rocketStorage.setBool(keccak256("token.redemptionPaused"), false);
    emit UnpauseRedemption();
  }
}
/**
 * @title PausableRedemption
 * @dev Base contract which allows children to implement an emergency stop mechanism, specifically for redemption.
 */
function pauseRedemption() onlyOwner whenRedemptionNotPaused public {
  rocketStorage.setBool(keccak256("token.redemptionPaused"), true);
  emit PauseRedemption();
}

/**
 * @dev called by the owner to pause, triggers stopped state
 */