Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions src/contracts/core/SlashEscrowFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -339,20 +339,7 @@ contract SlashEscrowFactory is Initializable, SlashEscrowFactoryStorage, Ownable
}

/// @inheritdoc ISlashEscrowFactory
function getPendingStrategiesForSlashIds() public view returns (IStrategy[][][] memory strategies) {
bytes32[] memory operatorSetKeys = _pendingOperatorSets.values();

uint256 length = operatorSetKeys.length;

strategies = new IStrategy[][][](length);

for (uint256 i = 0; i < length; ++i) {
strategies[i] = getPendingStrategiesForSlashIds(operatorSetKeys[i].decode());
}
}

/// @inheritdoc ISlashEscrowFactory
function getPendingStrategiesForSlashIdCount(
function getTotalPendingStrategiesForSlashId(
OperatorSet calldata operatorSet,
uint256 slashId
) external view returns (uint256) {
Expand Down
9 changes: 1 addition & 8 deletions src/contracts/interfaces/ISlashEscrowFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -163,20 +163,13 @@ interface ISlashEscrowFactory is ISlashEscrowFactoryErrors, ISlashEscrowFactoryE
OperatorSet calldata operatorSet
) external view returns (IStrategy[][] memory strategies);

/**
* @notice Returns all pending strategies for all slash IDs for all operator sets.
* @dev This is a variant that returns all pending strategies for all slash IDs for all operator sets.
* @return strategies The nested list of strategies that are pending strategies.
*/
function getPendingStrategiesForSlashIds() external view returns (IStrategy[][][] memory strategies);

/**
* @notice Returns the number of pending strategies for a slash ID for an operator set.
* @param operatorSet The operator set whose pending strategies are being queried.
* @param slashId The slash ID of the strategies that are being queried.
* @return The number of pending strategies.
*/
function getPendingStrategiesForSlashIdCount(
function getTotalPendingStrategiesForSlashId(
OperatorSet calldata operatorSet,
uint256 slashId
) external view returns (uint256);
Expand Down
4 changes: 2 additions & 2 deletions src/test/unit/AllocationManagerUnit.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3826,15 +3826,15 @@ contract AllocationManagerUnitTests_createRedistributingOperatorSets is Allocati
}

function testRevert_createRedistributingOperatorSets_ZeroAddress(Randomness r) public rand(r) {
address avs = r.Address();
address avs = address(0x12345);
address[] memory redistributionRecipients = new address[](1);
redistributionRecipients[0] = address(0);

cheats.prank(avs);
allocationManager.updateAVSMetadataURI(avs, "https://example.com");

cheats.expectRevert(IPausable.InputAddressZero.selector);
cheats.prank(avs);
cheats.expectRevert(IPausable.InputAddressZero.selector);
allocationManager.createRedistributingOperatorSets(
avs, CreateSetParams(defaultOperatorSet.id, defaultStrategies).toArray(), redistributionRecipients
);
Expand Down
Loading