Skip to content

Conversation

@tsudmi
Copy link
Member

@tsudmi tsudmi commented Jan 9, 2026

No description provided.

Copilot AI review requested due to automatic review settings January 9, 2026 12:34
Copy link

Copilot AI left a 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 redemptionAssets parameter to getExitQueueMissingAssets function 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,
Copy link

Copilot AI Jan 9, 2026

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.

Copilot uses AI. Check for mistakes.
uint256 missingAssets = validatorsChecker.getExitQueueMissingAssets(
vault,
0, // No pending assets
0,
Copy link

Copilot AI Jan 9, 2026

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.

Suggested change
0,
0, // No redemption assets

Copilot uses AI. Check for mistakes.
uint256 updatedMissingAssets = validatorsChecker.getExitQueueMissingAssets(
prevVersionVault,
0, // withdrawingAssets
0, // No redemption assets
Copy link

Copilot AI Jan 9, 2026

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.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

github-actions bot commented Jan 9, 2026

Forge code coverage:

File % Lines % Statements % Branches % Funcs

@tsudmi tsudmi marked this pull request as draft January 12, 2026 10:34
@tsudmi tsudmi force-pushed the implement-redemptions branch from 66e6f8a to 92eb8c8 Compare January 14, 2026 14:12
Copilot AI review requested due to automatic review settings January 14, 2026 14:12
Copy link

Copilot AI left a 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);
Copy link

Copilot AI Jan 14, 2026

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.

Copilot uses AI. Check for mistakes.
Comment on lines +50 to +52
if (admin != address(0)) {
return;
}
Copy link

Copilot AI Jan 14, 2026

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.

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings January 14, 2026 17:45
Copy link

Copilot AI left a 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 {
Copy link

Copilot AI Jan 14, 2026

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.

Suggested change
) external override {
) external override {
// Only the positionsManager is authorized to redeem OsToken positions

Copilot uses AI. Check for mistakes.

vm.expectRevert(Errors.InvalidDelay.selector);
new EthOsTokenRedeemer(_osToken, address(contracts.osTokenVaultController), owner, invalidExitQueueDelay);
new EthOsTokenRedeemer(address(contracts.vaultsRegistry),_osToken, address(contracts.osTokenVaultController), owner, invalidExitQueueDelay);
Copy link

Copilot AI Jan 14, 2026

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.

Suggested change
new EthOsTokenRedeemer(address(contracts.vaultsRegistry),_osToken, address(contracts.osTokenVaultController), owner, invalidExitQueueDelay);
new EthOsTokenRedeemer(address(contracts.vaultsRegistry), _osToken, address(contracts.osTokenVaultController), owner, invalidExitQueueDelay);

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants