diff --git a/src/L1/SuperchainConfig.sol b/src/L1/SuperchainConfig.sol index b0f5e476d..e0653d167 100644 --- a/src/L1/SuperchainConfig.sol +++ b/src/L1/SuperchainConfig.sol @@ -120,7 +120,7 @@ contract SuperchainConfig is ProxyAdminOwnedBase, ISemver { _assertOnlyGuardian(); // Cannot extend the pause if not already paused. - if (pauseTimestamps[_identifier] == 0) { + if (!paused(_identifier)) { revert SuperchainConfig_NotAlreadyPaused(_identifier); } diff --git a/test/L1/SuperchainConfig.t.sol b/test/L1/SuperchainConfig.t.sol index 95f5b1bcc..5fd544e07 100644 --- a/test/L1/SuperchainConfig.t.sol +++ b/test/L1/SuperchainConfig.t.sol @@ -221,6 +221,19 @@ contract SuperchainConfig_Extend_Test is SuperchainConfig_TestInit { ); superchainConfig.extend(_identifier); } + + /// @notice Tests that `extend` reverts when the pause has already expired. + /// @param _identifier The identifier to test. + function testFuzz_extend_expiredPause_reverts(address _identifier) external { + _pauseAsGuardian(_identifier); + vm.warp(block.timestamp + PAUSE_EXPIRY + 1); + assertFalse(superchainConfig.paused(_identifier)); + vm.prank(superchainConfig.guardian()); + vm.expectRevert( + abi.encodeWithSelector(ISuperchainConfig.SuperchainConfig_NotAlreadyPaused.selector, _identifier) + ); + superchainConfig.extend(_identifier); + } } /// @title SuperchainConfig_Pausable_Test