Skip to content

Commit

Permalink
add natspec and use()
Browse files Browse the repository at this point in the history
  • Loading branch information
haythemsellami committed Jun 19, 2024
1 parent de41b89 commit d864756
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/AggregationLayerVault.sol
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,20 @@ contract AggregationLayerVault is
use(MODULE_REWARDS)
{}

function enableRewardForStrategy(address _strategy, address _reward)
external
override
onlyRole(AGGREGATION_VAULT_MANAGER)
use(MODULE_REWARDS)
{}

function disableRewardForStrategy(address _strategy, address _reward, bool _forfeitRecentReward)
external
override
onlyRole(AGGREGATION_VAULT_MANAGER)
use(MODULE_REWARDS)
{}

/// @notice Claim a specific strategy rewards
/// @param _strategy Strategy address.
/// @param _reward The address of the reward token.
Expand Down
7 changes: 7 additions & 0 deletions src/module/Rewards.sol
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ abstract contract RewardsModule is IBalanceForwarder, Shared {
emit EventsLib.OptOutStrategyRewards(_strategy);
}

/// @notice Enable aggregation layer vault rewards for specific strategy's reward token.
/// @param _strategy Strategy address.
/// @param _reward Reward token address.
function enableRewardForStrategy(address _strategy, address _reward) external virtual nonReentrant {
AggregationVaultStorage storage $ = StorageLib._getAggregationVaultStorage();

Expand All @@ -49,6 +52,10 @@ abstract contract RewardsModule is IBalanceForwarder, Shared {
emit EventsLib.EnableRewardForStrategy(_strategy, _reward);
}

/// @notice Disable aggregation layer vault rewards for specific strategy's reward token.
/// @param _strategy Strategy address.
/// @param _reward Reward token address.
/// @param _forfeitRecentReward Whether to forfeit the recent rewards or not.
function disableRewardForStrategy(address _strategy, address _reward, bool _forfeitRecentReward)
external
virtual
Expand Down

0 comments on commit d864756

Please sign in to comment.