@@ -445,6 +445,12 @@ contract RewardsCoordinatorUnitTests_initializeAndSetters is RewardsCoordinatorU
445445 cheats.expectRevert ("Ownable: caller is not the owner " );
446446 rewardsCoordinator.setFeeRecipient (newFeeRecipient);
447447 }
448+
449+ function test_setFeeRecipient_Revert_WhenAddressZero () public {
450+ cheats.prank (rewardsCoordinator.owner ());
451+ cheats.expectRevert (InvalidAddressZero.selector );
452+ rewardsCoordinator.setFeeRecipient (address (0 ));
453+ }
448454}
449455
450456contract RewardsCoordinatorUnitTests_setOptInForProtocolFee is RewardsCoordinatorUnitTests {
@@ -1540,61 +1546,6 @@ contract RewardsCoordinatorUnitTests_createAVSRewardsSubmission is RewardsCoordi
15401546 assertEq (rewardToken.balanceOf (feeRecipient), feeBalanceBefore, "Fee recipient balance should not change " );
15411547 }
15421548 }
1543-
1544- /// @notice Test fee deduction when fee recipient is address(0)
1545- function testFuzz_createAVSRewardsSubmission_WithProtocolFee_FeeRecipientZero (
1546- address avs ,
1547- uint startTimestamp ,
1548- uint duration ,
1549- uint amount
1550- ) public filterFuzzedAddressInputs (avs) {
1551- cheats.assume (avs != address (0 ));
1552-
1553- // 1. Set fee recipient to address(0)
1554- cheats.prank (rewardsCoordinator.owner ());
1555- rewardsCoordinator.setFeeRecipient (address (0 ));
1556-
1557- // 2. Bound fuzz inputs to valid ranges and amounts
1558- IERC20 rewardToken = new ERC20PresetFixedSupply ("dog wif hat " , "MOCK1 " , mockTokenInitialSupply, avs);
1559- amount = bound (amount, 1 , mockTokenInitialSupply);
1560- duration = bound (duration, CALCULATION_INTERVAL_SECONDS, MAX_REWARDS_DURATION);
1561- duration = duration - (duration % CALCULATION_INTERVAL_SECONDS);
1562- startTimestamp = bound (
1563- startTimestamp,
1564- uint (_maxTimestamp (GENESIS_REWARDS_TIMESTAMP, uint32 (block .timestamp ) - MAX_RETROACTIVE_LENGTH)) + CALCULATION_INTERVAL_SECONDS
1565- - 1 ,
1566- block .timestamp + uint (MAX_FUTURE_LENGTH)
1567- );
1568- startTimestamp = startTimestamp - (startTimestamp % CALCULATION_INTERVAL_SECONDS);
1569-
1570- // 3. Opt in for protocol fees
1571- cheats.prank (avs);
1572- rewardsCoordinator.setOptInForProtocolFee (avs, true );
1573-
1574- // 4. Create rewards submission and verify balances
1575- RewardsSubmission[] memory rewardsSubmissions = new RewardsSubmission [](1 );
1576- rewardsSubmissions[0 ] = RewardsSubmission ({
1577- strategiesAndMultipliers: defaultStrategyAndMultipliers,
1578- token: rewardToken,
1579- amount: amount,
1580- startTimestamp: uint32 (startTimestamp),
1581- duration: uint32 (duration)
1582- });
1583-
1584- {
1585- uint avsBalanceBefore = rewardToken.balanceOf (avs);
1586- uint rcBalanceBefore = rewardToken.balanceOf (address (rewardsCoordinator));
1587-
1588- cheats.startPrank (avs);
1589- rewardToken.approve (address (rewardsCoordinator), amount);
1590- rewardsCoordinator.createAVSRewardsSubmission (rewardsSubmissions);
1591- cheats.stopPrank ();
1592-
1593- // Verify balances - no fee transferred when feeRecipient is address(0)
1594- assertEq (rewardToken.balanceOf (avs), avsBalanceBefore - amount, "AVS balance incorrect " );
1595- assertEq (rewardToken.balanceOf (address (rewardsCoordinator)), rcBalanceBefore + amount, "RC balance incorrect " );
1596- }
1597- }
15981549}
15991550
16001551contract RewardsCoordinatorUnitTests_createRewardsForAllSubmission is RewardsCoordinatorUnitTests {
0 commit comments