diff --git a/script/deploy/devnet/deploy_from_scratch.s.sol b/script/deploy/devnet/deploy_from_scratch.s.sol index 0fb13960da..dd07a6e0aa 100644 --- a/script/deploy/devnet/deploy_from_scratch.s.sol +++ b/script/deploy/devnet/deploy_from_scratch.s.sol @@ -231,7 +231,8 @@ contract DeployFromScratch is Script, Test { eigenPodImplementation = new EigenPod( ethPOSDeposit, eigenPodManager, - GOERLI_GENESIS_TIME + GOERLI_GENESIS_TIME, + SEMVER ); eigenPodBeacon = new UpgradeableBeacon(address(eigenPodImplementation)); @@ -254,7 +255,8 @@ contract DeployFromScratch is Script, Test { ethPOSDeposit, eigenPodBeacon, delegation, - eigenLayerPauserReg + eigenLayerPauserReg, + SEMVER ); rewardsCoordinatorImplementation = new RewardsCoordinator( IRewardsCoordinatorTypes.RewardsCoordinatorConstructorParams( @@ -279,8 +281,8 @@ contract DeployFromScratch is Script, Test { ALLOCATION_CONFIGURATION_DELAY, SEMVER ); - permissionControllerImplementation = new PermissionController(); - strategyFactoryImplementation = new StrategyFactory(strategyManager, eigenLayerPauserReg); + permissionControllerImplementation = new PermissionController(SEMVER); + strategyFactoryImplementation = new StrategyFactory(strategyManager, eigenLayerPauserReg, SEMVER); // Third, upgrade the proxy contracts to use the correct implementation contracts and initialize them. { @@ -348,7 +350,7 @@ contract DeployFromScratch is Script, Test { // Deploy strategyFactory & base // Create base strategy implementation - baseStrategyImplementation = new StrategyBase(strategyManager, eigenLayerPauserReg); + baseStrategyImplementation = new StrategyBase(strategyManager, eigenLayerPauserReg, SEMVER); // Create a proxy beacon for base strategy implementation strategyBeacon = new UpgradeableBeacon(address(baseStrategyImplementation)); diff --git a/script/deploy/local/Deploy_From_Scratch.s.sol b/script/deploy/local/Deploy_From_Scratch.s.sol index c413d5ef76..6201cd55a4 100644 --- a/script/deploy/local/Deploy_From_Scratch.s.sol +++ b/script/deploy/local/Deploy_From_Scratch.s.sol @@ -244,7 +244,7 @@ contract DeployFromScratch is Script, Test { } else { ethPOSDeposit = IETHPOSDeposit(stdJson.readAddress(config_data, ".ethPOSDepositAddress")); } - eigenPodImplementation = new EigenPod(ethPOSDeposit, eigenPodManager, GOERLI_GENESIS_TIME); + eigenPodImplementation = new EigenPod(ethPOSDeposit, eigenPodManager, GOERLI_GENESIS_TIME, SEMVER); eigenPodBeacon = new UpgradeableBeacon(address(eigenPodImplementation)); @@ -265,7 +265,8 @@ contract DeployFromScratch is Script, Test { ethPOSDeposit, eigenPodBeacon, delegation, - eigenLayerPauserReg + eigenLayerPauserReg, + SEMVER ); rewardsCoordinatorImplementation = new RewardsCoordinator( IRewardsCoordinatorTypes.RewardsCoordinatorConstructorParams( @@ -290,7 +291,7 @@ contract DeployFromScratch is Script, Test { ALLOCATION_CONFIGURATION_DELAY, SEMVER ); - permissionControllerImplementation = new PermissionController(); + permissionControllerImplementation = new PermissionController(SEMVER); // Third, upgrade the proxy contracts to use the correct implementation contracts and initialize them. { @@ -362,7 +363,7 @@ contract DeployFromScratch is Script, Test { ); // deploy StrategyBaseTVLLimits contract implementation - baseStrategyImplementation = new StrategyBaseTVLLimits(strategyManager, eigenLayerPauserReg); + baseStrategyImplementation = new StrategyBaseTVLLimits(strategyManager, eigenLayerPauserReg, SEMVER); // create upgradeable proxies that each point to the implementation and initialize them for (uint256 i = 0; i < strategyConfigs.length; ++i) { if (strategyConfigs[i].tokenAddress == address(0)) { diff --git a/script/deploy/local/deploy_from_scratch.slashing.s.sol b/script/deploy/local/deploy_from_scratch.slashing.s.sol index fc66be2b33..bf07af1d0a 100644 --- a/script/deploy/local/deploy_from_scratch.slashing.s.sol +++ b/script/deploy/local/deploy_from_scratch.slashing.s.sol @@ -238,7 +238,8 @@ contract DeployFromScratch is Script, Test { eigenPodImplementation = new EigenPod( ethPOSDeposit, eigenPodManager, - GOERLI_GENESIS_TIME + GOERLI_GENESIS_TIME, + SEMVER ); eigenPodBeacon = new UpgradeableBeacon(address(eigenPodImplementation)); @@ -260,7 +261,8 @@ contract DeployFromScratch is Script, Test { ethPOSDeposit, eigenPodBeacon, delegation, - eigenLayerPauserReg + eigenLayerPauserReg, + SEMVER ); rewardsCoordinatorImplementation = new RewardsCoordinator( IRewardsCoordinatorTypes.RewardsCoordinatorConstructorParams( @@ -285,7 +287,7 @@ contract DeployFromScratch is Script, Test { ALLOCATION_CONFIGURATION_DELAY, SEMVER ); - permissionControllerImplementation = new PermissionController(); + permissionControllerImplementation = new PermissionController(SEMVER); // Third, upgrade the proxy contracts to use the correct implementation contracts and initialize them. { @@ -357,7 +359,7 @@ contract DeployFromScratch is Script, Test { ); // deploy StrategyBaseTVLLimits contract implementation - baseStrategyImplementation = new StrategyBaseTVLLimits(strategyManager, eigenLayerPauserReg); + baseStrategyImplementation = new StrategyBaseTVLLimits(strategyManager, eigenLayerPauserReg, SEMVER); // create upgradeable proxies that each point to the implementation and initialize them for (uint256 i = 0; i < strategyConfigs.length; ++i) { if (strategyConfigs[i].tokenAddress == address(0)) { diff --git a/script/releases/v1.0.0-slashing/1-deployContracts.s.sol b/script/releases/v1.0.0-slashing/1-deployContracts.s.sol index b42138d8b0..d33b75e800 100644 --- a/script/releases/v1.0.0-slashing/1-deployContracts.s.sol +++ b/script/releases/v1.0.0-slashing/1-deployContracts.s.sol @@ -35,7 +35,7 @@ contract Deploy is EOADeployer { deployImpl({ name: type(PermissionController).name, - deployedTo: address(new PermissionController()) + deployedTo: address(new PermissionController(Env.version())) }); deployProxy({ @@ -134,7 +134,8 @@ contract Deploy is EOADeployer { _ethPOS: Env.ethPOS(), _eigenPodBeacon: Env.beacon.eigenPod(), _delegationManager: Env.proxy.delegationManager(), - _pauserRegistry: Env.impl.pauserRegistry() + _pauserRegistry: Env.impl.pauserRegistry(), + _version: Env.version() })) }); @@ -143,7 +144,8 @@ contract Deploy is EOADeployer { deployedTo: address(new EigenPod({ _ethPOS: Env.ethPOS(), _eigenPodManager: Env.proxy.eigenPodManager(), - _GENESIS_TIME: Env.EIGENPOD_GENESIS_TIME() + _GENESIS_TIME: Env.EIGENPOD_GENESIS_TIME(), + _version: Env.version() })) }); @@ -153,7 +155,8 @@ contract Deploy is EOADeployer { name: type(StrategyBaseTVLLimits).name, deployedTo: address(new StrategyBaseTVLLimits({ _strategyManager: Env.proxy.strategyManager(), - _pauserRegistry: Env.impl.pauserRegistry() + _pauserRegistry: Env.impl.pauserRegistry(), + _version: Env.version() })) }); @@ -161,7 +164,8 @@ contract Deploy is EOADeployer { name: type(EigenStrategy).name, deployedTo: address(new EigenStrategy({ _strategyManager: Env.proxy.strategyManager(), - _pauserRegistry: Env.impl.pauserRegistry() + _pauserRegistry: Env.impl.pauserRegistry(), + _version: Env.version() })) }); @@ -169,7 +173,8 @@ contract Deploy is EOADeployer { name: type(StrategyFactory).name, deployedTo: address(new StrategyFactory({ _strategyManager: Env.proxy.strategyManager(), - _pauserRegistry: Env.impl.pauserRegistry() + _pauserRegistry: Env.impl.pauserRegistry(), + _version: Env.version() })) }); @@ -178,7 +183,8 @@ contract Deploy is EOADeployer { name: type(StrategyBase).name, deployedTo: address(new StrategyBase({ _strategyManager: Env.proxy.strategyManager(), - _pauserRegistry: Env.impl.pauserRegistry() + _pauserRegistry: Env.impl.pauserRegistry(), + _version: Env.version() })) }); diff --git a/script/releases/v1.0.2-slashing-consolidated/1-deployContracts.s.sol b/script/releases/v1.0.2-slashing-consolidated/1-deployContracts.s.sol index b42138d8b0..d33b75e800 100644 --- a/script/releases/v1.0.2-slashing-consolidated/1-deployContracts.s.sol +++ b/script/releases/v1.0.2-slashing-consolidated/1-deployContracts.s.sol @@ -35,7 +35,7 @@ contract Deploy is EOADeployer { deployImpl({ name: type(PermissionController).name, - deployedTo: address(new PermissionController()) + deployedTo: address(new PermissionController(Env.version())) }); deployProxy({ @@ -134,7 +134,8 @@ contract Deploy is EOADeployer { _ethPOS: Env.ethPOS(), _eigenPodBeacon: Env.beacon.eigenPod(), _delegationManager: Env.proxy.delegationManager(), - _pauserRegistry: Env.impl.pauserRegistry() + _pauserRegistry: Env.impl.pauserRegistry(), + _version: Env.version() })) }); @@ -143,7 +144,8 @@ contract Deploy is EOADeployer { deployedTo: address(new EigenPod({ _ethPOS: Env.ethPOS(), _eigenPodManager: Env.proxy.eigenPodManager(), - _GENESIS_TIME: Env.EIGENPOD_GENESIS_TIME() + _GENESIS_TIME: Env.EIGENPOD_GENESIS_TIME(), + _version: Env.version() })) }); @@ -153,7 +155,8 @@ contract Deploy is EOADeployer { name: type(StrategyBaseTVLLimits).name, deployedTo: address(new StrategyBaseTVLLimits({ _strategyManager: Env.proxy.strategyManager(), - _pauserRegistry: Env.impl.pauserRegistry() + _pauserRegistry: Env.impl.pauserRegistry(), + _version: Env.version() })) }); @@ -161,7 +164,8 @@ contract Deploy is EOADeployer { name: type(EigenStrategy).name, deployedTo: address(new EigenStrategy({ _strategyManager: Env.proxy.strategyManager(), - _pauserRegistry: Env.impl.pauserRegistry() + _pauserRegistry: Env.impl.pauserRegistry(), + _version: Env.version() })) }); @@ -169,7 +173,8 @@ contract Deploy is EOADeployer { name: type(StrategyFactory).name, deployedTo: address(new StrategyFactory({ _strategyManager: Env.proxy.strategyManager(), - _pauserRegistry: Env.impl.pauserRegistry() + _pauserRegistry: Env.impl.pauserRegistry(), + _version: Env.version() })) }); @@ -178,7 +183,8 @@ contract Deploy is EOADeployer { name: type(StrategyBase).name, deployedTo: address(new StrategyBase({ _strategyManager: Env.proxy.strategyManager(), - _pauserRegistry: Env.impl.pauserRegistry() + _pauserRegistry: Env.impl.pauserRegistry(), + _version: Env.version() })) }); diff --git a/script/utils/ExistingDeploymentParser.sol b/script/utils/ExistingDeploymentParser.sol index 616e1dcd0d..df61819fb7 100644 --- a/script/utils/ExistingDeploymentParser.sol +++ b/script/utils/ExistingDeploymentParser.sol @@ -214,7 +214,7 @@ contract ExistingDeploymentParser is Script, Logger { eigenLayerPauserReg = PauserRegistry(json.readAddress(".addresses.eigenLayerPauserReg")); // FIXME: hotfix - remove later... - permissionControllerImplementation = new PermissionController(); + permissionControllerImplementation = new PermissionController(SEMVER); permissionController = PermissionController( address(new TransparentUpgradeableProxy(address(permissionControllerImplementation), address(eigenLayerProxyAdmin), "")) ); diff --git a/src/contracts/permissions/PermissionController.sol b/src/contracts/permissions/PermissionController.sol index 46bdea5bde..ee367d79d8 100644 --- a/src/contracts/permissions/PermissionController.sol +++ b/src/contracts/permissions/PermissionController.sol @@ -2,9 +2,10 @@ pragma solidity ^0.8.27; import "@openzeppelin-upgrades/contracts/proxy/utils/Initializable.sol"; +import "../mixins/SemVerMixin.sol"; import "./PermissionControllerStorage.sol"; -contract PermissionController is Initializable, PermissionControllerStorage { +contract PermissionController is Initializable, SemVerMixin, PermissionControllerStorage { using EnumerableSet for *; modifier onlyAdmin( @@ -19,7 +20,9 @@ contract PermissionController is Initializable, PermissionControllerStorage { * INITIALIZING FUNCTIONS * */ - constructor() { + constructor( + string memory _version + ) SemVerMixin(_version) { _disableInitializers(); } diff --git a/src/contracts/pods/EigenPod.sol b/src/contracts/pods/EigenPod.sol index 1066b2fbfb..c92bf9191e 100644 --- a/src/contracts/pods/EigenPod.sol +++ b/src/contracts/pods/EigenPod.sol @@ -8,6 +8,8 @@ import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "../libraries/BeaconChainProofs.sol"; import "../libraries/BytesLib.sol"; +import "../mixins/SemVerMixin.sol"; + import "../interfaces/IETHPOSDeposit.sol"; import "../interfaces/IEigenPodManager.sol"; import "../interfaces/IPausable.sol"; @@ -23,7 +25,13 @@ import "./EigenPodStorage.sol"; * @dev Note that all beacon chain balances are stored as gwei within the beacon chain datastructures. We choose * to account balances in terms of gwei in the EigenPod contract and convert to wei when making calls to other contracts */ -contract EigenPod is Initializable, ReentrancyGuardUpgradeable, EigenPodPausingConstants, EigenPodStorage { +contract EigenPod is + Initializable, + ReentrancyGuardUpgradeable, + EigenPodPausingConstants, + EigenPodStorage, + SemVerMixin +{ using BytesLib for bytes; using SafeERC20 for IERC20; using BeaconChainProofs for *; @@ -94,7 +102,12 @@ contract EigenPod is Initializable, ReentrancyGuardUpgradeable, EigenPodPausingC * CONSTRUCTOR / INIT * */ - constructor(IETHPOSDeposit _ethPOS, IEigenPodManager _eigenPodManager, uint64 _GENESIS_TIME) { + constructor( + IETHPOSDeposit _ethPOS, + IEigenPodManager _eigenPodManager, + uint64 _GENESIS_TIME, + string memory _version + ) SemVerMixin(_version) { ethPOS = _ethPOS; eigenPodManager = _eigenPodManager; GENESIS_TIME = _GENESIS_TIME; diff --git a/src/contracts/pods/EigenPodManager.sol b/src/contracts/pods/EigenPodManager.sol index c1ffc9dea4..03e03e45ad 100644 --- a/src/contracts/pods/EigenPodManager.sol +++ b/src/contracts/pods/EigenPodManager.sol @@ -7,6 +7,7 @@ import "@openzeppelin-upgrades/contracts/access/OwnableUpgradeable.sol"; import "@openzeppelin-upgrades/contracts/security/ReentrancyGuardUpgradeable.sol"; import "../libraries/SlashingLib.sol"; +import "../mixins/SemVerMixin.sol"; import "../permissions/Pausable.sol"; import "./EigenPodPausingConstants.sol"; import "./EigenPodManagerStorage.sol"; @@ -27,7 +28,8 @@ contract EigenPodManager is Pausable, EigenPodPausingConstants, EigenPodManagerStorage, - ReentrancyGuardUpgradeable + ReentrancyGuardUpgradeable, + SemVerMixin { using SlashingLib for *; using Math for *; @@ -48,8 +50,13 @@ contract EigenPodManager is IETHPOSDeposit _ethPOS, IBeacon _eigenPodBeacon, IDelegationManager _delegationManager, - IPauserRegistry _pauserRegistry - ) EigenPodManagerStorage(_ethPOS, _eigenPodBeacon, _delegationManager) Pausable(_pauserRegistry) { + IPauserRegistry _pauserRegistry, + string memory _version + ) + EigenPodManagerStorage(_ethPOS, _eigenPodBeacon, _delegationManager) + Pausable(_pauserRegistry) + SemVerMixin(_version) + { _disableInitializers(); } diff --git a/src/contracts/strategies/EigenStrategy.sol b/src/contracts/strategies/EigenStrategy.sol index 6fdfc4fe77..0720568a2e 100644 --- a/src/contracts/strategies/EigenStrategy.sol +++ b/src/contracts/strategies/EigenStrategy.sol @@ -38,8 +38,9 @@ contract EigenStrategy is StrategyBase { /// @notice Since this contract is designed to be initializable, the constructor simply sets `strategyManager`, the only immutable variable. constructor( IStrategyManager _strategyManager, - IPauserRegistry _pauserRegistry - ) StrategyBase(_strategyManager, _pauserRegistry) {} + IPauserRegistry _pauserRegistry, + string memory _version + ) StrategyBase(_strategyManager, _pauserRegistry, _version) {} function initialize(IEigen _EIGEN, IERC20 _bEIGEN) public virtual initializer { EIGEN = _EIGEN; diff --git a/src/contracts/strategies/StrategyBase.sol b/src/contracts/strategies/StrategyBase.sol index 555fe6a6e3..b4a9164748 100644 --- a/src/contracts/strategies/StrategyBase.sol +++ b/src/contracts/strategies/StrategyBase.sol @@ -3,6 +3,7 @@ pragma solidity ^0.8.27; import "../interfaces/IStrategyManager.sol"; import "../permissions/Pausable.sol"; +import "../mixins/SemVerMixin.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; @@ -28,7 +29,7 @@ import "@openzeppelin-upgrades/contracts/proxy/utils/Initializable.sol"; * [this thread](https://github.com/OpenZeppelin/openzeppelin-contracts/issues/3706) on the OpenZeppelin repo. * We specifically use a share offset of `SHARES_OFFSET` and a balance offset of `BALANCE_OFFSET`. */ -contract StrategyBase is Initializable, Pausable, IStrategy { +contract StrategyBase is Initializable, Pausable, IStrategy, SemVerMixin { using SafeERC20 for IERC20; uint8 internal constant PAUSED_DEPOSITS = 0; @@ -69,7 +70,11 @@ contract StrategyBase is Initializable, Pausable, IStrategy { } /// @notice Since this contract is designed to be initializable, the constructor simply sets `strategyManager`, the only immutable variable. - constructor(IStrategyManager _strategyManager, IPauserRegistry _pauserRegistry) Pausable(_pauserRegistry) { + constructor( + IStrategyManager _strategyManager, + IPauserRegistry _pauserRegistry, + string memory _version + ) Pausable(_pauserRegistry) SemVerMixin(_version) { strategyManager = _strategyManager; _disableInitializers(); } diff --git a/src/contracts/strategies/StrategyBaseTVLLimits.sol b/src/contracts/strategies/StrategyBaseTVLLimits.sol index ac972822e8..65eca55877 100644 --- a/src/contracts/strategies/StrategyBaseTVLLimits.sol +++ b/src/contracts/strategies/StrategyBaseTVLLimits.sol @@ -26,8 +26,9 @@ contract StrategyBaseTVLLimits is StrategyBase { // solhint-disable-next-line no-empty-blocks constructor( IStrategyManager _strategyManager, - IPauserRegistry _pauserRegistry - ) StrategyBase(_strategyManager, _pauserRegistry) {} + IPauserRegistry _pauserRegistry, + string memory _version + ) StrategyBase(_strategyManager, _pauserRegistry, _version) {} function initialize( uint256 _maxPerDeposit, diff --git a/src/contracts/strategies/StrategyFactory.sol b/src/contracts/strategies/StrategyFactory.sol index 20ded2db2e..385bdcd839 100644 --- a/src/contracts/strategies/StrategyFactory.sol +++ b/src/contracts/strategies/StrategyFactory.sol @@ -3,6 +3,7 @@ pragma solidity ^0.8.27; import "@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol"; import "@openzeppelin-upgrades/contracts/access/OwnableUpgradeable.sol"; +import "../mixins/SemVerMixin.sol"; import "./StrategyFactoryStorage.sol"; import "./StrategyBase.sol"; import "../permissions/Pausable.sol"; @@ -14,14 +15,18 @@ import "../permissions/Pausable.sol"; * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service * @dev This may not be compatible with non-standard ERC20 tokens. Caution is warranted. */ -contract StrategyFactory is StrategyFactoryStorage, OwnableUpgradeable, Pausable { +contract StrategyFactory is StrategyFactoryStorage, OwnableUpgradeable, Pausable, SemVerMixin { uint8 internal constant PAUSED_NEW_STRATEGIES = 0; /// @notice EigenLayer's StrategyManager contract IStrategyManager public immutable strategyManager; /// @notice Since this contract is designed to be initializable, the constructor simply sets the immutable variables. - constructor(IStrategyManager _strategyManager, IPauserRegistry _pauserRegistry) Pausable(_pauserRegistry) { + constructor( + IStrategyManager _strategyManager, + IPauserRegistry _pauserRegistry, + string memory _version + ) Pausable(_pauserRegistry) SemVerMixin(_version) { strategyManager = _strategyManager; _disableInitializers(); } diff --git a/src/test/harnesses/EigenPodHarness.sol b/src/test/harnesses/EigenPodHarness.sol index 0be5e4a541..29217270bc 100644 --- a/src/test/harnesses/EigenPodHarness.sol +++ b/src/test/harnesses/EigenPodHarness.sol @@ -9,11 +9,13 @@ contract EigenPodHarness is EigenPod { constructor( IETHPOSDeposit _ethPOS, IEigenPodManager _eigenPodManager, - uint64 _GENESIS_TIME + uint64 _GENESIS_TIME, + string memory _version ) EigenPod( _ethPOS, _eigenPodManager, - _GENESIS_TIME + _GENESIS_TIME, + _version ) {} function getActiveValidatorCount() public view returns (uint256) { diff --git a/src/test/harnesses/EigenPodManagerWrapper.sol b/src/test/harnesses/EigenPodManagerWrapper.sol index ffb190a551..5491984548 100644 --- a/src/test/harnesses/EigenPodManagerWrapper.sol +++ b/src/test/harnesses/EigenPodManagerWrapper.sol @@ -9,8 +9,9 @@ contract EigenPodManagerWrapper is EigenPodManager { IETHPOSDeposit _ethPOS, IBeacon _eigenPodBeacon, IDelegationManager _delegationManager, - IPauserRegistry _pauserRegistry - ) EigenPodManager(_ethPOS, _eigenPodBeacon, _delegationManager, _pauserRegistry) {} + IPauserRegistry _pauserRegistry, + string memory _version + ) EigenPodManager(_ethPOS, _eigenPodBeacon, _delegationManager, _pauserRegistry, _version) {} function setPodOwnerShares(address owner, IEigenPod pod) external { ownerToPod[owner] = pod; diff --git a/src/test/integration/IntegrationDeployer.t.sol b/src/test/integration/IntegrationDeployer.t.sol index 436cc3c8aa..84abac5578 100644 --- a/src/test/integration/IntegrationDeployer.t.sol +++ b/src/test/integration/IntegrationDeployer.t.sol @@ -322,7 +322,7 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { ALLOCATION_CONFIGURATION_DELAY, version ); - permissionControllerImplementation = new PermissionController(); + permissionControllerImplementation = new PermissionController(version); delegationManagerImplementation = new DelegationManager( strategyManager, eigenPodManager, @@ -353,13 +353,14 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { DEPOSIT_CONTRACT, eigenPodBeacon, delegationManager, - eigenLayerPauserReg + eigenLayerPauserReg, + "v9.9.9" ); - strategyFactoryImplementation = new StrategyFactory(strategyManager, eigenLayerPauserReg); + strategyFactoryImplementation = new StrategyFactory(strategyManager, eigenLayerPauserReg, "v9.9.9"); // Beacon implementations - eigenPodImplementation = new EigenPod(DEPOSIT_CONTRACT, eigenPodManager, BEACON_GENESIS_TIME); - baseStrategyImplementation = new StrategyBase(strategyManager, eigenLayerPauserReg); + eigenPodImplementation = new EigenPod(DEPOSIT_CONTRACT, eigenPodManager, BEACON_GENESIS_TIME, "v9.9.9"); + baseStrategyImplementation = new StrategyBase(strategyManager, eigenLayerPauserReg, "v9.9.9"); // Pre-longtail StrategyBaseTVLLimits implementation // TODO - need to update ExistingDeploymentParser diff --git a/src/test/unit/AllocationManagerUnit.t.sol b/src/test/unit/AllocationManagerUnit.t.sol index 1bbc4389fe..f03b87675b 100644 --- a/src/test/unit/AllocationManagerUnit.t.sol +++ b/src/test/unit/AllocationManagerUnit.t.sol @@ -62,7 +62,7 @@ contract AllocationManagerUnitTests is EigenLayerUnitTestSetup, IAllocationManag strategyMock = StrategyBase( address( new TransparentUpgradeableProxy( - address(new StrategyBase(IStrategyManager(address(strategyManagerMock)), pauserRegistry)), + address(new StrategyBase(IStrategyManager(address(strategyManagerMock)), pauserRegistry, "v9.9.9")), address(eigenLayerProxyAdmin), abi.encodeWithSelector(StrategyBase.initialize.selector, tokenMock) ) diff --git a/src/test/unit/DelegationUnit.t.sol b/src/test/unit/DelegationUnit.t.sol index 59e0e05a35..f06deb9bec 100644 --- a/src/test/unit/DelegationUnit.t.sol +++ b/src/test/unit/DelegationUnit.t.sol @@ -110,7 +110,7 @@ contract DelegationManagerUnitTests is EigenLayerUnitTestSetup, IDelegationManag // Deploy mock token and strategy tokenMock = new ERC20PresetFixedSupply("Mock Token", "MOCK", tokenMockInitialSupply, address(this)); - strategyImplementation = new StrategyBase(IStrategyManager(address(strategyManagerMock)), pauserRegistry); + strategyImplementation = new StrategyBase(IStrategyManager(address(strategyManagerMock)), pauserRegistry, "v9.9.9"); strategyMock = StrategyBase( address( new TransparentUpgradeableProxy( diff --git a/src/test/unit/EigenPodManagerUnit.t.sol b/src/test/unit/EigenPodManagerUnit.t.sol index 9f5848f8b3..85e40469bf 100644 --- a/src/test/unit/EigenPodManagerUnit.t.sol +++ b/src/test/unit/EigenPodManagerUnit.t.sol @@ -44,7 +44,8 @@ contract EigenPodManagerUnitTests is EigenLayerUnitTestSetup, IEigenPodManagerEv ethPOSMock, eigenPodBeacon, IDelegationManager(address(delegationManagerMock)), - pauserRegistry + pauserRegistry, + "v9.9.9" ); eigenPodManager = EigenPodManager( address( @@ -304,7 +305,8 @@ contract EigenPodManagerUnitTests_WithdrawSharesAsTokensTests is EigenPodManager ethPOSMock, eigenPodBeacon, IDelegationManager(address(delegationManagerMock)), - pauserRegistry + pauserRegistry, + "v9.9.9" ); eigenLayerProxyAdmin.upgrade(ITransparentUpgradeableProxy(payable(address(eigenPodManager))), address(eigenPodManagerWrapper)); } @@ -426,7 +428,8 @@ contract EigenPodManagerUnitTests_BeaconChainETHBalanceUpdateTests is EigenPodMa ethPOSMock, eigenPodBeacon, IDelegationManager(address(delegationManagerMock)), - pauserRegistry + pauserRegistry, + "v9.9.9" ); eigenLayerProxyAdmin.upgrade(ITransparentUpgradeableProxy(payable(address(eigenPodManager))), address(eigenPodManagerWrapper)); } diff --git a/src/test/unit/EigenPodUnit.t.sol b/src/test/unit/EigenPodUnit.t.sol index 002ff9419f..eb098cfa94 100644 --- a/src/test/unit/EigenPodUnit.t.sol +++ b/src/test/unit/EigenPodUnit.t.sol @@ -59,7 +59,8 @@ contract EigenPodUnitTests is EigenLayerUnitTestSetup, EigenPodPausingConstants, podImplementation = new EigenPod( ethPOSDepositMock, IEigenPodManager(address(eigenPodManagerMock)), - GENESIS_TIME_LOCAL + GENESIS_TIME_LOCAL, + "v9.9.9" ); // Deploy Beacon @@ -324,7 +325,7 @@ contract EigenPodUnitTests is EigenLayerUnitTestSetup, EigenPodPausingConstants, contract EigenPodUnitTests_Initialization is EigenPodUnitTests { function test_constructor() public { - EigenPod pod = new EigenPod(ethPOSDepositMock, IEigenPodManager(address(eigenPodManagerMock)), GENESIS_TIME_LOCAL); + EigenPod pod = new EigenPod(ethPOSDepositMock, IEigenPodManager(address(eigenPodManagerMock)), GENESIS_TIME_LOCAL, "v9.9.9"); assertTrue(pod.ethPOS() == ethPOSDepositMock, "should have set ethPOS correctly"); assertTrue(address(pod.eigenPodManager()) == address(eigenPodManagerMock), "should have set eigenpodmanager correctly"); @@ -352,7 +353,7 @@ contract EigenPodUnitTests_Initialization is EigenPodUnitTests { } function test_initialize_revert_emptyPodOwner() public { - EigenPod pod = new EigenPod(ethPOSDepositMock, IEigenPodManager(address(eigenPodManagerMock)), GENESIS_TIME_LOCAL); + EigenPod pod = new EigenPod(ethPOSDepositMock, IEigenPodManager(address(eigenPodManagerMock)), GENESIS_TIME_LOCAL, "v9.9.9"); // un-initialize pod cheats.store(address(pod), 0, 0); @@ -1726,7 +1727,8 @@ contract EigenPodHarnessSetup is EigenPodUnitTests { eigenPodHarnessImplementation = new EigenPodHarness( ethPOSDepositMock, IEigenPodManager(address(eigenPodManagerMock)), - GENESIS_TIME_LOCAL + GENESIS_TIME_LOCAL, + "v9.9.9" ); // Upgrade eigenPod to harness diff --git a/src/test/unit/RewardsCoordinatorUnit.t.sol b/src/test/unit/RewardsCoordinatorUnit.t.sol index d29b64471f..0a86e9e8b4 100644 --- a/src/test/unit/RewardsCoordinatorUnit.t.sol +++ b/src/test/unit/RewardsCoordinatorUnit.t.sol @@ -139,7 +139,7 @@ contract RewardsCoordinatorUnitTests is EigenLayerUnitTestSetup, IRewardsCoordin token2 = new ERC20PresetFixedSupply("jeo boden", "MOCK2", mockTokenInitialSupply, address(this)); token3 = new ERC20PresetFixedSupply("pepe wif avs", "MOCK3", mockTokenInitialSupply, address(this)); - strategyImplementation = new StrategyBase(IStrategyManager(address(strategyManagerMock)), pauserRegistry); + strategyImplementation = new StrategyBase(IStrategyManager(address(strategyManagerMock)), pauserRegistry, "v9.9.9"); strategyMock1 = StrategyBase( address( new TransparentUpgradeableProxy( diff --git a/src/test/unit/StrategyBaseTVLLimitsUnit.sol b/src/test/unit/StrategyBaseTVLLimitsUnit.sol index 797621b681..531be01dae 100644 --- a/src/test/unit/StrategyBaseTVLLimitsUnit.sol +++ b/src/test/unit/StrategyBaseTVLLimitsUnit.sol @@ -24,7 +24,7 @@ contract StrategyBaseTVLLimitsUnitTests is StrategyBaseUnitTests { StrategyBaseUnitTests.setUp(); // depoloy the TVL-limited strategy - strategyBaseTVLLimitsImplementation = new StrategyBaseTVLLimits(strategyManager, pauserRegistry); + strategyBaseTVLLimitsImplementation = new StrategyBaseTVLLimits(strategyManager, pauserRegistry, "v9.9.9"); strategyWithTVLLimits = StrategyBaseTVLLimits( address( new TransparentUpgradeableProxy( diff --git a/src/test/unit/StrategyBaseUnit.t.sol b/src/test/unit/StrategyBaseUnit.t.sol index 13a80673b3..60caa46201 100644 --- a/src/test/unit/StrategyBaseUnit.t.sol +++ b/src/test/unit/StrategyBaseUnit.t.sol @@ -55,7 +55,7 @@ contract StrategyBaseUnitTests is Test { underlyingToken = new ERC20PresetFixedSupply("Test Token", "TEST", initialSupply, initialOwner); - strategyImplementation = new StrategyBase(strategyManager, pauserRegistry); + strategyImplementation = new StrategyBase(strategyManager, pauserRegistry, "v9.9.9"); strategy = StrategyBase( address( @@ -161,7 +161,7 @@ contract StrategyBaseUnitTests is Test { // Deploy token with 1e39 total supply underlyingToken = new ERC20PresetFixedSupply("Test Token", "TEST", 1e39, initialOwner); - strategyImplementation = new StrategyBase(strategyManager, pauserRegistry); + strategyImplementation = new StrategyBase(strategyManager, pauserRegistry, "v9.9.9"); strategy = StrategyBase( address( diff --git a/src/test/unit/StrategyFactoryUnit.t.sol b/src/test/unit/StrategyFactoryUnit.t.sol index 5775851163..6843c39d20 100644 --- a/src/test/unit/StrategyFactoryUnit.t.sol +++ b/src/test/unit/StrategyFactoryUnit.t.sol @@ -46,12 +46,12 @@ contract StrategyFactoryUnitTests is EigenLayerUnitTestSetup { underlyingToken = new ERC20PresetFixedSupply("Test Token", "TEST", initialSupply, initialOwner); - strategyImplementation = new StrategyBase(IStrategyManager(address(strategyManagerMock)), pauserRegistry); + strategyImplementation = new StrategyBase(IStrategyManager(address(strategyManagerMock)), pauserRegistry, "v9.9.9"); strategyBeacon = new UpgradeableBeacon(address(strategyImplementation)); strategyBeacon.transferOwnership(beaconProxyOwner); - strategyFactoryImplementation = new StrategyFactory(IStrategyManager(address(strategyManagerMock)), pauserRegistry); + strategyFactoryImplementation = new StrategyFactory(IStrategyManager(address(strategyManagerMock)), pauserRegistry, "v9.9.9"); strategyFactory = StrategyFactory( address( diff --git a/src/test/unit/StrategyManagerUnit.t.sol b/src/test/unit/StrategyManagerUnit.t.sol index 7c8dc0d10f..9e58282aaa 100644 --- a/src/test/unit/StrategyManagerUnit.t.sol +++ b/src/test/unit/StrategyManagerUnit.t.sol @@ -88,7 +88,7 @@ contract StrategyManagerUnitTests is EigenLayerUnitTestSetup, IStrategyManagerEv IPauserRegistry _pauserRegistry, address admin ) public returns (StrategyBase) { - StrategyBase newStrategyImplementation = new StrategyBase(_strategyManager, _pauserRegistry); + StrategyBase newStrategyImplementation = new StrategyBase(_strategyManager, _pauserRegistry, "v9.9.9"); StrategyBase newStrategy = StrategyBase(address(new TransparentUpgradeableProxy(address(newStrategyImplementation), address(admin), ""))); newStrategy.initialize(_token); return newStrategy; diff --git a/src/test/utils/EigenLayerUnitTestSetup.sol b/src/test/utils/EigenLayerUnitTestSetup.sol index a8ac0e187f..80d48dc3d4 100644 --- a/src/test/utils/EigenLayerUnitTestSetup.sol +++ b/src/test/utils/EigenLayerUnitTestSetup.sol @@ -71,7 +71,7 @@ abstract contract EigenLayerUnitTestSetup is Test { eigenLayerProxyAdmin = new ProxyAdmin(); // Deploy permission controller - permissionControllerImplementation = new PermissionController(); + permissionControllerImplementation = new PermissionController("v9.9.9"); permissionController = PermissionController(address(new TransparentUpgradeableProxy( address(permissionControllerImplementation), address(eigenLayerProxyAdmin),