diff --git a/contracts/EmergencyProtectedTimelock.sol b/contracts/EmergencyProtectedTimelock.sol index 12237025..645eba5d 100644 --- a/contracts/EmergencyProtectedTimelock.sol +++ b/contracts/EmergencyProtectedTimelock.sol @@ -85,7 +85,7 @@ contract EmergencyProtectedTimelock is IEmergencyProtectedTimelock { MAX_AFTER_SUBMIT_DELAY = sanityCheckParams.maxAfterSubmitDelay; MAX_AFTER_SCHEDULE_DELAY = sanityCheckParams.maxAfterScheduleDelay; MAX_EMERGENCY_MODE_DURATION = sanityCheckParams.maxEmergencyModeDuration; - MAX_EMERGENCY_PROTECTION_DURATION = sanityCheckParams.maxEmergencyModeDuration; + MAX_EMERGENCY_PROTECTION_DURATION = sanityCheckParams.maxEmergencyProtectionDuration; } // --- diff --git a/test/unit/EmergencyProtectedTimelock.t.sol b/test/unit/EmergencyProtectedTimelock.t.sol index 4feeb489..d5827462 100644 --- a/test/unit/EmergencyProtectedTimelock.t.sol +++ b/test/unit/EmergencyProtectedTimelock.t.sol @@ -54,6 +54,22 @@ contract EmergencyProtectedTimelockUnitTests is UnitTest { vm.stopPrank(); } + // EmergencyProtectedTimelock.constructor() + + function testFuzz_constructor_HappyPath( + EmergencyProtectedTimelock.SanityCheckParams memory sanityCheckParams, + address adminExecutor + ) external { + EmergencyProtectedTimelock timelock = new EmergencyProtectedTimelock(sanityCheckParams, adminExecutor); + + assertEq(timelock.getAdminExecutor(), adminExecutor); + + assertEq(timelock.MAX_AFTER_SUBMIT_DELAY(), sanityCheckParams.maxAfterSubmitDelay); + assertEq(timelock.MAX_AFTER_SCHEDULE_DELAY(), sanityCheckParams.maxAfterScheduleDelay); + assertEq(timelock.MAX_EMERGENCY_MODE_DURATION(), sanityCheckParams.maxEmergencyModeDuration); + assertEq(timelock.MAX_EMERGENCY_PROTECTION_DURATION(), sanityCheckParams.maxEmergencyProtectionDuration); + } + // EmergencyProtectedTimelock.submit() function testFuzz_submit_RevertOn_ByStranger(address stranger) external {