@@ -13,93 +13,73 @@ import {IStrategy} from "eigenlayer-contracts/src/contracts/interfaces/IStrategy
13
13
import {IAVSRegistrar} from "eigenlayer-contracts/src/contracts/interfaces/IAVSRegistrar.sol " ;
14
14
15
15
interface IServiceManagerErrors {
16
- /// @dev Thrown when a function is called by an address that is not the RegistryCoordinator
16
+ /// @notice Thrown when a function is called by an address that is not the RegistryCoordinator.
17
17
error OnlyRegistryCoordinator ();
18
- /// @dev Thrown when a function is called by an address that is not the RewardsInitiator
18
+ /// @notice Thrown when a function is called by an address that is not the RewardsInitiator.
19
19
error OnlyRewardsInitiator ();
20
- /// @dev Thrown when a function is called by an address that is not the Slasher
20
+ /// @notice Thrown when a function is called by an address that is not the StakeRegistry.
21
21
error OnlyStakeRegistry ();
22
- /// @dev Thrown when a function is called by an address that is not the Slasher
22
+ /// @notice Thrown when a function is called by an address that is not the Slasher.
23
23
error OnlySlasher ();
24
- /// @dev Thrown when a slashing proposal delay has not been met yet.
24
+ /// @notice Thrown when a slashing proposal delay has not been met yet.
25
25
error DelayPeriodNotPassed ();
26
26
}
27
27
28
- /**
29
- * @title Minimal interface for a ServiceManager-type contract that forms the single point for an AVS to push updates to EigenLayer
30
- * @author Layr Labs, Inc.
31
- */
32
- interface IServiceManager is IServiceManagerUI , IServiceManagerErrors {
33
- // EVENTS
28
+ interface IServiceManagerEvents {
29
+ /// @notice Emitted when the rewards initiator address is updated.
30
+ /// @param prevRewardsInitiator The previous rewards initiator address.
31
+ /// @param newRewardsInitiator The new rewards initiator address.
34
32
event RewardsInitiatorUpdated (address prevRewardsInitiator , address newRewardsInitiator );
33
+ }
35
34
36
- /**
37
- * @notice Creates a new rewards submission to the EigenLayer RewardsCoordinator contract, to be split amongst the
38
- * set of stakers delegated to operators who are registered to this `avs`
39
- * @param rewardsSubmissions The rewards submissions being created
40
- * @dev Only callable by the permissioned rewardsInitiator address
41
- * @dev The duration of the `rewardsSubmission` cannot exceed `MAX_REWARDS_DURATION`
42
- * @dev The tokens are sent to the `RewardsCoordinator` contract
43
- * @dev Strategies must be in ascending order of addresses to check for duplicates
44
- * @dev This function will revert if the `rewardsSubmission` is malformed,
45
- * e.g. if the `strategies` and `weights` arrays are of non-equal lengths
46
- */
35
+ interface IServiceManager is IServiceManagerUI , IServiceManagerErrors , IServiceManagerEvents {
36
+ /// @notice Creates a new rewards submission to the EigenLayer RewardsCoordinator contract.
37
+ /// @dev Only callable by the permissioned rewardsInitiator address.
38
+ /// @dev The duration of the `rewardsSubmission` cannot exceed `MAX_REWARDS_DURATION`.
39
+ /// @dev The tokens are sent to the `RewardsCoordinator` contract.
40
+ /// @dev Strategies must be in ascending order of addresses to check for duplicates.
41
+ /// @dev This function will revert if the `rewardsSubmission` is malformed,
42
+ /// e.g. if the `strategies` and `weights` arrays are of non-equal lengths.
43
+ /// @param rewardsSubmissions The rewards submissions to be split amongst the set of stakers
44
+ /// delegated to operators who are registered to this `avs`.
47
45
function createAVSRewardsSubmission (
48
46
IRewardsCoordinator.RewardsSubmission[] calldata rewardsSubmissions
49
47
) external ;
50
48
51
- /**
52
- *
53
- * PERMISSIONCONTROLLER FUNCTIONS
54
- *
55
- */
56
- /**
57
- * @notice Calls `addPendingAdmin` on the `PermissionController` contract
58
- * with `account` being the address of this contract.
59
- * @param admin The address of the admin to add
60
- * @dev Only callable by the owner of the contract
61
- */
49
+ /// @notice PERMISSIONCONTROLLER FUNCTIONS
50
+
51
+ /// @notice Calls `addPendingAdmin` on the `PermissionController` contract.
52
+ /// @dev Only callable by the owner of the contract.
53
+ /// @param admin The address of the admin to add.
62
54
function addPendingAdmin (
63
55
address admin
64
56
) external ;
65
57
66
- /**
67
- * @notice Calls `removePendingAdmin` on the `PermissionController` contract
68
- * with `account` being the address of this contract.
69
- * @param pendingAdmin The address of the pending admin to remove
70
- * @dev Only callable by the owner of the contract
71
- */
58
+ /// @notice Calls `removePendingAdmin` on the `PermissionController` contract.
59
+ /// @dev Only callable by the owner of the contract.
60
+ /// @param pendingAdmin The address of the pending admin to remove.
72
61
function removePendingAdmin (
73
62
address pendingAdmin
74
63
) external ;
75
64
76
- /**
77
- * @notice Calls `removeAdmin` on the `PermissionController` contract
78
- * with `account` being the address of this contract.
79
- * @param admin The address of the admin to remove
80
- * @dev Only callable by the owner of the contract
81
- */
65
+ /// @notice Calls `removeAdmin` on the `PermissionController` contract.
66
+ /// @dev Only callable by the owner of the contract.
67
+ /// @param admin The address of the admin to remove.
82
68
function removeAdmin (
83
69
address admin
84
70
) external ;
85
71
86
- /**
87
- * @notice Calls `setAppointee` on the `PermissionController` contract
88
- * with `account` being the address of this contract.
89
- * @param appointee The address of the appointee to set
90
- * @param target The address of the target to set the appointee for
91
- * @param selector The function selector to set the appointee for
92
- * @dev Only callable by the owner of the contract
93
- */
72
+ /// @notice Calls `setAppointee` on the `PermissionController` contract.
73
+ /// @dev Only callable by the owner of the contract.
74
+ /// @param appointee The address of the appointee to set.
75
+ /// @param target The address of the target to set the appointee for.
76
+ /// @param selector The function selector to set the appointee for.
94
77
function setAppointee (address appointee , address target , bytes4 selector ) external ;
95
78
96
- /**
97
- * @notice Calls `removeAppointee` on the `PermissionController` contract
98
- * with `account` being the address of this contract.
99
- * @param appointee The address of the appointee to remove
100
- * @param target The address of the target to remove the appointee for
101
- * @param selector The function selector to remove the appointee for
102
- * @dev Only callable by the owner of the contract
103
- */
79
+ /// @notice Calls `removeAppointee` on the `PermissionController` contract.
80
+ /// @dev Only callable by the owner of the contract.
81
+ /// @param appointee The address of the appointee to remove.
82
+ /// @param target The address of the target to remove the appointee for.
83
+ /// @param selector The function selector to remove the appointee for.
104
84
function removeAppointee (address appointee , address target , bytes4 selector ) external ;
105
85
}
0 commit comments