Skip to content

Commit bc7f865

Browse files
committed
Allow a timelock delay of zero
1 parent acb8921 commit bc7f865

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

packages/contracts-bedrock/src/safe/TimelockGuard.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ contract TimelockGuard is IGuard, ISemver {
6767
/// @param _timelockDelay The timelock delay in seconds
6868
function configureTimelockGuard(uint256 _timelockDelay) external {
6969
// Validate timelock delay - must be non-zero and not longer than 1 year
70-
if (_timelockDelay > 365 days) {
70+
if (_timelockDelay == 0 || _timelockDelay > 365 days) {
7171
revert TimelockGuard_InvalidTimelockDelay();
7272
}
7373

packages/contracts-bedrock/test/safe/TimelockGuard.t.sol

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,6 @@ contract TimelockGuard_ConfigureTimelockGuard_Test is TimelockGuard_TestInit {
120120
timelockGuard.configureTimelockGuard(tooLongDelay);
121121
}
122122

123-
function test_configureTimelockGuard_revertsIfDelayZero_reverts() external {
124-
vm.expectRevert(TimelockGuard.TimelockGuard_InvalidTimelockDelay.selector);
125-
vm.prank(address(safeInstance.safe));
126-
timelockGuard.configureTimelockGuard(0);
127-
}
128-
129123
function test_configureTimelockGuard_acceptsMaxValidDelay_succeeds() external {
130124
vm.expectEmit(true, true, true, true);
131125
emit GuardConfigured(address(safeInstance.safe), ONE_YEAR);

0 commit comments

Comments
 (0)