From 998c72ab5bb7de260e0866d945496afb05dc3d85 Mon Sep 17 00:00:00 2001 From: Francisco Giordano Date: Mon, 28 Aug 2017 17:13:59 -0300 Subject: [PATCH] add preconditions to constructor --- contracts/token/TokenVesting.sol | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contracts/token/TokenVesting.sol b/contracts/token/TokenVesting.sol index 6eb2e17d2..c05c0cc19 100644 --- a/contracts/token/TokenVesting.sol +++ b/contracts/token/TokenVesting.sol @@ -31,6 +31,10 @@ contract TokenVesting is Ownable { * @param _end timestamp of the moment when all balance will have been vested */ function TokenVesting(address _beneficiary, uint256 _cliff, uint256 _end) { + require(_beneficiary != 0x0); + require(_cliff > now); + require(_end > _cliff); + beneficiary = _beneficiary; cliff = _cliff; end = _end;