Skip to content

Commit

Permalink
add getNumOperatorSets
Browse files Browse the repository at this point in the history
  • Loading branch information
gpsanant committed Sep 8, 2024
1 parent 2445306 commit 45b65da
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/contracts/core/StakeRootCompendium.sol
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,11 @@ contract StakeRootCompendium is StakeRootCompendiumStorage {

/// VIEW FUNCTIONS

/// @inheritdoc IStakeRootCompendium
function getNumOperatorSets() external view returns (uint256) {
return operatorSets.length;
}

/// @inheritdoc IStakeRootCompendium
function getStakes(IAVSDirectory.OperatorSet calldata operatorSet, address operator)
external
Expand Down
3 changes: 3 additions & 0 deletions src/contracts/interfaces/IStakeRootCompendium.sol
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ interface IStakeRootCompendium {
function verifier() external view returns (address);
function imageId() external view returns (bytes32);

/// @notice the number of operator sets in the StakeTree
function getNumOperatorSets() external view returns (uint256);

/// @notice the interval at which proofs can be posted, to not overcharge the operatorSets
function proofInterval() external view returns (uint32);

Expand Down

0 comments on commit 45b65da

Please sign in to comment.