From d97f7cd426f8ec93933293fdbb2861645af224d6 Mon Sep 17 00:00:00 2001 From: "David E. Perez Negron Rocha" Date: Tue, 26 May 2020 18:28:58 -0500 Subject: [PATCH] adding appendWeeks function --- contracts/DECA.sol | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/contracts/DECA.sol b/contracts/DECA.sol index 6076917..9c3752b 100644 --- a/contracts/DECA.sol +++ b/contracts/DECA.sol @@ -153,6 +153,13 @@ contract DECA is ERC20, Ownable { _mint(msg.sender, toSender); } + //Add weeks in case ICO gets not enough funds + function appendWeeks(uint addWeeks ) public onlyOwner { + require(now >= bonus2Ends && now < endDate); + // add weeks to the endDate + endDate += (addWeeks * 1 weeks); + } + //Close down the ICO and claim the Ether. function getETH() public onlyOwner { require(now >= endDate);