@@ -11,6 +11,15 @@ import {IServiceManagerUI} from "./IServiceManagerUI.sol";
11
11
* @author Layr Labs, Inc.
12
12
*/
13
13
interface IServiceManager is IServiceManagerUI {
14
+
15
+ /// EVENTS
16
+
17
+ event RewardsInitiatorUpdated (address prevRewardsInitiator , address newRewardsInitiator );
18
+ event OperatorSetStrategiesMigrated (uint32 operatorSetId , IStrategy[] strategies );
19
+ event OperatorMigratedToOperatorSets (address operator , uint32 [] indexed operatorSetIds );
20
+
21
+ /// EXTERNAL - STATE MODIFYING
22
+
14
23
/**
15
24
* @notice Creates a new rewards submission to the EigenLayer RewardsCoordinator contract, to be split amongst the
16
25
* set of stakers delegated to operators who are registered to this `avs`
@@ -26,26 +35,45 @@ interface IServiceManager is IServiceManagerUI {
26
35
IRewardsCoordinator.RewardsSubmission[] calldata rewardsSubmissions
27
36
) external ;
28
37
29
- /// TODO: natspec
38
+
39
+ /**
40
+ * @notice called by the AVS StakeRegistry whenever a new IStrategy
41
+ * is added to a quorum/operatorSet
42
+ * @dev calls operatorSetManager.addStrategiesToOperatorSet()
43
+ */
30
44
function addStrategiesToOperatorSet (
31
45
uint32 operatorSetID ,
32
46
IStrategy[] calldata strategies
33
47
) external ;
34
48
35
- /// TODO: natspec
49
+ /**
50
+ * @notice called by the AVS StakeRegistry whenever a new IStrategy
51
+ * is removed from a quorum/operatorSet
52
+ * @dev calls operatorSetManager.removeStrategiesFromOperatorSet()
53
+ */
36
54
function removeStrategiesFromOperatorSet (
37
55
uint32 operatorSetID ,
38
56
IStrategy[] calldata strategies
39
57
) external ;
40
58
41
- /// @notice migrates all existing operators and strategies to operator sets
59
+ /**
60
+ * @notice One-time call that migrates all existing strategies for each quorum to their respective operator sets
61
+ * Note: a separate migration per operator must be performed to migrate an existing operator to the operator set
62
+ * See migrateOperatorToOperatorSets() below
63
+ * @dev calls operatorSetManager.addStrategiesToOperatorSet()
64
+ */
42
65
function migrateStrategiesToOperatorSets () external ;
43
66
44
67
/**
45
- * @notice the operator needs to provide a signature over the operatorSetIds they will be registering
46
- * for. This can be called externally by getOperatorSetIds
68
+ * @notice One-time call to migrate an existing operator to the respective operator sets.
69
+ * The operator needs to provide a signature over the operatorSetIds they are currently registered
70
+ * for. This can be retrieved externally by calling getOperatorSetIds.
71
+ * @param operator the address of the operator to be migrated
72
+ * @param signature the signature of the operator on their intent to migrate
73
+ * @dev calls operatorSetManager.registerOperatorToOperatorSets()
47
74
*/
48
75
function migrateOperatorToOperatorSets (
76
+ address operator ,
49
77
ISignatureUtils.SignatureWithSaltAndExpiry memory signature
50
78
) external ;
51
79
@@ -55,11 +83,8 @@ interface IServiceManager is IServiceManagerUI {
55
83
* @param operator the address of the operator to be added to the operator set
56
84
* @param quorumNumbers quorums/operatorSetIds to add the operator to
57
85
* @param signature the signature of the operator on their intent to register
58
- * @dev msg.sender is used as the AVS
59
- * @dev operator must not have a pending a deregistration from the operator set
60
- * @dev if this is the first operator set in the AVS that the operator is
61
- * registering for, a OperatorAVSRegistrationStatusUpdated event is emitted with
62
- * a REGISTERED status
86
+ * @dev msg.sender should be the RegistryCoordinator
87
+ * @dev calls operatorSetManager.registerOperatorToOperatorSets()
63
88
*/
64
89
function registerOperatorToOperatorSets (
65
90
address operator ,
@@ -74,18 +99,17 @@ interface IServiceManager is IServiceManagerUI {
74
99
* operator set
75
100
* @param quorumNumbers the quorumNumbers/operatorSetIds to deregister the operator for
76
101
*
77
- * @dev msg.sender is used as the AVS
78
- * @dev operator must be registered for msg.sender AVS and the given
79
- * operator set
80
- * @dev if this removes operator from all operator sets for the msg.sender AVS
81
- * then an OperatorAVSRegistrationStatusUpdated event is emitted with a DEREGISTERED
82
- * status
102
+ * @dev msg.sender should be the RegistryCoordinator
103
+ * @dev operator must be registered for the given operator sets
104
+ * @dev calls operatorSetManager.deregisterOperatorFromOperatorSets()
83
105
*/
84
106
function deregisterOperatorFromOperatorSets (
85
107
address operator ,
86
108
bytes calldata quorumNumbers
87
109
) external ;
88
110
89
- // EVENTS
90
- event RewardsInitiatorUpdated (address prevRewardsInitiator , address newRewardsInitiator );
111
+ /// VIEW
112
+
113
+ /// @notice Returns the operator set IDs for the given operator address by querying the RegistryCoordinator
114
+ function getOperatorSetIds (address operator ) external view returns (uint32 [] memory );
91
115
}
0 commit comments