@@ -427,7 +427,7 @@ contract RewardsCoordinatorUnitTests_setOperatorAVSSplit is RewardsCoordinatorUn
427427 split = uint16 (bound (split, ONE_HUNDRED_IN_BIPS + 1 , type (uint16 ).max));
428428
429429 cheats.prank (operator);
430- cheats.expectRevert ("RewardsCoordinator.setOperatorAVSSplit : split must be <= 10000 bips " );
430+ cheats.expectRevert ("RewardsCoordinator._setOperatorSplit : split must be <= 10000 bips " );
431431 rewardsCoordinator.setOperatorAVSSplit (operator, avs, split);
432432 }
433433
@@ -461,14 +461,28 @@ contract RewardsCoordinatorUnitTests_setOperatorAVSSplit is RewardsCoordinatorUn
461461 split = uint16 (bound (split, 0 , ONE_HUNDRED_IN_BIPS));
462462 uint32 activatedAt = uint32 (block .timestamp ) + activationDelay;
463463 uint16 oldSplit = rewardsCoordinator.getOperatorAVSSplit (operator, avs);
464- assertEq (oldSplit, defaultSplitBips, "Operator split is not Default split before Initialization " );
464+ // Check that the split returns the default split before initialization for the first time.
465+ assertEq (
466+ oldSplit,
467+ rewardsCoordinator.defaultOperatorSplitBips (),
468+ "Operator split is not Default split before Initialization "
469+ );
465470
466471 cheats.expectEmit (true , true , true , true , address (rewardsCoordinator));
467472 emit OperatorAVSSplitBipsSet (operator, operator, avs, activatedAt, oldSplit, split);
468473 cheats.prank (operator);
469474 rewardsCoordinator.setOperatorAVSSplit (operator, avs, split);
470475
471- assertEq (oldSplit, rewardsCoordinator.getOperatorAVSSplit (operator, avs), "Incorrect Operator split " );
476+ cheats.prank (address (this )); // Owner of RewardsCoordinator
477+ // Change default split to check if it is returned before activation
478+ rewardsCoordinator.setDefaultOperatorSplit (5000 );
479+ // Check that the split returns the default split before activation for the first time.
480+ assertEq (
481+ rewardsCoordinator.defaultOperatorSplitBips (),
482+ rewardsCoordinator.getOperatorAVSSplit (operator, avs),
483+ "Operator split is not Default split before Activation for first time "
484+ );
485+
472486 cheats.warp (activatedAt);
473487 assertEq (split, rewardsCoordinator.getOperatorAVSSplit (operator, avs), "Incorrect Operator split " );
474488 }
@@ -566,7 +580,7 @@ contract RewardsCoordinatorUnitTests_setOperatorPISplit is RewardsCoordinatorUni
566580 split = uint16 (bound (split, ONE_HUNDRED_IN_BIPS + 1 , type (uint16 ).max));
567581
568582 cheats.prank (operator);
569- cheats.expectRevert ("RewardsCoordinator.setOperatorPISplit : split must be <= 10000 bips " );
583+ cheats.expectRevert ("RewardsCoordinator._setOperatorSplit : split must be <= 10000 bips " );
570584 rewardsCoordinator.setOperatorPISplit (operator, split);
571585 }
572586
@@ -595,14 +609,28 @@ contract RewardsCoordinatorUnitTests_setOperatorPISplit is RewardsCoordinatorUni
595609 split = uint16 (bound (split, 0 , ONE_HUNDRED_IN_BIPS));
596610 uint32 activatedAt = uint32 (block .timestamp ) + activationDelay;
597611 uint16 oldSplit = rewardsCoordinator.getOperatorPISplit (operator);
598- assertEq (oldSplit, defaultSplitBips, "Operator split is not Default split before Initialization " );
612+ // Check that the split returns the default split before initialization for the first time.
613+ assertEq (
614+ oldSplit,
615+ rewardsCoordinator.defaultOperatorSplitBips (),
616+ "Operator split is not Default split before Initialization "
617+ );
599618
600619 cheats.expectEmit (true , true , true , true , address (rewardsCoordinator));
601620 emit OperatorPISplitBipsSet (operator, operator, activatedAt, oldSplit, split);
602621 cheats.prank (operator);
603622 rewardsCoordinator.setOperatorPISplit (operator, split);
604623
605- assertEq (oldSplit, rewardsCoordinator.getOperatorPISplit (operator), "Incorrect Operator split " );
624+ cheats.prank (address (this )); // Owner of RewardsCoordinator
625+ // Change default split to check if it is returned before activation
626+ rewardsCoordinator.setDefaultOperatorSplit (5000 );
627+ // Check that the split returns the default split before activation for the first time.
628+ assertEq (
629+ rewardsCoordinator.defaultOperatorSplitBips (),
630+ rewardsCoordinator.getOperatorPISplit (operator),
631+ "Operator split is not Default split before Activation for first time "
632+ );
633+
606634 cheats.warp (activatedAt);
607635 assertEq (split, rewardsCoordinator.getOperatorPISplit (operator), "Incorrect Operator split " );
608636 }
0 commit comments