Skip to content

Commit 7ffe671

Browse files
committed
test: setClaimer
1 parent 6843229 commit 7ffe671

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

test/unit/ServiceManagerBase.t.sol

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,33 @@ contract ServiceManagerBase_UnitTests is
658658
cheats.prank(caller);
659659
serviceManager.setRewardsInitiator(newRewardsInitiator);
660660
}
661+
662+
function testFuzz_setClaimerFor(address claimer) public {
663+
cheats.startPrank(serviceManagerOwner);
664+
cheats.expectEmit(true, true, true, true, address(rewardsCoordinator));
665+
emit ClaimerForSet(
666+
address(serviceManager),
667+
rewardsCoordinator.claimerFor(address(serviceManager)),
668+
claimer
669+
);
670+
serviceManager.setClaimerFor(claimer);
671+
assertEq(
672+
claimer,
673+
rewardsCoordinator.claimerFor(address(serviceManager)),
674+
"claimerFor not set"
675+
);
676+
cheats.stopPrank();
677+
}
678+
679+
function testFuzz_setClaimerFor_revert_notOwner(
680+
address caller,
681+
address claimer
682+
) public filterFuzzedAddressInputs(caller) {
683+
cheats.assume(caller != serviceManagerOwner);
684+
cheats.prank(caller);
685+
cheats.expectRevert("Ownable: caller is not the owner");
686+
serviceManager.setClaimerFor(claimer);
687+
}
661688
}
662689

663690
contract ServiceManagerBase_createOperatorDirectedAVSRewardsSubmission is

0 commit comments

Comments
 (0)