Skip to content

Commit

Permalink
chore: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
8sunyuan committed Sep 13, 2024
1 parent a70ed62 commit 70dcd43
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions src/contracts/core/DelegationManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,16 @@ contract DelegationManager is
IAVSDirectory _avsDirectory,
IAllocationManager _allocationManager,
uint32 _MIN_WITHDRAWAL_DELAY
) DelegationManagerStorage(_strategyManager, _slasher, _eigenPodManager, _avsDirectory, _allocationManager, _MIN_WITHDRAWAL_DELAY) {
)
DelegationManagerStorage(
_strategyManager,
_slasher,
_eigenPodManager,
_avsDirectory,
_allocationManager,
_MIN_WITHDRAWAL_DELAY
)
{
_disableInitializers();
ORIGINAL_CHAIN_ID = block.chainid;
}
Expand Down Expand Up @@ -632,7 +641,8 @@ contract DelegationManager is
// Take already scaled staker shares and scale again according to current operator totalMagnitude
// This is because the totalMagnitude may have changed since withdrawal was queued and the staker shares
// are still susceptible to slashing
sharesToWithdraw = SlashingLib.calculateSharesToCompleteWithdraw(withdrawal.scaledShares[i], totalMagnitudes[i]);
sharesToWithdraw =
SlashingLib.calculateSharesToCompleteWithdraw(withdrawal.scaledShares[i], totalMagnitudes[i]);
}

// Withdraws `shares` in `strategy` to `withdrawer`. If the shares are virtual beaconChainETH shares,
Expand Down Expand Up @@ -814,12 +824,13 @@ contract DelegationManager is
}
uint256 stakerScalingFactor = _getStakerScalingFactor(staker, strategies[i]);
require(
sharesToWithdraw[i] <= SlashingLib.getWithdrawableShares({
staker: staker,
stakerScalingFactor: stakerScalingFactor,
shares: totalShares,
currTotalMagnitude: totalMagnitudes[i]
}),
sharesToWithdraw[i]
<= SlashingLib.getWithdrawableShares({
staker: staker,
stakerScalingFactor: stakerScalingFactor,
shares: totalShares,
currTotalMagnitude: totalMagnitudes[i]
}),
WithdrawalExeedsMax()
);

Expand Down

0 comments on commit 70dcd43

Please sign in to comment.