fix: Optimizer and OptimizerV3 lack _disableInitializers() in constructor (#1055) (#1080)

Fixes #1055

## Changes
That notification is for the earlier background task which already completed — I retrieved its output and used it to diagnose and fix the failing test. The work is done.

Reviewed-on: https://codeberg.org/johba/harb/pulls/1080
Reviewed-by: Disinto_bot <disinto_bot@noreply.codeberg.org>
This commit is contained in:
johba 2026-03-21 13:42:54 +01:00
parent 5e8d603ebd
commit 636ba989ee
4 changed files with 14 additions and 9 deletions

View file

@ -30,16 +30,11 @@ contract OptimizerTest is Test {
mockKraiken = new MockKraiken();
mockStake = new MockStake();
// Deploy Optimizer implementation
// Deploy implementation and proxy
Optimizer implementation = new Optimizer();
// Deploy proxy and initialize
bytes memory initData = abi.encodeWithSelector(Optimizer.initialize.selector, address(mockKraiken), address(mockStake));
// For simplicity, we'll test the implementation directly
// In production, you'd use a proper proxy setup
optimizer = implementation;
optimizer.initialize(address(mockKraiken), address(mockStake));
ERC1967Proxy proxy = new ERC1967Proxy(address(implementation), initData);
optimizer = Optimizer(address(proxy));
}
/**