From c97d9bfac85b250615e82f2438338d277aa41713 Mon Sep 17 00:00:00 2001 From: ayaanoncrypto Date: Wed, 19 Aug 2026 21:22:00 +0000 Subject: [PATCH] fix: reject extending expired pauses --- src/L1/SuperchainConfig.sol | 5 +++-- test/L1/SuperchainConfig.t.sol | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/L1/SuperchainConfig.sol b/src/L1/SuperchainConfig.sol index b2fc85f32..427b76af9 100644 --- a/src/L1/SuperchainConfig.sol +++ b/src/L1/SuperchainConfig.sol @@ -119,8 +119,9 @@ contract SuperchainConfig is ProxyAdminOwnedBase, ISemver { // Only the Guardian can extend the pause. _assertOnlyGuardian(); - // Cannot extend the pause if not already paused. - if (pauseTimestamps[_identifier] == 0) { + // An expired pause retains its timestamp but is no longer active. Requiring + // paused() here prevents extend() from re-activating it without unpause(). + if (!paused(_identifier)) { revert SuperchainConfig_NotAlreadyPaused(_identifier); } diff --git a/test/L1/SuperchainConfig.t.sol b/test/L1/SuperchainConfig.t.sol index 8b6ec06d5..7a1b0ded2 100644 --- a/test/L1/SuperchainConfig.t.sol +++ b/test/L1/SuperchainConfig.t.sol @@ -195,6 +195,23 @@ contract SuperchainConfig_Extend_Test is SuperchainConfig_TestInit { ); superchainConfig.extend(_identifier); } + + /// @notice Tests that `extend` cannot re-activate an expired pause. + function test_extend_expiredPause_reverts() external { + _pauseAsGuardian(address(this)); + vm.warp(block.timestamp + PAUSE_EXPIRY + 1); + + assertFalse(superchainConfig.paused(address(this))); + + vm.expectRevert( + abi.encodeWithSelector( + ISuperchainConfig.SuperchainConfig_NotAlreadyPaused.selector, + address(this) + ) + ); + vm.prank(superchainConfig.guardian()); + superchainConfig.extend(address(this)); + } } /// @title SuperchainConfig_Pausable_Test