Skip to content

Commit

Permalink
compiles
Browse files Browse the repository at this point in the history
  • Loading branch information
gpsanant committed Sep 25, 2024
1 parent ba1f6c8 commit 64681f8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
3 changes: 1 addition & 2 deletions src/contracts/core/DelegationManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,6 @@ contract DelegationManager is
*/

/**
*
* @notice helper to calculate the new depositScalingFactor after adding shares. This is only used
* when a staker is depositing through the StrategyManager or EigenPodManager. A staker's depositScalingFactor
* is only updated when they have new deposits and their shares are being increased.
Expand All @@ -756,7 +755,7 @@ contract DelegationManager is
uint64 totalMagnitude,
Shares existingShares,
OwnedShares addedOwnedShares
) internal returns (uint256 newDepositScalingFactor) {
) internal {
uint256 newDepositScalingFactor;
if (existingShares.unwrap() == 0) {
newDepositScalingFactor = WAD / totalMagnitude;
Expand Down
14 changes: 7 additions & 7 deletions src/contracts/interfaces/IDelegationManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -341,18 +341,18 @@ interface IDelegationManager is ISignatureUtils {

/**
* @notice Decreases a native restaker's delegated share balance in a strategy due to beacon chain slashing. This updates their beaconChainScalingFactor.
* Their operator's scaled shares are also updated (if they are delegated).
* @param staker The address to increase the delegated scaled shares for their operator.
* @param shares The number of shares of beaconChainETHStrategy the staker has, not including scaling factors or
* @param proportionPodBalanceDecrease The proportion of the staker's shares to decrease. This is a fraction of the staker's shares in the strategy.
* Their operator's stakeShares are also updated (if they are delegated).
* @param staker The address to increase the delegated stakeShares for their operator.
* @param existingShares The number of shares the staker already has in the EPM. This does not change upon decreasing shares.
* @param proportionOfOldBalance The current pod owner shares proportion of the previous pod owner shares
*
* @dev *If the staker is actively delegated*, then decreases the `staker`'s delegated scaled shares in `strategy` by `scaledShares`. Otherwise does nothing.
* @dev *If the staker is actively delegated*, then decreases the `staker`'s delegated stakeShares in `strategy` by `proportionPodBalanceDecrease` proportion. Otherwise does nothing.
* @dev Callable only by the EigenPodManager.
*/
function decreaseBeaconChainScalingFactor(
address staker,
Shares shares,
uint64 proportionPodBalanceDecrease
Shares existingShares,
uint64 proportionOfOldBalance
) external;

/**
Expand Down
8 changes: 6 additions & 2 deletions src/contracts/interfaces/IEigenPod.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
* to account balances in terms of gwei in the EigenPod contract and convert to wei when making calls to other contracts
*/
interface IEigenPod {
/// @dev Thrown when msg.sender is not allowed to call a function
error UnauthorizedCaller();
/// @dev Thrown when msg.sender is not the EPM.
error OnlyEigenPodManager();
/// @dev Thrown when msg.sender is not the pod owner.
error OnlyEigenPodOwner();
/// @dev Thrown when msg.sender is not owner or the proof submitter.
error OnlyEigenPodOwnerOrProofSubmitter();
/// @dev Thrown when attempting an action that is currently paused.
error CurrentlyPaused();

Expand Down

0 comments on commit 64681f8

Please sign in to comment.