Skip to content

Commit 727351c

Browse files
committed
added back comments
1 parent 45a4e8c commit 727351c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/contracts/core/DelegationManager.sol

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,15 +252,19 @@ contract DelegationManager is Initializable, OwnableUpgradeable, Pausable, Deleg
252252
);
253253

254254
// Gather strategies and shares to remove from staker/operator during undelegation
255+
// Undelegation removes ALL currently-active strategies and shares
255256
(IStrategy[] memory strategies, uint256[] memory shares) = getDelegatableShares(staker);
256257

258+
// emit an event if this action was not initiated by the staker themselves
257259
if (msg.sender != staker) {
258260
emit StakerForceUndelegated(staker, operator);
259261
}
260262

263+
// undelegate the staker
261264
emit StakerUndelegated(staker, operator);
262265
delegatedTo[staker] = address(0);
263266

267+
// if no delegatable shares, return zero root, and don't queue a withdrawal
264268
if (strategies.length == 0) {
265269
withdrawalRoots = new bytes32[](0);
266270
} else {

0 commit comments

Comments
 (0)