diff --git a/script/milestone/M2Deploy.s.sol b/script/milestone/M2Deploy.s.sol index 6f342d85f..cbed0c6c0 100644 --- a/script/milestone/M2Deploy.s.sol +++ b/script/milestone/M2Deploy.s.sol @@ -295,13 +295,13 @@ contract M2Deploy is Script, Test { "strategyManager.withdrawalDelayBlocks incorrect" ); // DelegationManager: Check view functions return pre-upgraded values - require(delegation.strategyManager() == strategyManager, "delegation.strategyManager incorrect"); + require(DelegationManagerStorage(address(delegation)).strategyManager() == strategyManager, "delegation.strategyManager incorrect"); require( delegation.domainSeparator() == delegationManagerDomainSeparator, "delegation.domainSeparator incorrect" ); - require(delegation.slasher() == slasher, "delegation.slasher incorrect"); - require(delegation.eigenPodManager() == eigenPodManager, "delegation.eigenPodManager incorrect"); + require(DelegationManagerStorage(address(delegation)).slasher() == slasher, "delegation.slasher incorrect"); + require(DelegationManagerStorage(address(delegation)).eigenPodManager() == eigenPodManager, "delegation.eigenPodManager incorrect"); // EigenPodManager: check view functions return pre-upgraded values require(eigenPodManager.ethPOS() == ethPOS, "eigenPodManager.ethPOS incorrect"); require(eigenPodManager.eigenPodBeacon() == eigenPodBeacon, "eigenPodManager.eigenPodBeacon incorrect"); @@ -313,7 +313,7 @@ contract M2Deploy is Script, Test { ); require(eigenPodManager.numPods() == numPods, "eigenPodManager.numPods incorrect"); require(eigenPodManager.maxPods() == maxPods, "eigenPodManager.maxPods incorrect"); - require(eigenPodManager.delegationManager() == delegation, "eigenPodManager.delegationManager incorrect"); + require(EigenPodManagerStorage(address(eigenPodManager)).delegationManager() == delegation, "eigenPodManager.delegationManager incorrect"); } function _verifyContractsInitialized() internal { diff --git a/src/contracts/interfaces/IDelegationManager.sol b/src/contracts/interfaces/IDelegationManager.sol index 408dfc381..ebae2c0ec 100644 --- a/src/contracts/interfaces/IDelegationManager.sol +++ b/src/contracts/interfaces/IDelegationManager.sol @@ -2,11 +2,9 @@ pragma solidity >=0.5.0; import "./IStrategy.sol"; -import "./IEigenPodManager.sol"; -import "./IStrategyManager.sol"; -import "./ISlasher.sol"; import "./ISignatureUtils.sol"; import "./IStakeRegistry.sol"; +import "./IStrategyManager.sol"; /** * @title DelegationManager @@ -305,15 +303,6 @@ interface IDelegationManager is ISignatureUtils { uint256 shares ) external; - /// @notice Address of slasher - function slasher() external view returns (ISlasher); - - /// @notice Address of the EigenPodManager - function eigenPodManager() external view returns (IEigenPodManager); - - /// @notice Address of the StrategyManager - function strategyManager() external view returns (IStrategyManager); - /// @notice the address of the StakeRegistry contract to call for stake updates when operator shares are changed function stakeRegistry() external view returns (IStakeRegistry); @@ -433,13 +422,12 @@ interface IDelegationManager is ISignatureUtils { */ function domainSeparator() external view returns (bytes32); - /// @notice Function that migrates queued withdrawal from strategyManger to delegationManager - function migrateQueuedWithdrawals(IStrategyManager.DeprecatedStruct_QueuedWithdrawal[] memory withdrawalsToQueue) external; - /// @notice Mapping: staker => cumulative number of queued withdrawals they have ever initiated. /// @dev This only increments (doesn't decrement), and is used to help ensure that otherwise identical withdrawals have unique hashes. function cumulativeWithdrawalsQueued(address staker) external view returns (uint256); /// @notice Returns the keccak256 hash of `withdrawal`. function calculateWithdrawalRoot(Withdrawal memory withdrawal) external pure returns (bytes32); + + function migrateQueuedWithdrawals(IStrategyManager.DeprecatedStruct_QueuedWithdrawal[] memory withdrawalsToQueue) external; } diff --git a/src/contracts/interfaces/IEigenPodManager.sol b/src/contracts/interfaces/IEigenPodManager.sol index da2d71c58..ad6e71ddb 100644 --- a/src/contracts/interfaces/IEigenPodManager.sol +++ b/src/contracts/interfaces/IEigenPodManager.sol @@ -4,7 +4,6 @@ pragma solidity >=0.5.0; import "@openzeppelin/contracts/proxy/beacon/IBeacon.sol"; import "./IETHPOSDeposit.sol"; import "./IStrategyManager.sol"; -import "./IDelegationManager.sol"; import "./IEigenPod.sol"; import "./IBeaconChainOracle.sol"; import "./IPausable.sol"; @@ -96,9 +95,6 @@ interface IEigenPodManager is IPausable { /// @notice EigenLayer's Slasher contract function slasher() external view returns (ISlasher); - /// @notice EigenLayer's DelegationManager contract - function delegationManager() external view returns (IDelegationManager); - /// @notice Returns 'true' if the `podOwner` has created an EigenPod, and 'false' otherwise. function hasPod(address podOwner) external view returns (bool); diff --git a/src/test/mocks/DelegationManagerMock.sol b/src/test/mocks/DelegationManagerMock.sol index 6ab02b1dc..ac7c9b250 100644 --- a/src/test/mocks/DelegationManagerMock.sol +++ b/src/test/mocks/DelegationManagerMock.sol @@ -116,12 +116,6 @@ contract DelegationManagerMock is IDelegationManager, Test { function calculateWithdrawalRoot(Withdrawal memory withdrawal) external pure returns (bytes32) {} - function slasher() external view returns (ISlasher) {} - - function eigenPodManager() external view returns (IEigenPodManager) {} - - function strategyManager() external view returns (IStrategyManager) {} - function queueWithdrawal( IStrategy[] calldata strategies, uint256[] calldata shares, diff --git a/src/test/mocks/EigenPodManagerMock.sol b/src/test/mocks/EigenPodManagerMock.sol index bf08bf33f..c987a08c8 100644 --- a/src/test/mocks/EigenPodManagerMock.sol +++ b/src/test/mocks/EigenPodManagerMock.sol @@ -8,7 +8,6 @@ contract EigenPodManagerMock is IEigenPodManager, Test { IStrategy public constant beaconChainETHStrategy = IStrategy(0xbeaC0eeEeeeeEEeEeEEEEeeEEeEeeeEeeEEBEaC0); IBeacon public eigenPodBeacon; IETHPOSDeposit public ethPOS; - IDelegationManager public delegationManager; function slasher() external view returns(ISlasher) {}