Skip to content

Commit b57fe21

Browse files
committed
fix: rebase
1 parent 2e8a386 commit b57fe21

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

src/test/integration/IntegrationChecks.t.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,7 @@ contract IntegrationChecks is IntegrationBase {
601601
assert_Snap_Expected_Staker_WithdrawableShares_Deposit(
602602
staker, newOperator, strategies, withdrawableShares, "staker should have received expected withdrawable shares"
603603
);
604+
}
604605

605606
function check_Withdrawal_AsShares_Redelegated_State(User staker, IStrategy[] memory strategies) internal {
606607
assert_Snap_DSF_State_WithdrawalAsShares(staker, strategies, "staker's DSF not updated correctly");

src/test/integration/IntegrationGetters.t.sol

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,24 @@ contract IntegrationGetters is IntegrationDeployer, TypeImporter {
404404
return _getCheckpointBalanceExited(staker, checkpointTimestamp);
405405
}
406406

407+
function _getSlashingFactors(User staker, IStrategy[] memory strategies) internal view returns (uint[] memory) {
408+
address operator = delegationManager.delegatedTo(address(staker));
409+
uint64[] memory maxMagnitudes = allocationManager.getMaxMagnitudes(operator, strategies);
410+
uint[] memory slashingFactors = new uint[](strategies.length);
411+
for (uint i = 0; i < strategies.length; i++) {
412+
if (strategies[i] == beaconChainETHStrategy) {
413+
slashingFactors[i] = maxMagnitudes[i].mulWad(eigenPodManager.beaconChainSlashingFactor(address(staker)));
414+
} else {
415+
slashingFactors[i] = maxMagnitudes[i];
416+
}
417+
}
418+
return slashingFactors;
419+
}
420+
421+
function _getPrevSlashingFactors(User staker, IStrategy[] memory strategies) internal timewarp returns (uint[] memory) {
422+
return _getSlashingFactors(staker, strategies);
423+
}
424+
407425
/// -----------------------------------------------------------------------
408426
/// Non-timewarp functions
409427
/// -----------------------------------------------------------------------

0 commit comments

Comments
 (0)