Skip to content

Commit

Permalink
Slashing: Add additional happy path AM test cases (#828)
Browse files Browse the repository at this point in the history
* test: happy path AM tests

* chore: format
  • Loading branch information
ypatil12 authored Oct 16, 2024
1 parent 08cf29d commit 3f6adfb
Show file tree
Hide file tree
Showing 3 changed files with 563 additions and 37 deletions.
1 change: 0 additions & 1 deletion src/contracts/interfaces/IStrategyManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ interface IStrategyManager is IStrategyManagerErrors, IStrategyManagerEvents, IS
IStrategy[] calldata strategiesToRemoveFromWhitelist
) external;


/// @notice Returns bool for whether or not `strategy` is whitelisted for deposit
function strategyIsWhitelistedForDeposit(
IStrategy strategy
Expand Down
11 changes: 11 additions & 0 deletions src/test/mocks/DelegationManagerMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@ contract DelegationManagerMock is Test {
return withdrawalRoot;
}

function getOperatorsShares(address[] memory operators, IStrategy[] memory strategies) external view returns (uint256[][] memory) {
uint256[][] memory operatorSharesArray = new uint256[][](operators.length);
for (uint256 i = 0; i < operators.length; i++) {
operatorSharesArray[i] = new uint256[](strategies.length);
for (uint256 j = 0; j < strategies.length; j++) {
operatorSharesArray[i][j] = operatorShares[operators[i]][strategies[j]];
}
}
return operatorSharesArray;
}

function operatorDetails(address operator) external pure returns (IDelegationManagerTypes.OperatorDetails memory) {
IDelegationManagerTypes.OperatorDetails memory returnValue = IDelegationManagerTypes.OperatorDetails({
__deprecated_earningsReceiver: operator,
Expand Down
Loading

0 comments on commit 3f6adfb

Please sign in to comment.