Skip to content

Commit

Permalink
remove unnecessary interface additions
Browse files Browse the repository at this point in the history
  • Loading branch information
ypatil12 committed Oct 16, 2023
1 parent 1b2a27b commit e3c4728
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 30 deletions.
8 changes: 4 additions & 4 deletions script/milestone/M2Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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 {
Expand Down
18 changes: 3 additions & 15 deletions src/contracts/interfaces/IDelegationManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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;
}
4 changes: 0 additions & 4 deletions src/contracts/interfaces/IEigenPodManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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);

Expand Down
6 changes: 0 additions & 6 deletions src/test/mocks/DelegationManagerMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion src/test/mocks/EigenPodManagerMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}

Expand Down

0 comments on commit e3c4728

Please sign in to comment.