Skip to content

Commit 2b0b6e4

Browse files
committed
refactor: natspec
1 parent d4a2423 commit 2b0b6e4

File tree

1 file changed

+85
-29
lines changed

1 file changed

+85
-29
lines changed

src/interfaces/ISlashingRegistryCoordinator.sol

Lines changed: 85 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -56,120 +56,176 @@ interface ISlashingRegistryCoordinator is
5656
ISlashingRegistryCoordinatorErrors,
5757
ISlashingRegistryCoordinatorEvents
5858
{
59-
/// @notice Returns the operator set params for the given `quorumNumber`
59+
/**
60+
* @notice Returns the operator set params for the given quorum number
61+
* @param quorumNumber The quorum number to get params for
62+
* @return The operator set parameters for the specified quorum
63+
*/
6064
function getOperatorSetParams(
6165
uint8 quorumNumber
6266
) external view returns (OperatorSetParam memory);
63-
/// @notice the Stake registry contract that will keep track of operators' stakes
67+
68+
/// @notice Returns the Stake registry contract that keeps track of operators' stakes
6469
function stakeRegistry() external view returns (IStakeRegistry);
65-
/// @notice the BLS Aggregate Pubkey Registry contract that will keep track of operators' BLS aggregate pubkeys per quorum
70+
71+
/// @notice Returns the BLS Aggregate Pubkey Registry contract that keeps track of operators' BLS aggregate pubkeys per quorum
6672
function blsApkRegistry() external view returns (IBLSApkRegistry);
67-
/// @notice the index Registry contract that will keep track of operators' indexes
73+
74+
/// @notice Returns the index Registry contract that keeps track of operators' indexes
6875
function indexRegistry() external view returns (IIndexRegistry);
6976

7077
/**
7178
* @notice Ejects the provided operator from the provided quorums from the AVS
72-
* @param operator is the operator to eject
73-
* @param quorumNumbers are the quorum numbers to eject the operator from
79+
* @param operator The operator to eject
80+
* @param quorumNumbers The quorum numbers to eject the operator from
7481
*/
7582
function ejectOperator(address operator, bytes calldata quorumNumbers) external;
7683

7784
/// @notice Returns the number of quorums the registry coordinator has created
7885
function quorumCount() external view returns (uint8);
7986

80-
/// @notice Returns the operator struct for the given `operator`
87+
/**
88+
* @notice Returns the operator struct for the given operator
89+
* @param operator The operator address to get info for
90+
* @return The operator information struct
91+
*/
8192
function getOperator(
8293
address operator
8394
) external view returns (OperatorInfo memory);
8495

85-
/// @notice Returns the operatorId for the given `operator`
96+
/**
97+
* @notice Returns the operatorId for the given operator
98+
* @param operator The operator address to get ID for
99+
* @return The operator's unique ID
100+
*/
86101
function getOperatorId(
87102
address operator
88103
) external view returns (bytes32);
89104

90-
/// @notice Returns the operator address for the given `operatorId`
105+
/**
106+
* @notice Returns the operator address for the given operatorId
107+
* @param operatorId The operator ID to lookup
108+
* @return operator The operator's address
109+
*/
91110
function getOperatorFromId(
92111
bytes32 operatorId
93112
) external view returns (address operator);
94113

95-
/// @notice Returns the status for the given `operator`
114+
/**
115+
* @notice Returns the status for the given operator
116+
* @param operator The operator address to get status for
117+
* @return The operator's current status
118+
*/
96119
function getOperatorStatus(
97120
address operator
98121
) external view returns (OperatorStatus);
99122

100-
/// @notice Returns the indices of the quorumBitmaps for the provided `operatorIds` at the given `blockNumber`
123+
/**
124+
* @notice Returns the indices of the quorumBitmaps for the provided operatorIds at the given blockNumber
125+
* @param blockNumber The block number to get indices at
126+
* @param operatorIds Array of operator IDs to get indices for
127+
* @return Array of quorum bitmap indices
128+
*/
101129
function getQuorumBitmapIndicesAtBlockNumber(
102130
uint32 blockNumber,
103131
bytes32[] memory operatorIds
104132
) external view returns (uint32[] memory);
105133

106134
/**
107-
* @notice Returns the quorum bitmap for the given `operatorId` at the given `blockNumber` via the `index`
108-
* @dev reverts if `index` is incorrect
135+
* @notice Returns the quorum bitmap for the given operatorId at the given blockNumber via the index
136+
* @param operatorId The operator ID to get bitmap for
137+
* @param blockNumber The block number to get bitmap at
138+
* @param index The index in the bitmap history
139+
* @return The quorum bitmap at the specified block and index
140+
* @dev Reverts if index is incorrect
109141
*/
110142
function getQuorumBitmapAtBlockNumberByIndex(
111143
bytes32 operatorId,
112144
uint32 blockNumber,
113145
uint256 index
114146
) external view returns (uint192);
115147

116-
/// @notice Returns the `index`th entry in the operator with `operatorId`'s bitmap history
148+
/**
149+
* @notice Returns the index-th entry in the operator's bitmap history
150+
* @param operatorId The operator ID to get bitmap update for
151+
* @param index The index in the bitmap history
152+
* @return The quorum bitmap update at the specified index
153+
*/
117154
function getQuorumBitmapUpdateByIndex(
118155
bytes32 operatorId,
119156
uint256 index
120157
) external view returns (QuorumBitmapUpdate memory);
121158

122-
/// @notice Returns the current quorum bitmap for the given `operatorId`
159+
/**
160+
* @notice Returns the current quorum bitmap for the given operatorId
161+
* @param operatorId The operator ID to get current bitmap for
162+
* @return The operator's current quorum bitmap
163+
*/
123164
function getCurrentQuorumBitmap(
124165
bytes32 operatorId
125166
) external view returns (uint192);
126167

127-
/// @notice Returns the length of the quorum bitmap history for the given `operatorId`
168+
/**
169+
* @notice Returns the length of the quorum bitmap history for the given operatorId
170+
* @param operatorId The operator ID to get history length for
171+
* @return The length of the operator's bitmap history
172+
*/
128173
function getQuorumBitmapHistoryLength(
129174
bytes32 operatorId
130175
) external view returns (uint256);
131176

132-
/// @notice Returns the registry at the desired index
177+
/**
178+
* @notice Returns the registry at the desired index
179+
* @param index The index of the registry to return
180+
* @return The registry address at the specified index
181+
*/
133182
function registries(
134-
uint256
183+
uint256 index
135184
) external view returns (address);
136185

137186
/// @notice Returns the number of registries
138187
function numRegistries() external view returns (uint256);
139188

140-
/// @notice Returns whether a quorum is an M2 quorum
141-
/// @param quorumNumber The quorum number to check
142-
/// @return True if the quorum is an M2 quorum
189+
/**
190+
* @notice Returns whether a quorum is an M2 quorum
191+
* @param quorumNumber The quorum number to check
192+
* @return True if the quorum is an M2 quorum
193+
*/
143194
function isM2Quorum(
144195
uint8 quorumNumber
145196
) external view returns (bool);
146197

147198
/**
148-
* @notice Returns whether operator sets mode is enabled.
149-
* @return True if operator sets mode is enabled, false otherwise.
199+
* @notice Returns whether operator sets mode is enabled
200+
* @return True if operator sets mode is enabled, false otherwise
150201
*/
151202
function operatorSetsEnabled() external view returns (bool);
152203

153204
/**
154-
* @notice Returns the message hash that an operator must sign to register their BLS public key.
155-
* @param operator is the address of the operator registering their BLS public key
205+
* @notice Returns the message hash that an operator must sign to register their BLS public key
206+
* @param operator The address of the operator registering their BLS public key
207+
* @return The message hash to be signed
156208
*/
157209
function pubkeyRegistrationMessageHash(
158210
address operator
159211
) external view returns (BN254.G1Point memory);
160212

161-
/// @notice returns the blocknumber the quorum was last updated all at once for all operators
213+
/**
214+
* @notice Returns the blocknumber the quorum was last updated all at once for all operators
215+
* @param quorumNumber The quorum number to get update block for
216+
* @return The block number of the last quorum update
217+
*/
162218
function quorumUpdateBlockNumber(
163219
uint8 quorumNumber
164220
) external view returns (uint256);
165221

166-
/// @notice The owner of the registry coordinator
222+
/// @notice Returns the owner of the registry coordinator
167223
function owner() external view returns (address);
168224

169225
/**
170-
* @notice The account identifier for this AVS (used for UAM integration in EigenLayer).
226+
* @notice Returns the account identifier for this AVS (used for UAM integration in EigenLayer)
171227
* @dev NOTE: Updating this value will break existing OperatorSets and UAM integration. This value should only be set once.
172-
* @return The account identifier address.
228+
* @return The account identifier address
173229
*/
174230
function accountIdentifier() external view returns (address);
175231
}

0 commit comments

Comments
 (0)