Skip to content

Commit 91400d9

Browse files
authored
docs: fix typos and add note that large array may cause revert (#323)
1 parent 80f0f84 commit 91400d9

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/ServiceManagerBase.sol

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,14 @@ abstract contract ServiceManagerBase is ServiceManagerBaseStorage {
8282
* @notice Creates a new rewards submission to the EigenLayer RewardsCoordinator contract, to be split amongst the
8383
* set of stakers delegated to operators who are registered to this `avs`
8484
* @param rewardsSubmissions The rewards submissions being created
85-
* @dev Only callabe by the permissioned rewardsInitiator address
85+
* @dev Only callable by the permissioned rewardsInitiator address
8686
* @dev The duration of the `rewardsSubmission` cannot exceed `MAX_REWARDS_DURATION`
8787
* @dev The tokens are sent to the `RewardsCoordinator` contract
8888
* @dev Strategies must be in ascending order of addresses to check for duplicates
8989
* @dev This function will revert if the `rewardsSubmission` is malformed,
9090
* e.g. if the `strategies` and `weights` arrays are of non-equal lengths
91+
* @dev This function may fail to execute with a large number of submissions due to gas limits. Use a
92+
* smaller array of submissions if necessary.
9193
*/
9294
function createAVSRewardsSubmission(
9395
IRewardsCoordinator.RewardsSubmission[] calldata rewardsSubmissions
@@ -117,13 +119,15 @@ abstract contract ServiceManagerBase is ServiceManagerBaseStorage {
117119
* @notice Creates a new operator-directed rewards submission, to be split amongst the operators and
118120
* set of stakers delegated to operators who are registered to this `avs`.
119121
* @param operatorDirectedRewardsSubmissions The operator-directed rewards submissions being created.
120-
* @dev Only callabe by the permissioned rewardsInitiator address
122+
* @dev Only callable by the permissioned rewardsInitiator address
121123
* @dev The duration of the `rewardsSubmission` cannot exceed `MAX_REWARDS_DURATION`
122124
* @dev The tokens are sent to the `RewardsCoordinator` contract
123125
* @dev This contract needs a token approval of sum of all `operatorRewards` in the `operatorDirectedRewardsSubmissions`, before calling this function.
124126
* @dev Strategies must be in ascending order of addresses to check for duplicates
125127
* @dev Operators must be in ascending order of addresses to check for duplicates.
126128
* @dev This function will revert if the `operatorDirectedRewardsSubmissions` is malformed.
129+
* @dev This function may fail to execute with a large number of submissions due to gas limits. Use a
130+
* smaller array of submissions if necessary.
127131
*/
128132
function createOperatorDirectedAVSRewardsSubmission(
129133
IRewardsCoordinator.OperatorDirectedRewardsSubmission[]
@@ -172,7 +176,7 @@ abstract contract ServiceManagerBase is ServiceManagerBaseStorage {
172176
/**
173177
* @notice Forwards a call to Eigenlayer's RewardsCoordinator contract to set the address of the entity that can call `processClaim` on behalf of this contract.
174178
* @param claimer The address of the entity that can call `processClaim` on behalf of the earner
175-
* @dev Only callabe by the owner.
179+
* @dev Only callable by the owner.
176180
*/
177181
function setClaimerFor(address claimer) public virtual onlyOwner {
178182
_rewardsCoordinator.setClaimerFor(claimer);

src/interfaces/IServiceManager.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ interface IServiceManager is IServiceManagerUI {
1313
* @notice Creates a new rewards submission to the EigenLayer RewardsCoordinator contract, to be split amongst the
1414
* set of stakers delegated to operators who are registered to this `avs`
1515
* @param rewardsSubmissions The rewards submissions being created
16-
* @dev Only callabe by the permissioned rewardsInitiator address
16+
* @dev Only callable by the permissioned rewardsInitiator address
1717
* @dev The duration of the `rewardsSubmission` cannot exceed `MAX_REWARDS_DURATION`
1818
* @dev The tokens are sent to the `RewardsCoordinator` contract
1919
* @dev Strategies must be in ascending order of addresses to check for duplicates
@@ -28,7 +28,7 @@ interface IServiceManager is IServiceManagerUI {
2828
* @notice Creates a new operator-directed rewards submission on behalf of an AVS, to be split amongst the operators and
2929
* set of stakers delegated to operators who are registered to the `avs`.
3030
* @param operatorDirectedRewardsSubmissions The operator-directed rewards submissions being created
31-
* @dev Only callabe by the permissioned rewardsInitiator address
31+
* @dev Only callable by the permissioned rewardsInitiator address
3232
* @dev The duration of the `rewardsSubmission` cannot exceed `MAX_REWARDS_DURATION`
3333
* @dev The tokens are sent to the `RewardsCoordinator` contract
3434
* @dev This contract needs a token approval of sum of all `operatorRewards` in the `operatorDirectedRewardsSubmissions`, before calling this function.
@@ -44,7 +44,7 @@ interface IServiceManager is IServiceManagerUI {
4444
/**
4545
* @notice Forwards a call to Eigenlayer's RewardsCoordinator contract to set the address of the entity that can call `processClaim` on behalf of this contract.
4646
* @param claimer The address of the entity that can call `processClaim` on behalf of the earner
47-
* @dev Only callabe by the owner.
47+
* @dev Only callable by the owner.
4848
*/
4949
function setClaimerFor(address claimer) external;
5050

0 commit comments

Comments
 (0)