-
Notifications
You must be signed in to change notification settings - Fork 8
Add redemption assets to validators checker #129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for redemption assets in the validators checker by introducing a new parameter to the getExitQueueMissingAssets function. The redemption assets are now included in the calculation of missing assets needed to cover exit queue tickets.
Key Changes
- Added
redemptionAssetsparameter togetExitQueueMissingAssetsfunction signature in the interface and implementation - Updated the missing assets calculation to initialize with redemption assets before adding legacy and queued share requirements
- Updated all test cases to pass the new redemption assets parameter (set to 0 in all tests)
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| contracts/interfaces/IValidatorsChecker.sol | Added redemptionAssets parameter to the getExitQueueMissingAssets function interface |
| contracts/validators/ValidatorsChecker.sol | Implemented redemption assets support in missing assets calculation and refactored control flow |
| test/EthValidatorsChecker.t.sol | Updated all test calls to include the new redemption assets parameter (set to 0) |
| test/gnosis/GnoValidatorsChecker.t.sol | Updated all test calls to include the new redemption assets parameter (set to 0) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| uint256 initialMissingAssets = validatorsChecker.getExitQueueMissingAssets( | ||
| vault, | ||
| 0, // No pending assets | ||
| 0, |
Copilot
AI
Jan 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing comment for the redemption assets parameter. Other calls in this file use '// No redemption assets' to document this parameter.
| uint256 missingAssets = validatorsChecker.getExitQueueMissingAssets( | ||
| vault, | ||
| 0, // No pending assets | ||
| 0, |
Copilot
AI
Jan 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing comment for the redemption assets parameter. Other calls in this file use '// No redemption assets' to document this parameter.
| 0, | |
| 0, // No redemption assets |
| uint256 updatedMissingAssets = validatorsChecker.getExitQueueMissingAssets( | ||
| prevVersionVault, | ||
| 0, // withdrawingAssets | ||
| 0, // No redemption assets |
Copilot
AI
Jan 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent spacing in comment. This line uses 'No redemption assets' while line 76 uses '// No redemption assets' with a leading space after the comment markers.
|
Forge code coverage:
|
66e6f8a to
92eb8c8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 37 out of 37 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| vm.expectRevert(Errors.InvalidDelay.selector); | ||
| new EthOsTokenRedeemer(_osToken, address(contracts.osTokenVaultController), owner, invalidExitQueueDelay); | ||
| new EthOsTokenRedeemer(address(contracts.vaultsRegistry),_osToken, address(contracts.osTokenVaultController), owner, invalidExitQueueDelay); |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space after comma following 'address(contracts.vaultsRegistry)'. Add a space for consistent formatting.
| if (admin != address(0)) { | ||
| return; | ||
| } |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comment explaining why this early return check exists - it appears to handle upgrades from version 3 to 4 where admin is already set, as mentioned in the comment on line 49. The logic could be clearer with explicit documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 41 out of 41 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| OsTokenPosition[] memory positions, | ||
| bytes32[] calldata proof, | ||
| bool[] calldata proofFlags | ||
| ) external override { |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The access control check at line 314-316 contradicts the function documentation comment on line 156-157 which states 'The address authorized to redeem OsToken positions'. The comment should be updated to clarify that positionsManager is the address authorized to redeem OsToken positions, not just propose them.
| ) external override { | |
| ) external override { | |
| // Only the positionsManager is authorized to redeem OsToken positions |
|
|
||
| vm.expectRevert(Errors.InvalidDelay.selector); | ||
| new EthOsTokenRedeemer(_osToken, address(contracts.osTokenVaultController), owner, invalidExitQueueDelay); | ||
| new EthOsTokenRedeemer(address(contracts.vaultsRegistry),_osToken, address(contracts.osTokenVaultController), owner, invalidExitQueueDelay); |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space after comma between vaultsRegistry and _osToken parameters. This inconsistency with formatting should be corrected for better code readability.
| new EthOsTokenRedeemer(address(contracts.vaultsRegistry),_osToken, address(contracts.osTokenVaultController), owner, invalidExitQueueDelay); | |
| new EthOsTokenRedeemer(address(contracts.vaultsRegistry), _osToken, address(contracts.osTokenVaultController), owner, invalidExitQueueDelay); |
No description provided.