From 7cfa2d2b55d82e2069f4fa63c70a059faa15bf25 Mon Sep 17 00:00:00 2001 From: "clandestine.eth" <96172957+0xClandestine@users.noreply.github.com> Date: Mon, 6 Jan 2025 11:15:28 -0500 Subject: [PATCH] refactor: renaming --- src/contracts/core/RewardsCoordinator.sol | 6 +- .../core/RewardsCoordinatorStorage.sol | 2 +- .../interfaces/IRewardsCoordinator.sol | 10 +- src/test/unit/RewardsCoordinatorUnit.t.sol | 134 +++++++++--------- 4 files changed, 76 insertions(+), 76 deletions(-) diff --git a/src/contracts/core/RewardsCoordinator.sol b/src/contracts/core/RewardsCoordinator.sol index 70d6dbdb9..2317b962b 100644 --- a/src/contracts/core/RewardsCoordinator.sol +++ b/src/contracts/core/RewardsCoordinator.sol @@ -179,7 +179,7 @@ contract RewardsCoordinator is } /// @inheritdoc IRewardsCoordinator - function createOperatorSetPerformanceRewardsSubmission( + function createOperatorDirectedOperatorSetRewardsSubmission( OperatorSet calldata operatorSet, OperatorDirectedRewardsSubmission[] calldata rewardsSubmissions ) @@ -316,7 +316,7 @@ contract RewardsCoordinator is } /// @inheritdoc IRewardsCoordinator - function setOperatorSetPerformanceSplit( + function setOperatorDirectedOperatorSetSplit( address operator, OperatorSet calldata operatorSet, uint16 split @@ -658,7 +658,7 @@ contract RewardsCoordinator is } /// @inheritdoc IRewardsCoordinator - function getOperatorSetPerformanceSplit( + function getOperatorDirectedOperatorSetSplit( address operator, OperatorSet calldata operatorSet ) external view returns (uint16) { diff --git a/src/contracts/core/RewardsCoordinatorStorage.sol b/src/contracts/core/RewardsCoordinatorStorage.sol index ab5262dc2..a06749e1d 100644 --- a/src/contracts/core/RewardsCoordinatorStorage.sol +++ b/src/contracts/core/RewardsCoordinatorStorage.sol @@ -33,7 +33,7 @@ abstract contract RewardsCoordinatorStorage is IRewardsCoordinator { uint8 internal constant PAUSED_OPERATOR_AVS_SPLIT = 7; /// @dev Index for flag that pauses calling setOperatorPISplit uint8 internal constant PAUSED_OPERATOR_PI_SPLIT = 8; - /// @dev Index for flag that pauses calling setOperatorSetPerformanceSplit + /// @dev Index for flag that pauses calling setOperatorDirectedOperatorSetSplit uint8 internal constant PAUSED_OPERATOR_SET_OPERATOR_SPLIT = 9; /// @dev Salt for the earner leaf, meant to distinguish from tokenLeaf since they have the same sized data diff --git a/src/contracts/interfaces/IRewardsCoordinator.sol b/src/contracts/interfaces/IRewardsCoordinator.sol index ca77d0219..bad746ee3 100644 --- a/src/contracts/interfaces/IRewardsCoordinator.sol +++ b/src/contracts/interfaces/IRewardsCoordinator.sol @@ -282,7 +282,7 @@ interface IRewardsCoordinatorEvents is IRewardsCoordinatorTypes { /** * @notice Emitted when an AVS creates a valid performance based `OperatorDirectedRewardsSubmission` - * @param caller The address calling `createOperatorSetPerformanceRewardsSubmission`. + * @param caller The address calling `createOperatorDirectedOperatorSetRewardsSubmission`. * @param operatorSet The operatorSet on behalf of which the performance rewards are being submitted. * @param performanceRewardsSubmissionHash Keccak256 hash of (`avs`, `submissionNonce` and `performanceRewardsSubmission`). * @param submissionNonce Current nonce of the operatorSet. Used to generate a unique submission hash. @@ -342,7 +342,7 @@ interface IRewardsCoordinatorEvents is IRewardsCoordinatorTypes { /** * @notice Emitted when the operator split for a given operatorSet is set. - * @param caller The address calling `setOperatorSetPerformanceSplit`. + * @param caller The address calling `setOperatorDirectedOperatorSetSplit`. * @param operator The operator on behalf of which the split is being set. * @param operatorSet The operatorSet for which the split is being set. * @param activatedAt The timestamp at which the split will be activated. @@ -459,7 +459,7 @@ interface IRewardsCoordinator is IRewardsCoordinatorErrors, IRewardsCoordinatorE /// @notice operatorSet parallel of createAVSPerformanceRewardsSubmission /// @dev sender must be the avs of the given operatorSet - function createOperatorSetPerformanceRewardsSubmission( + function createOperatorDirectedOperatorSetRewardsSubmission( OperatorSet calldata operatorSet, OperatorDirectedRewardsSubmission[] calldata performanceRewardsSubmissions ) external; @@ -572,7 +572,7 @@ interface IRewardsCoordinator is IRewardsCoordinatorErrors, IRewardsCoordinatorE * @param operatorSet The operatorSet for which the split is being set by the operator. * @param split The split for the operator for the specific operatorSet in bips. */ - function setOperatorSetPerformanceSplit( + function setOperatorDirectedOperatorSetSplit( address operator, OperatorSet calldata operatorSet, uint16 split @@ -627,7 +627,7 @@ interface IRewardsCoordinator is IRewardsCoordinatorErrors, IRewardsCoordinatorE ) external view returns (uint16); /// @notice Returns the split for a specific `operator` for a given `operatorSet` - function getOperatorSetPerformanceSplit( + function getOperatorDirectedOperatorSetSplit( address operator, OperatorSet calldata operatorSet ) external view returns (uint16); diff --git a/src/test/unit/RewardsCoordinatorUnit.t.sol b/src/test/unit/RewardsCoordinatorUnit.t.sol index 9a31e8da1..463c95164 100644 --- a/src/test/unit/RewardsCoordinatorUnit.t.sol +++ b/src/test/unit/RewardsCoordinatorUnit.t.sol @@ -92,7 +92,7 @@ contract RewardsCoordinatorUnitTests is EigenLayerUnitTestSetup, IRewardsCoordin /// @dev Index for flag that pauses calling setOperatorPISplit uint8 internal constant PAUSED_OPERATOR_PI_SPLIT = 8; - /// @dev Index for flag that pauses calling setOperatorSetPerformanceSplit + /// @dev Index for flag that pauses calling setOperatorDirectedOperatorSetSplit uint8 internal constant PAUSED_OPERATOR_SET_OPERATOR_SPLIT = 9; // RewardsCoordinator entities @@ -786,7 +786,7 @@ contract RewardsCoordinatorUnitTests_setOperatorPISplit is RewardsCoordinatorUni } } -contract RewardsCoordinatorUnitsTests_setOperatorSetPerformanceSplit is RewardsCoordinatorUnitTests { +contract RewardsCoordinatorUnitsTests_setOperatorDirectedOperatorSetSplit is RewardsCoordinatorUnitTests { OperatorSet operatorSet; function setUp() public virtual override { @@ -804,7 +804,7 @@ contract RewardsCoordinatorUnitsTests_setOperatorSetPerformanceSplit is RewardsC cheats.prank(operator); cheats.expectRevert(IPausable.CurrentlyPaused.selector); - rewardsCoordinator.setOperatorSetPerformanceSplit(operator, operatorSet, split); + rewardsCoordinator.setOperatorDirectedOperatorSetSplit(operator, operatorSet, split); } // Revert when split is greater than 100% @@ -817,27 +817,27 @@ contract RewardsCoordinatorUnitsTests_setOperatorSetPerformanceSplit is RewardsC cheats.prank(operator); cheats.expectRevert(SplitExceedsMax.selector); - rewardsCoordinator.setOperatorSetPerformanceSplit(operator, operatorSet, split); + rewardsCoordinator.setOperatorDirectedOperatorSetSplit(operator, operatorSet, split); } - function testFuzz_setOperatorSetPerformanceSplit(address operator, uint16 split) public filterFuzzedAddressInputs(operator) { + function testFuzz_setOperatorDirectedOperatorSetSplit(address operator, uint16 split) public filterFuzzedAddressInputs(operator) { cheats.assume(operator != address(0)); split = uint16(bound(split, 0, ONE_HUNDRED_IN_BIPS)); uint32 activatedAt = uint32(block.timestamp) + activationDelay; - uint16 oldSplit = rewardsCoordinator.getOperatorSetPerformanceSplit(operator, operatorSet); + uint16 oldSplit = rewardsCoordinator.getOperatorDirectedOperatorSetSplit(operator, operatorSet); cheats.expectEmit(true, true, true, true, address(rewardsCoordinator)); emit OperatorSetPerformanceSplitBipsSet(operator, operator, operatorSet, activatedAt, oldSplit, split); cheats.prank(operator); - rewardsCoordinator.setOperatorSetPerformanceSplit(operator, operatorSet, split); + rewardsCoordinator.setOperatorDirectedOperatorSetSplit(operator, operatorSet, split); - assertEq(oldSplit, rewardsCoordinator.getOperatorSetPerformanceSplit(operator, operatorSet), "Incorrect Operator split"); + assertEq(oldSplit, rewardsCoordinator.getOperatorDirectedOperatorSetSplit(operator, operatorSet), "Incorrect Operator split"); cheats.warp(activatedAt); - assertEq(split, rewardsCoordinator.getOperatorSetPerformanceSplit(operator, operatorSet), "Incorrect Operator split"); + assertEq(split, rewardsCoordinator.getOperatorDirectedOperatorSetSplit(operator, operatorSet), "Incorrect Operator split"); } - function testFuzz_setOperatorSetPerformanceSplit_UAM(address operator, uint16 split) public filterFuzzedAddressInputs(operator) { + function testFuzz_setOperatorDirectedOperatorSetSplit_UAM(address operator, uint16 split) public filterFuzzedAddressInputs(operator) { cheats.assume(operator != address(0)); // Set UAM @@ -846,46 +846,46 @@ contract RewardsCoordinatorUnitsTests_setOperatorSetPerformanceSplit is RewardsC operator, defaultAppointee, address(rewardsCoordinator), - IRewardsCoordinator.setOperatorSetPerformanceSplit.selector + IRewardsCoordinator.setOperatorDirectedOperatorSetSplit.selector ); split = uint16(bound(split, 0, ONE_HUNDRED_IN_BIPS)); uint32 activatedAt = uint32(block.timestamp) + activationDelay; - uint16 oldSplit = rewardsCoordinator.getOperatorSetPerformanceSplit(operator, operatorSet); + uint16 oldSplit = rewardsCoordinator.getOperatorDirectedOperatorSetSplit(operator, operatorSet); cheats.expectEmit(true, true, true, true, address(rewardsCoordinator)); emit OperatorSetPerformanceSplitBipsSet(defaultAppointee, operator, operatorSet, activatedAt, oldSplit, split); cheats.prank(defaultAppointee); - rewardsCoordinator.setOperatorSetPerformanceSplit(operator, operatorSet, split); + rewardsCoordinator.setOperatorDirectedOperatorSetSplit(operator, operatorSet, split); - assertEq(oldSplit, rewardsCoordinator.getOperatorSetPerformanceSplit(operator, operatorSet), "Incorrect Operator split"); + assertEq(oldSplit, rewardsCoordinator.getOperatorDirectedOperatorSetSplit(operator, operatorSet), "Incorrect Operator split"); cheats.warp(activatedAt); - assertEq(split, rewardsCoordinator.getOperatorSetPerformanceSplit(operator, operatorSet), "Incorrect Operator split"); + assertEq(split, rewardsCoordinator.getOperatorDirectedOperatorSetSplit(operator, operatorSet), "Incorrect Operator split"); } // Testing that the split has been initialized for the first time. - function testFuzz_setOperatorSetPerformanceSplitFirstTime( + function testFuzz_setOperatorDirectedOperatorSetSplitFirstTime( address operator, uint16 split ) public filterFuzzedAddressInputs(operator) { cheats.assume(operator != address(0)); split = uint16(bound(split, 0, ONE_HUNDRED_IN_BIPS)); uint32 activatedAt = uint32(block.timestamp) + activationDelay; - uint16 oldSplit = rewardsCoordinator.getOperatorSetPerformanceSplit(operator, operatorSet); + uint16 oldSplit = rewardsCoordinator.getOperatorDirectedOperatorSetSplit(operator, operatorSet); assertEq(oldSplit, defaultSplitBips, "Operator split is not Default split before Initialization"); cheats.expectEmit(true, true, true, true, address(rewardsCoordinator)); emit OperatorSetPerformanceSplitBipsSet(operator, operator, operatorSet, activatedAt, oldSplit, split); cheats.prank(operator); - rewardsCoordinator.setOperatorSetPerformanceSplit(operator, operatorSet, split); + rewardsCoordinator.setOperatorDirectedOperatorSetSplit(operator, operatorSet, split); - assertEq(oldSplit, rewardsCoordinator.getOperatorSetPerformanceSplit(operator, operatorSet), "Incorrect Operator split"); + assertEq(oldSplit, rewardsCoordinator.getOperatorDirectedOperatorSetSplit(operator, operatorSet), "Incorrect Operator split"); cheats.warp(activatedAt); - assertEq(split, rewardsCoordinator.getOperatorSetPerformanceSplit(operator, operatorSet), "Incorrect Operator split"); + assertEq(split, rewardsCoordinator.getOperatorDirectedOperatorSetSplit(operator, operatorSet), "Incorrect Operator split"); } // Testing the split setting for a second time prior to the earlier activation. - function testFuzz_Revert_setOperatorSetPerformanceSplitSecondTimeBeforePriorActivation( + function testFuzz_Revert_setOperatorDirectedOperatorSetSplitSecondTimeBeforePriorActivation( address operator, uint16 firstSplit, uint16 secondSplit, @@ -898,18 +898,18 @@ contract RewardsCoordinatorUnitsTests_setOperatorSetPerformanceSplit is RewardsC // Setting First Split cheats.prank(operator); - rewardsCoordinator.setOperatorSetPerformanceSplit(operator, operatorSet, firstSplit); + rewardsCoordinator.setOperatorDirectedOperatorSetSplit(operator, operatorSet, firstSplit); // Warping to time before activation of First split cheats.warp(warpTime); // Trying to set Second Split cheats.prank(operator); cheats.expectRevert(PreviousSplitPending.selector); - rewardsCoordinator.setOperatorSetPerformanceSplit(operator, operatorSet, secondSplit); + rewardsCoordinator.setOperatorDirectedOperatorSetSplit(operator, operatorSet, secondSplit); } // Testing the split setting for a second time after earlier activation. - function testFuzz_setOperatorSetPerformanceSplitSecondTimeAfterPriorActivation( + function testFuzz_setOperatorDirectedOperatorSetSplitSecondTimeAfterPriorActivation( address operator, uint16 firstSplit, uint16 secondSplit, @@ -924,7 +924,7 @@ contract RewardsCoordinatorUnitsTests_setOperatorSetPerformanceSplit is RewardsC // Setting First Split cheats.prank(operator); - rewardsCoordinator.setOperatorSetPerformanceSplit(operator, operatorSet, firstSplit); + rewardsCoordinator.setOperatorDirectedOperatorSetSplit(operator, operatorSet, firstSplit); // Warping to time after activation of First split cheats.warp(warpTime); uint32 activatedAt = uint32(block.timestamp) + activationDelay; @@ -933,11 +933,11 @@ contract RewardsCoordinatorUnitsTests_setOperatorSetPerformanceSplit is RewardsC cheats.expectEmit(true, true, true, true, address(rewardsCoordinator)); emit OperatorSetPerformanceSplitBipsSet(operator, operator, operatorSet, activatedAt, firstSplit, secondSplit); cheats.prank(operator); - rewardsCoordinator.setOperatorSetPerformanceSplit(operator, operatorSet, secondSplit); + rewardsCoordinator.setOperatorDirectedOperatorSetSplit(operator, operatorSet, secondSplit); - assertEq(firstSplit, rewardsCoordinator.getOperatorSetPerformanceSplit(operator, operatorSet), "Incorrect Operator split"); + assertEq(firstSplit, rewardsCoordinator.getOperatorDirectedOperatorSetSplit(operator, operatorSet), "Incorrect Operator split"); cheats.warp(activatedAt); - assertEq(secondSplit, rewardsCoordinator.getOperatorSetPerformanceSplit(operator, operatorSet), "Incorrect Operator split"); + assertEq(secondSplit, rewardsCoordinator.getOperatorDirectedOperatorSetSplit(operator, operatorSet), "Incorrect Operator split"); } } @@ -2852,7 +2852,7 @@ contract RewardsCoordinatorUnitTests_createOperatorDirectedAVSRewardsSubmission } } -contract RewardsCoordinatorUnitTests_createOperatorSetPerformanceRewardsSubmission is RewardsCoordinatorUnitTests { +contract RewardsCoordinatorUnitTests_createOperatorDirectedOperatorSetRewardsSubmission is RewardsCoordinatorUnitTests { OperatorSet operatorSet; // used for stack too deep @@ -2917,7 +2917,7 @@ contract RewardsCoordinatorUnitTests_createOperatorSetPerformanceRewardsSubmissi cheats.expectRevert(IPausable.CurrentlyPaused.selector); OperatorDirectedRewardsSubmission[] memory performanceRewardsSubmissions; - rewardsCoordinator.createOperatorSetPerformanceRewardsSubmission(operatorSet, performanceRewardsSubmissions); + rewardsCoordinator.createOperatorDirectedOperatorSetRewardsSubmission(operatorSet, performanceRewardsSubmissions); } // // Revert from reentrancy @@ -2952,7 +2952,7 @@ contract RewardsCoordinatorUnitTests_createOperatorSetPerformanceRewardsSubmissi // address targetToUse = address(rewardsCoordinator); // uint256 msgValueToUse = 0; // bytes memory calldataToUse = abi.encodeWithSelector( - // RewardsCoordinator.createOperatorSetPerformanceRewardsSubmission.selector, + // RewardsCoordinator.createOperatorDirectedOperatorSetRewardsSubmission.selector, // address(reenterer), // performanceRewardsSubmissions // ); @@ -2960,7 +2960,7 @@ contract RewardsCoordinatorUnitTests_createOperatorSetPerformanceRewardsSubmissi // cheats.prank(address(reenterer)); // cheats.expectRevert("ReentrancyGuard: reentrant call"); - // rewardsCoordinator.createOperatorSetPerformanceRewardsSubmission( + // rewardsCoordinator.createOperatorDirectedOperatorSetRewardsSubmission( // address(reenterer), // performanceRewardsSubmissions // ); @@ -3004,10 +3004,10 @@ contract RewardsCoordinatorUnitTests_createOperatorSetPerformanceRewardsSubmissi description: "" }); - // 3. call createOperatorSetPerformanceRewardsSubmission() with expected revert + // 3. call createOperatorDirectedOperatorSetRewardsSubmission() with expected revert cheats.prank(avs); cheats.expectRevert(InputArrayLengthZero.selector); - rewardsCoordinator.createOperatorSetPerformanceRewardsSubmission(operatorSet, performanceRewardsSubmissions); + rewardsCoordinator.createOperatorDirectedOperatorSetRewardsSubmission(operatorSet, performanceRewardsSubmissions); } // Revert with 0 length operator rewards @@ -3048,10 +3048,10 @@ contract RewardsCoordinatorUnitTests_createOperatorSetPerformanceRewardsSubmissi description: "" }); - // 3. call createOperatorSetPerformanceRewardsSubmission() with expected revert + // 3. call createOperatorDirectedOperatorSetRewardsSubmission() with expected revert cheats.prank(avs); cheats.expectRevert(InputArrayLengthZero.selector); - rewardsCoordinator.createOperatorSetPerformanceRewardsSubmission(operatorSet, performanceRewardsSubmissions); + rewardsCoordinator.createOperatorDirectedOperatorSetRewardsSubmission(operatorSet, performanceRewardsSubmissions); } // Revert when operator is zero address @@ -3092,10 +3092,10 @@ contract RewardsCoordinatorUnitTests_createOperatorSetPerformanceRewardsSubmissi description: "" }); - // 3. call createOperatorSetPerformanceRewardsSubmission() with expected revert + // 3. call createOperatorDirectedOperatorSetRewardsSubmission() with expected revert cheats.prank(avs); cheats.expectRevert(InvalidAddressZero.selector); - rewardsCoordinator.createOperatorSetPerformanceRewardsSubmission(operatorSet, performanceRewardsSubmissions); + rewardsCoordinator.createOperatorDirectedOperatorSetRewardsSubmission(operatorSet, performanceRewardsSubmissions); } // Revert when duplicate operators @@ -3138,10 +3138,10 @@ contract RewardsCoordinatorUnitTests_createOperatorSetPerformanceRewardsSubmissi description: "" }); - // 3. call createOperatorSetPerformanceRewardsSubmission() with expected revert + // 3. call createOperatorDirectedOperatorSetRewardsSubmission() with expected revert cheats.prank(avs); cheats.expectRevert(OperatorsNotInAscendingOrder.selector); - rewardsCoordinator.createOperatorSetPerformanceRewardsSubmission(operatorSet, performanceRewardsSubmissions); + rewardsCoordinator.createOperatorDirectedOperatorSetRewardsSubmission(operatorSet, performanceRewardsSubmissions); } // Revert when operator amount is zero @@ -3182,10 +3182,10 @@ contract RewardsCoordinatorUnitTests_createOperatorSetPerformanceRewardsSubmissi description: "" }); - // 3. call createOperatorSetPerformanceRewardsSubmission() with expected revert + // 3. call createOperatorDirectedOperatorSetRewardsSubmission() with expected revert cheats.prank(avs); cheats.expectRevert(AmountIsZero.selector); - rewardsCoordinator.createOperatorSetPerformanceRewardsSubmission(operatorSet, performanceRewardsSubmissions); + rewardsCoordinator.createOperatorDirectedOperatorSetRewardsSubmission(operatorSet, performanceRewardsSubmissions); } // Revert when operator amount is zero @@ -3228,10 +3228,10 @@ contract RewardsCoordinatorUnitTests_createOperatorSetPerformanceRewardsSubmissi description: "" }); - // 3. call createOperatorSetPerformanceRewardsSubmission() with expected revert + // 3. call createOperatorDirectedOperatorSetRewardsSubmission() with expected revert cheats.prank(avs); cheats.expectRevert(AmountExceedsMax.selector); - rewardsCoordinator.createOperatorSetPerformanceRewardsSubmission(operatorSet, performanceRewardsSubmissions); + rewardsCoordinator.createOperatorDirectedOperatorSetRewardsSubmission(operatorSet, performanceRewardsSubmissions); } // Revert with exceeding max duration @@ -3270,10 +3270,10 @@ contract RewardsCoordinatorUnitTests_createOperatorSetPerformanceRewardsSubmissi description: "" }); - // 3. call createOperatorSetPerformanceRewardsSubmission() with expected revert + // 3. call createOperatorDirectedOperatorSetRewardsSubmission() with expected revert cheats.prank(avs); cheats.expectRevert(DurationExceedsMax.selector); - rewardsCoordinator.createOperatorSetPerformanceRewardsSubmission(operatorSet, performanceRewardsSubmissions); + rewardsCoordinator.createOperatorDirectedOperatorSetRewardsSubmission(operatorSet, performanceRewardsSubmissions); } // Revert with invalid interval seconds @@ -3313,10 +3313,10 @@ contract RewardsCoordinatorUnitTests_createOperatorSetPerformanceRewardsSubmissi description: "" }); - // 3. call createOperatorSetPerformanceRewardsSubmission() with expected revert + // 3. call createOperatorDirectedOperatorSetRewardsSubmission() with expected revert cheats.prank(avs); cheats.expectRevert(InvalidDurationRemainder.selector); - rewardsCoordinator.createOperatorSetPerformanceRewardsSubmission(operatorSet, performanceRewardsSubmissions); + rewardsCoordinator.createOperatorDirectedOperatorSetRewardsSubmission(operatorSet, performanceRewardsSubmissions); } // Revert with invalid interval start timestamp @@ -3356,10 +3356,10 @@ contract RewardsCoordinatorUnitTests_createOperatorSetPerformanceRewardsSubmissi description: "" }); - // 3. call createOperatorSetPerformanceRewardsSubmission() with expected revert + // 3. call createOperatorDirectedOperatorSetRewardsSubmission() with expected revert cheats.prank(avs); cheats.expectRevert(InvalidStartTimestampRemainder.selector); - rewardsCoordinator.createOperatorSetPerformanceRewardsSubmission(operatorSet, performanceRewardsSubmissions); + rewardsCoordinator.createOperatorDirectedOperatorSetRewardsSubmission(operatorSet, performanceRewardsSubmissions); } // Revert with retroactive rewards enabled and set too far in past @@ -3396,10 +3396,10 @@ contract RewardsCoordinatorUnitTests_createOperatorSetPerformanceRewardsSubmissi description: "" }); - // 3. call createOperatorSetPerformanceRewardsSubmission() with expected revert + // 3. call createOperatorDirectedOperatorSetRewardsSubmission() with expected revert cheats.prank(avs); cheats.expectRevert(StartTimestampTooFarInPast.selector); - rewardsCoordinator.createOperatorSetPerformanceRewardsSubmission(operatorSet, performanceRewardsSubmissions); + rewardsCoordinator.createOperatorDirectedOperatorSetRewardsSubmission(operatorSet, performanceRewardsSubmissions); } // Revert when not retroactive @@ -3436,10 +3436,10 @@ contract RewardsCoordinatorUnitTests_createOperatorSetPerformanceRewardsSubmissi description: "" }); - // 3. call createOperatorSetPerformanceRewardsSubmission() with expected revert + // 3. call createOperatorDirectedOperatorSetRewardsSubmission() with expected revert cheats.prank(avs); cheats.expectRevert(SubmissionNotRetroactive.selector); - rewardsCoordinator.createOperatorSetPerformanceRewardsSubmission(operatorSet, performanceRewardsSubmissions); + rewardsCoordinator.createOperatorDirectedOperatorSetRewardsSubmission(operatorSet, performanceRewardsSubmissions); } // Revert with non whitelisted strategy @@ -3480,10 +3480,10 @@ contract RewardsCoordinatorUnitTests_createOperatorSetPerformanceRewardsSubmissi description: "" }); - // 3. call createOperatorSetPerformanceRewardsSubmission() with expected revert + // 3. call createOperatorDirectedOperatorSetRewardsSubmission() with expected revert cheats.prank(avs); cheats.expectRevert(StrategyNotWhitelisted.selector); - rewardsCoordinator.createOperatorSetPerformanceRewardsSubmission(operatorSet, performanceRewardsSubmissions); + rewardsCoordinator.createOperatorDirectedOperatorSetRewardsSubmission(operatorSet, performanceRewardsSubmissions); } // Revert when duplicate strategies @@ -3526,10 +3526,10 @@ contract RewardsCoordinatorUnitTests_createOperatorSetPerformanceRewardsSubmissi description: "" }); - // 3. call createOperatorSetPerformanceRewardsSubmission() with expected revert + // 3. call createOperatorDirectedOperatorSetRewardsSubmission() with expected revert cheats.prank(avs); cheats.expectRevert(StrategiesNotInAscendingOrder.selector); - rewardsCoordinator.createOperatorSetPerformanceRewardsSubmission(operatorSet, performanceRewardsSubmissions); + rewardsCoordinator.createOperatorDirectedOperatorSetRewardsSubmission(operatorSet, performanceRewardsSubmissions); } /** @@ -3539,7 +3539,7 @@ contract RewardsCoordinatorUnitTests_createOperatorSetPerformanceRewardsSubmissi * - rewards submission hash being set in storage * - token balance before and after of avs and rewardsCoordinator */ - function testFuzz_createOperatorSetPerformanceRewardsSubmission_SingleSubmission( + function testFuzz_createOperatorDirectedOperatorSetRewardsSubmission_SingleSubmission( address avs, uint256 startTimestamp, uint256 duration @@ -3575,7 +3575,7 @@ contract RewardsCoordinatorUnitTests_createOperatorSetPerformanceRewardsSubmissi description: "" }); - // 3. call createOperatorSetPerformanceRewardsSubmission() with expected event emitted + // 3. call createOperatorDirectedOperatorSetRewardsSubmission() with expected event emitted uint256 avsBalanceBefore = rewardToken.balanceOf(avs); uint256 rewardsCoordinatorBalanceBefore = rewardToken.balanceOf(address(rewardsCoordinator)); @@ -3589,7 +3589,7 @@ contract RewardsCoordinatorUnitTests_createOperatorSetPerformanceRewardsSubmissi emit OperatorDirectedOperatorSetRewardsSubmissionCreated( avs, operatorSet, currSubmissionNonce, rewardsSubmissionHash, performanceRewardsSubmissions[0] ); - rewardsCoordinator.createOperatorSetPerformanceRewardsSubmission(operatorSet, performanceRewardsSubmissions); + rewardsCoordinator.createOperatorDirectedOperatorSetRewardsSubmission(operatorSet, performanceRewardsSubmissions); cheats.stopPrank(); assertTrue( @@ -3616,7 +3616,7 @@ contract RewardsCoordinatorUnitTests_createOperatorSetPerformanceRewardsSubmissi * - rewards submission hash being set in storage * - token balance before and after of avs and rewardsCoordinator */ - function testFuzz_createOperatorSetPerformanceRewardsSubmission_SingleSubmission_UAM( + function testFuzz_createOperatorDirectedOperatorSetRewardsSubmission_SingleSubmission_UAM( address avs, uint256 startTimestamp, uint256 duration @@ -3632,7 +3632,7 @@ contract RewardsCoordinatorUnitTests_createOperatorSetPerformanceRewardsSubmissi avs, defaultAppointee, address(rewardsCoordinator), - IRewardsCoordinator.createOperatorSetPerformanceRewardsSubmission.selector + IRewardsCoordinator.createOperatorDirectedOperatorSetRewardsSubmission.selector ); // 1. Bound fuzz inputs to valid ranges and amounts @@ -3660,7 +3660,7 @@ contract RewardsCoordinatorUnitTests_createOperatorSetPerformanceRewardsSubmissi description: "" }); - // 3. call createOperatorSetPerformanceRewardsSubmission() with expected event emitted + // 3. call createOperatorDirectedOperatorSetRewardsSubmission() with expected event emitted uint256 submitterBalanceBefore = rewardToken.balanceOf(defaultAppointee); uint256 rewardsCoordinatorBalanceBefore = rewardToken.balanceOf(address(rewardsCoordinator)); @@ -3674,7 +3674,7 @@ contract RewardsCoordinatorUnitTests_createOperatorSetPerformanceRewardsSubmissi emit OperatorDirectedOperatorSetRewardsSubmissionCreated( defaultAppointee, operatorSet, currSubmissionNonce, rewardsSubmissionHash, performanceRewardsSubmissions[0] ); - rewardsCoordinator.createOperatorSetPerformanceRewardsSubmission(operatorSet, performanceRewardsSubmissions); + rewardsCoordinator.createOperatorDirectedOperatorSetRewardsSubmission(operatorSet, performanceRewardsSubmissions); cheats.stopPrank(); assertTrue( @@ -3701,7 +3701,7 @@ contract RewardsCoordinatorUnitTests_createOperatorSetPerformanceRewardsSubmissi * - rewards submission hash being set in storage * - token balance before and after of avs and rewardsCoordinator */ - function testFuzz_createOperatorSetPerformanceRewardsSubmission_MultipleSubmissions( + function testFuzz_createOperatorDirectedOperatorSetRewardsSubmission_MultipleSubmissions( FuzzOperatorDirectedAVSRewardsSubmission memory param, uint256 numSubmissions ) public filterFuzzedAddressInputs(param.avs) { @@ -3771,7 +3771,7 @@ contract RewardsCoordinatorUnitTests_createOperatorSetPerformanceRewardsSubmissi // 4. call createAVSRewardsSubmission() cheats.prank(param.avs); - rewardsCoordinator.createOperatorSetPerformanceRewardsSubmission(operatorSet, rewardsSubmissions); + rewardsCoordinator.createOperatorDirectedOperatorSetRewardsSubmission(operatorSet, rewardsSubmissions); // 5. Check for submissionNonce() and rewardsSubmissionHashes being set assertEq(