You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/IndexRegistry.sol
+10-39Lines changed: 10 additions & 39 deletions
Original file line number
Diff line number
Diff line change
@@ -26,18 +26,7 @@ contract IndexRegistry is IndexRegistryStorage {
26
26
*
27
27
*/
28
28
29
-
/**
30
-
* @notice Registers the operator with the specified `operatorId` for the quorums specified by `quorumNumbers`.
31
-
* @param operatorId is the id of the operator that is being registered
32
-
* @param quorumNumbers is the quorum numbers the operator is registered for
33
-
* @return numOperatorsPerQuorum is a list of the number of operators (including the registering operator) in each of the quorums the operator is registered for
34
-
* @dev access restricted to the RegistryCoordinator
35
-
* @dev Preconditions (these are assumed, not validated in this contract):
36
-
* 1) `quorumNumbers` has no duplicates
37
-
* 2) `quorumNumbers.length` != 0
38
-
* 3) `quorumNumbers` is ordered in ascending order
39
-
* 4) the operator is not already registered
40
-
*/
29
+
/// @inheritdoc IIndexRegistry
41
30
function registerOperator(
42
31
bytes32operatorId,
43
32
bytescalldataquorumNumbers
@@ -68,18 +57,7 @@ contract IndexRegistry is IndexRegistryStorage {
68
57
return numOperatorsPerQuorum;
69
58
}
70
59
71
-
/**
72
-
* @notice Deregisters the operator with the specified `operatorId` for the quorums specified by `quorumNumbers`.
73
-
* @param operatorId is the id of the operator that is being deregistered
74
-
* @param quorumNumbers is the quorum numbers the operator is deregistered for
75
-
* @dev access restricted to the RegistryCoordinator
76
-
* @dev Preconditions (these are assumed, not validated in this contract):
77
-
* 1) `quorumNumbers` has no duplicates
78
-
* 2) `quorumNumbers.length` != 0
79
-
* 3) `quorumNumbers` is ordered in ascending order
80
-
* 4) the operator is not already deregistered
81
-
* 5) `quorumNumbers` is a subset of the quorumNumbers that the operator is registered for
82
-
*/
60
+
/// @inheritdoc IIndexRegistry
83
61
function deregisterOperator(
84
62
bytes32operatorId,
85
63
bytescalldataquorumNumbers
@@ -109,10 +87,7 @@ contract IndexRegistry is IndexRegistryStorage {
109
87
}
110
88
}
111
89
112
-
/**
113
-
* @notice Initialize a quorum by pushing its first quorum update
114
-
* @param quorumNumber The number of the new quorum
115
-
*/
90
+
/// @inheritdoc IIndexRegistry
116
91
function initializeQuorum(
117
92
uint8quorumNumber
118
93
) publicvirtual onlyRegistryCoordinator {
@@ -293,7 +268,7 @@ contract IndexRegistry is IndexRegistryStorage {
293
268
/**
294
269
* @return operatorId at the given `operatorIndex` at the given `blockNumber` for the given `quorumNumber`
295
270
* Precondition: requires that the operatorIndex was used active at the given block number for quorum
296
-
*/
271
+
*/
297
272
function _operatorIdForIndexAtBlockNumber(
298
273
uint8quorumNumber,
299
274
uint32operatorIndex,
@@ -322,8 +297,7 @@ contract IndexRegistry is IndexRegistryStorage {
322
297
*
323
298
*/
324
299
325
-
/// @notice Returns the _operatorIndexHistory entry for the specified `operatorIndex` and `quorumNumber`
326
-
/// at the specified `arrayIndex`
300
+
/// @inheritdoc IIndexRegistry
327
301
function getOperatorUpdateAtIndex(
328
302
uint8quorumNumber,
329
303
uint32operatorIndex,
@@ -332,32 +306,30 @@ contract IndexRegistry is IndexRegistryStorage {
/// @notice Emitted when an operator's index in a quorum is updated.
35
+
/// @param operatorId The unique identifier of the operator.
36
+
/// @param quorumNumber The identifier of the quorum.
37
+
/// @param newOperatorIndex The new index assigned to the operator.
38
+
event QuorumIndexUpdate(
39
+
bytes32indexedoperatorId,
40
+
uint8quorumNumber,
41
+
uint32newOperatorIndex
42
+
);
43
+
}
45
44
46
-
/**
47
-
* @notice Registers the operator with the specified `operatorId` for the quorums specified by `quorumNumbers`.
48
-
* @param operatorId is the id of the operator that is being registered
49
-
* @param quorumNumbers is the quorum numbers the operator is registered for
50
-
* @return numOperatorsPerQuorum is a list of the number of operators (including the registering operator) in each of the quorums the operator is registered for
51
-
* @dev access restricted to the RegistryCoordinator
52
-
* @dev Preconditions (these are assumed, not validated in this contract):
53
-
* 1) `quorumNumbers` has no duplicates
54
-
* 2) `quorumNumbers.length` != 0
55
-
* 3) `quorumNumbers` is ordered in ascending order
0 commit comments