@@ -7491,8 +7491,8 @@ contract DelegationManagerUnitTests_slashingShares is DelegationManagerUnitTests
7491
7491
delegationManager.queueWithdrawals (queuedWithdrawalParams);
7492
7492
assertEq (
7493
7493
delegationManager.getSlashableSharesInQueue (operator, beaconChainETHStrategy),
7494
- 0 ,
7495
- "there should be 0 withdrawAmount slashable shares in queue since this is beaconChainETHStrategy "
7494
+ withdrawAmount ,
7495
+ "there should be withdrawAmount slashable shares in queue "
7496
7496
);
7497
7497
}
7498
7498
@@ -7504,6 +7504,7 @@ contract DelegationManagerUnitTests_slashingShares is DelegationManagerUnitTests
7504
7504
// Therefore amount of shares to burn should be what the staker still has remaining + staker1 shares and then
7505
7505
// divided by 2 since the operator was slashed 50%
7506
7506
uint256 sharesToDecrease = (shares + depositAmount - withdrawAmount) * 3 / 4 ;
7507
+ uint256 sharesToBurn = sharesToDecrease + (delegationManager.getSlashableSharesInQueue (operator, beaconChainETHStrategy) * 3 / 4 );
7507
7508
7508
7509
// 4. Burn shares
7509
7510
_setOperatorMagnitude (operator, beaconChainETHStrategy, newMagnitude);
@@ -7512,7 +7513,7 @@ contract DelegationManagerUnitTests_slashingShares is DelegationManagerUnitTests
7512
7513
7513
7514
// Assert OperatorSharesSlashed event was emitted with correct params
7514
7515
cheats.expectEmit (true , true , true , true , address (delegationManager));
7515
- emit OperatorSharesSlashed (operator, beaconChainETHStrategy, sharesToDecrease );
7516
+ emit OperatorSharesSlashed (operator, beaconChainETHStrategy, sharesToBurn );
7516
7517
7517
7518
cheats.prank (address (allocationManagerMock));
7518
7519
delegationManager.slashOperatorShares ({
@@ -7525,8 +7526,8 @@ contract DelegationManagerUnitTests_slashingShares is DelegationManagerUnitTests
7525
7526
// 5. Assert expected values
7526
7527
uint256 queuedSlashableSharesAfter = delegationManager.getSlashableSharesInQueue (operator, beaconChainETHStrategy);
7527
7528
uint256 operatorSharesAfter = delegationManager.operatorShares (operator, beaconChainETHStrategy);
7528
- assertEq (queuedSlashableSharesBefore, 0 , "Slashable shares in queue should be 0 for beaconChainStrategy " );
7529
- assertEq (queuedSlashableSharesAfter, 0 , "Slashable shares in queue should be 0 for beaconChainStrategy " );
7529
+ assertEq (queuedSlashableSharesBefore, withdrawAmount , "Slashable shares in queue should be full withdraw amount " );
7530
+ assertEq (queuedSlashableSharesAfter, withdrawAmount / 4 , "Slashable shares in queue should be 1/4 withdraw amount after slashing " );
7530
7531
assertEq (operatorSharesAfter, operatorSharesBefore - sharesToDecrease, "operator shares should be decreased by sharesToDecrease " );
7531
7532
}
7532
7533
0 commit comments