Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions ethereum/test/MultisigProxy.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -388,21 +388,27 @@ contract MultisigProxyTest is Test {

/// @dev UT-FIX-13: deploying with a timelock below the requested floor reverts.
function test_constructor_revertsOnTimelockBelowMinTimelock() public {

@MaiborodaY MaiborodaY Jun 18, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked this PR locally on top of the current dev.

It looks like this branch is carrying an older version of these three constructor timelock tests. Current dev uses valid signer sets (_validEnc(), 2, _validFed(), 2), but this PR changes them back to 1-of-1 (enc, 1, fed, 1).

With the current MultisigProxy validation, 1-of-1 is rejected earlier in _requireValidThreshold, so these tests fail with InvalidThreshold before reaching the timelock/minTimelock checks.

Failing tests:

  • test_constructor_revertsOnTimelockBelowMinTimelock
  • test_constructor_revertsOnZeroMinTimelock
  • test_constructor_revertsOnMinTimelockTooLong

Could you sync this file with current dev and keep the valid signer sets for these tests? Otherwise they no longer isolate TimelockTooShort / InvalidMinTimelock.

address[] memory enc = new address[](1); enc[0] = encA1;
address[] memory fed = new address[](1); fed[0] = fedA1;
// timelock (1h) is below the requested floor (2h) -> TimelockTooShort
vm.expectRevert(IMultisigProxy.TimelockTooShort.selector);
new MultisigProxy(address(bridge), address(cm), _validEnc(), 2, _validFed(), 2, commissionReceiver, 1 hours, 2 hours);
new MultisigProxy(address(bridge), address(cm), enc, 1, fed, 1, commissionReceiver, 1 hours, 2 hours);
}

/// @dev A zero floor is rejected — it would defeat the purpose of the fix.
function test_constructor_revertsOnZeroMinTimelock() public {
address[] memory enc = new address[](1); enc[0] = encA1;
address[] memory fed = new address[](1); fed[0] = fedA1;
vm.expectRevert(IMultisigProxy.InvalidMinTimelock.selector);
new MultisigProxy(address(bridge), address(cm), _validEnc(), 2, _validFed(), 2, commissionReceiver, TIMELOCK, 0);
new MultisigProxy(address(bridge), address(cm), enc, 1, fed, 1, commissionReceiver, TIMELOCK, 0);
}

/// @dev A floor at/above the upper bound leaves no valid range — rejected.
function test_constructor_revertsOnMinTimelockTooLong() public {
address[] memory enc = new address[](1); enc[0] = encA1;
address[] memory fed = new address[](1); fed[0] = fedA1;
vm.expectRevert(IMultisigProxy.InvalidMinTimelock.selector);
new MultisigProxy(address(bridge), address(cm), _validEnc(), 2, _validFed(), 2, commissionReceiver, TIMELOCK, 30 days);
new MultisigProxy(address(bridge), address(cm), enc, 1, fed, 1, commissionReceiver, TIMELOCK, 30 days);
}

function test_minTimelock_returnsConfiguredFloor() public view {
Expand Down