Lack of Validation of Crowdinvesting Initialization Parameters
The `Crowdinvesting` contract allows everyone who meets the requirements to buy tokens at a fixed price. The `initialize()` function receives parameters to set up the `Crowdinvesting` accordingly.\\nThe following parameters lack of validation during initialization:\\n`tokenPrice`\\n`minAmountPerBuyer`\\n`lastBuyDate`\\n`currency`\\n`tokenPrice`\\n```\\nrequire(\\_arguments.tokenPrice != 0, "\\_tokenPrice needs to be a non-zero amount");\\n```\\n\\n`tokenPrice` is checked to be different to zero. It should be verified to be in between `priceMin` and `priceMax` when these parameters are provided.\\n`minAmountPerBuyer`\\n```\\nrequire(\\n \\_arguments.minAmountPerBuyer <= \\_arguments.maxAmountPerBuyer,\\n "\\_minAmountPerBuyer needs to be smaller or equal to \\_maxAmountPerBuyer"\\n);\\n```\\n\\n`minAmountPerBuyer` is checked to be below or equal to `maxAmountPerBuyer`. It should be verified to not be zero.\\n`lastBuyDate`\\n```\\nlastBuyDate = \\_arguments.lastBuyDate;\\n```\\n\\n`lastBuyDate` is not validated at all. It should be verified to be greater than the current `block.timestamp`. Currently, a `Crowdinvesting` contract with `lastBuyDate` parameter set to a value (different than zero) below `block.timestamp` will not be able to sell any token.\\n```\\nfunction \\_checkAndDeliver(uint256 \\_amount, address \\_tokenReceiver) internal {\\n require(tokensSold + \\_amount <= maxAmountOfTokenToBeSold, "Not enough tokens to sell left");\\n require(tokensBought[\\_tokenReceiver] + \\_amount >= minAmountPerBuyer, "Buyer needs to buy at least minAmount");\\n require(\\n tokensBought[\\_tokenReceiver] + \\_amount <= maxAmountPerBuyer,\\n "Total amount of bought tokens needs to be lower than or equal to maxAmount"\\n );\\n\\n if (lastBuyDate != 0 && block.timestamp > lastBuyDate) {\\n revert("Last buy date has passed: not selling tokens anymore.");\\n }\\n\\n tokensSold += \\_amount;\\n tokensBought[\\_tokenReceiver] += \\_amount;\\n\\n token.mint(\\_tokenReceiver, \\_amount);\\n}\\n```\\n\\n`currency`\\n```\\nrequire(address(\\_arguments.currency) != address(0), "currency can not be zero address");\\n```\\n\\n`currency` is checked to be different than zero. The documentation mentions a restricted list of supported currencies. It should be enforced by checking this parameter against a whitelist of `currency` addresses.
Enhance the validation of the following parameters: `tokenPrice`, `tokenPrice`, `lastBuyDate`, `currency`.
```\\nrequire(\\_arguments.tokenPrice != 0, "\\_tokenPrice needs to be a non-zero amount");\\n```\\n