diff --git a/bolt-contracts/test/BoltManager.EigenLayer.t.sol b/bolt-contracts/test/BoltManager.EigenLayer.t.sol index 85d9bf17..91c93169 100644 --- a/bolt-contracts/test/BoltManager.EigenLayer.t.sol +++ b/bolt-contracts/test/BoltManager.EigenLayer.t.sol @@ -5,6 +5,7 @@ import {Test, console} from "forge-std/Test.sol"; import {BoltValidators} from "../src/contracts/BoltValidators.sol"; import {BoltManager} from "../src/contracts/BoltManager.sol"; +import {BoltParameters} from "../src/contracts/BoltParameters.sol"; import {BoltEigenLayerMiddleware} from "../src/contracts/BoltEigenLayerMiddleware.sol"; import {IBoltValidators} from "../src/interfaces/IBoltValidators.sol"; import {IBoltManager} from "../src/interfaces/IBoltManager.sol"; @@ -50,15 +51,23 @@ contract BoltManagerEigenLayerTest is Test { eigenLayerDeployer = new EigenLayerDeployer(staker); eigenLayerDeployer.setUp(); + uint48 epochDuration = 1 days; + uint48 slashingWindow = 7 days; + bool allowUnsafeRegistration = true; + + BoltParameters parameters = new BoltParameters(); + parameters.initialize(admin, epochDuration, slashingWindow, allowUnsafeRegistration); + // Deploy Bolt contracts validators = new BoltValidators(); - validators.initialize(admin); + validators.initialize(admin, address(parameters)); manager = new BoltManager(); - manager.initialize(admin, address(validators)); + manager.initialize(admin, address(parameters), address(validators)); middleware = new BoltEigenLayerMiddleware(); middleware.initialize( address(admin), + address(parameters), address(manager), address(eigenLayerDeployer.avsDirectory()), address(eigenLayerDeployer.delegationManager()), diff --git a/bolt-contracts/test/BoltManager.Symbiotic.t.sol b/bolt-contracts/test/BoltManager.Symbiotic.t.sol index b5be662c..e4343c94 100644 --- a/bolt-contracts/test/BoltManager.Symbiotic.t.sol +++ b/bolt-contracts/test/BoltManager.Symbiotic.t.sol @@ -23,6 +23,7 @@ import {SimpleCollateral} from "@symbiotic/../test/mocks/SimpleCollateral.sol"; import {IBoltValidators} from "../src/interfaces/IBoltValidators.sol"; import {IBoltMiddleware} from "../src/interfaces/IBoltMiddleware.sol"; +import {BoltParameters} from "../src/contracts/BoltParameters.sol"; import {BoltValidators} from "../src/contracts/BoltValidators.sol"; import {BoltManager} from "../src/contracts/BoltManager.sol"; import {BoltSymbioticMiddleware} from "../src/contracts/BoltSymbioticMiddleware.sol"; @@ -150,15 +151,23 @@ contract BoltManagerSymbioticTest is Test { // --- Deploy Bolt contracts --- + uint48 epochDuration = 1 days; + uint48 slashingWindow = 7 days; + bool allowUnsafeRegistration = true; + + BoltParameters parameters = new BoltParameters(); + parameters.initialize(admin, epochDuration, slashingWindow, allowUnsafeRegistration); + validators = new BoltValidators(); - validators.initialize(admin); + validators.initialize(admin, address(parameters)); manager = new BoltManager(); - manager.initialize(admin, address(validators)); + manager.initialize(admin, address(parameters), address(validators)); middleware = new BoltSymbioticMiddleware(); middleware.initialize( admin, + address(parameters), address(manager), networkAdmin, address(operatorRegistry), diff --git a/bolt-contracts/test/BoltValidators.t.sol b/bolt-contracts/test/BoltValidators.t.sol index f2a1b28d..64ea353c 100644 --- a/bolt-contracts/test/BoltValidators.t.sol +++ b/bolt-contracts/test/BoltValidators.t.sol @@ -3,6 +3,7 @@ pragma solidity 0.8.25; import {Test, console} from "forge-std/Test.sol"; +import {BoltParameters} from "../src/contracts/BoltParameters.sol"; import {BoltValidators} from "../src/contracts/BoltValidators.sol"; import {IBoltValidators} from "../src/interfaces/IBoltValidators.sol"; import {BLS12381} from "../src/lib/bls/BLS12381.sol"; @@ -10,6 +11,7 @@ import {BLS12381} from "../src/lib/bls/BLS12381.sol"; contract BoltValidatorsTest is Test { using BLS12381 for BLS12381.G1Point; + BoltParameters public parameters; BoltValidators public validators; uint128 public constant PRECONF_MAX_GAS_LIMIT = 5_000_000; @@ -20,8 +22,15 @@ contract BoltValidatorsTest is Test { address validator = makeAddr("validator"); function setUp() public { + uint48 epochDuration = 1 days; + uint48 slashingWindow = 7 days; + bool allowUnsafeRegistration = true; + + parameters = new BoltParameters(); + + parameters.initialize(admin, epochDuration, slashingWindow, allowUnsafeRegistration); validators = new BoltValidators(); - validators.initialize(admin); + validators.initialize(admin, address(parameters)); } function testUnsafeRegistration() public { @@ -53,7 +62,7 @@ contract BoltValidatorsTest is Test { BLS12381.G1Point memory pubkey = BLS12381.generatorG1(); vm.prank(admin); - validators.setAllowUnsafeRegistration(false); + parameters.setAllowUnsafeRegistration(false); vm.prank(validator); vm.expectRevert(IBoltValidators.UnsafeRegistrationNotAllowed.selector);