From a63374cc5baa4de0f09ead98d78128a2e1fdd6a2 Mon Sep 17 00:00:00 2001 From: Ana Julia Date: Tue, 20 Aug 2024 20:04:29 -0300 Subject: [PATCH] public > external --- src/RewardsDistributor.sol | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/RewardsDistributor.sol b/src/RewardsDistributor.sol index bfc7282..3f8785a 100644 --- a/src/RewardsDistributor.sol +++ b/src/RewardsDistributor.sol @@ -74,7 +74,7 @@ contract RewardsDistributor is Ownable, IRewardsDistributor { /// @notice Distribute rewards to receiver /// Caller must be the receiver - function collectRewards() public override returns (uint256 rewards) { + function collectRewards() external override returns (uint256 rewards) { RewardConfiguration storage rewardConfiguration = rewardConfigurations[ msg.sender ]; @@ -139,7 +139,7 @@ contract RewardsDistributor is Ownable, IRewardsDistributor { function setRewardConfiguration( address receiver, uint256 emissionRate - ) public override onlyOwner { + ) external override onlyOwner { require(receiver != address(0), ZeroAddress()); // to remove a rewards, it should call removeRewardConfiguration @@ -162,7 +162,7 @@ contract RewardsDistributor is Ownable, IRewardsDistributor { /// @param receiver The receiver of the rewards function removeRewardConfiguration( address receiver - ) public override onlyOwner { + ) external override onlyOwner { rewardConfigurations[receiver].lastUpdate = 0; rewardConfigurations[receiver].emissionRate = 0; @@ -171,7 +171,7 @@ contract RewardsDistributor is Ownable, IRewardsDistributor { /// @notice Set the reward token /// @param _rewardToken The reward token - function setRewardToken(address _rewardToken) public override onlyOwner { + function setRewardToken(address _rewardToken) external override onlyOwner { require(_rewardToken != address(0), ZeroAddress()); // withdraw remaining old reward token