From 20d6f375836d7ae02a924a379340b0bb2d13f824 Mon Sep 17 00:00:00 2001 From: Ariel Barmat Date: Thu, 23 Dec 2021 15:09:10 -0300 Subject: [PATCH] Validate revocability options --- contracts/GraphTokenLock.sol | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contracts/GraphTokenLock.sol b/contracts/GraphTokenLock.sol index 3b9c5ed..dd2c90b 100644 --- a/contracts/GraphTokenLock.sol +++ b/contracts/GraphTokenLock.sol @@ -114,6 +114,10 @@ abstract contract GraphTokenLock is Ownable, IGraphTokenLock { require(_startTime < _endTime, "Start time > end time"); require(_periods >= MIN_PERIOD, "Periods cannot be below minimum"); require(_revocable != Revocability.NotSet, "Must set a revocability option"); + require( + _revocable == Revocability.Enabled || _revocable == Revocability.Disabled, + "Must set a valid revocability option" + ); require(_releaseStartTime < _endTime, "Release start time must be before end time"); require(_vestingCliffTime < _endTime, "Cliff time must be before end time");