Merged
Conversation
…ding new assertions and pause level management
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. OpenSSF Scorecard
Scanned Files
|
There was a problem hiding this comment.
Pull request overview
This PR introduces a two-level emergency pause system (soft vs. hard) across Flyover contracts, adds hard-pause window accounting for time/block-based expirations, and updates tests to validate the new pause semantics.
Changes:
- Add pause levels (0/1/2) and hard-pause window tracking/overlap computation in
PauseRegistry. - Update core contracts to differentiate “no new business” (soft pause) vs “full freeze” (hard pause) via new modifiers.
- Extend pause-related tests to cover level behavior and hard-pause overlap logic.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| test/tasks/PauseSystem.t.sol | Updates mock pause registry to satisfy the expanded IPauseRegistry interface. |
| test/Pause.t.sol | Adjusts pause reason expectations and adds tests for soft/hard pause behavior and overlap calculations. |
| src/PegOutContract.sol | Applies soft/hard pause modifiers; adjusts expiry/penalty logic to account for hard-pause overlap and records deposit block. |
| src/PegInContract.sol | Applies soft/hard pause modifiers; adjusts slashing timing logic to account for hard-pause overlap. |
| src/PauseRegistry.sol | Implements pause levels, hard-pause logging, and overlap computation helpers. |
| src/interfaces/IPauseRegistry.sol | Extends interface with pause levels and overlap APIs. |
| src/FlyoverDiscovery.sol | Switches registration to soft pause and provider updates to hard pause gating. |
| src/EmergencyPause/EmergencyPause.sol | Replaces single pause modifier with soft/hard pause modifiers. |
| src/CollateralManagement.sol | Gates “new business” actions on soft pause and withdrawals/resign on hard pause; excludes hard-pause blocks from resignation delay. |
Comments suppressed due to low confidence (1)
src/EmergencyPause/EmergencyPause.sol:40
- The new
whenNotSoftPaused/whenNotHardPausedmodifiers replace the oldwhenNotPaused, but the module-level docstring and related comments still refer towhenNotPaused. This is now misleading for maintainers/users ofEmergencyPause; update the documentation to reference the new modifier names and semantics (soft vs hard).
/// @notice Reverts at pause level >= 1 (soft pause: no new business)
modifier whenNotSoftPaused() {
if (_getEmergencyPauseStorage().pauseRegistry.pauseLevel() > 0) {
revert Flyover.EnforcedPause();
}
_;
}
/// @notice Reverts at pause level >= 2 (hard pause: full freeze)
modifier whenNotHardPaused() {
if (_getEmergencyPauseStorage().pauseRegistry.pauseLevel() > 1) {
revert Flyover.EnforcedPause();
}
_;
}
You can also share your feedback on Copilot code review. Take the survey.
…tests for pause timestamp tracking consistency
…posit block number and add corresponding tests for refund behavior
… reversion on multiple pause attempts
…evel checks and modifiers
Luisfc68
requested changes
Mar 19, 2026
Luisfc68
approved these changes
Mar 26, 2026
…rameter and improve clarity, remove pause/unpause
…eamline pause management and enhance clarity in PauseSystem and tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Implement Hard and Soft Pause functionality, and add corresponding test cases
The Task
https://rsklabs.atlassian.net/browse/FLY-2232?atlOrigin=eyJpIjoiZDUwNzE3ODY3OTUxNDk5NmFhMDFmOWEwOTg5MmMwY2EiLCJwIjoiaiJ9