From fa2b2045358ff8b7c8bf04d9f38d1135b60d7e3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Venturo?= Date: Mon, 30 Nov 2020 20:14:02 -0300 Subject: [PATCH] Update TimelockController docs (#2415) Co-authored-by: Francisco Giordano --- contracts/access/TimelockController.sol | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/contracts/access/TimelockController.sol b/contracts/access/TimelockController.sol index 0d86286a4..f96f37152 100644 --- a/contracts/access/TimelockController.sol +++ b/contracts/access/TimelockController.sol @@ -123,6 +123,8 @@ contract TimelockController is AccessControl { /** * @dev Returns the minimum delay for an operation to become valid. + * + * This value can be changed by executing an operation that calls `updateDelay`. */ function getMinDelay() public view returns (uint256 duration) { return _minDelay; @@ -269,9 +271,14 @@ contract TimelockController is AccessControl { } /** - * @dev Changes the timelock duration for future operations. + * @dev Changes the minimum timelock duration for future operations. * * Emits a {MinDelayChange} event. + * + * Requirements: + * + * - the caller must be the timelock itself. This can only be achieved by scheduling and later executing + * an operation where the timelock is the target and the data is the ABI-encoded call to this function. */ function updateDelay(uint256 newDelay) external virtual { require(msg.sender == address(this), "TimelockController: caller must be timelock");