Skip to content

Commit 30eddf0

Browse files
committed
feat: Bump revision to 3 of AaveIncentivesController initializable contract
1 parent 26253a4 commit 30eddf0

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

contracts/stake/AaveIncentivesController.sol

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ contract AaveIncentivesController is
2525
RoleManager
2626
{
2727
using SafeMath for uint256;
28-
uint256 public constant REVISION = 2;
28+
uint256 public constant REVISION = 3;
2929

30-
address public override immutable REWARD_TOKEN;
30+
address public immutable override REWARD_TOKEN;
3131
address internal _rewardsVault;
3232

3333
mapping(address => uint256) internal _usersUnclaimedRewards;
@@ -42,20 +42,18 @@ contract AaveIncentivesController is
4242
}
4343
event RewardsVaultUpdated(address indexed vault);
4444

45-
constructor(
46-
IERC20 rewardToken,
47-
address emissionManager
48-
) public AaveDistributionManagerV2(emissionManager) {
45+
constructor(IERC20 rewardToken, address emissionManager)
46+
public
47+
AaveDistributionManagerV2(emissionManager)
48+
{
4949
REWARD_TOKEN = address(rewardToken);
5050
}
5151

5252
/**
5353
* @dev Initialize AaveIncentivesController
5454
* @param rewardsVault rewards vault to pull funds
5555
**/
56-
function initialize(
57-
address rewardsVault
58-
) external initializer {
56+
function initialize(address rewardsVault) external initializer {
5957
_rewardsVault = rewardsVault;
6058
}
6159

@@ -80,7 +78,7 @@ contract AaveIncentivesController is
8078
}
8179
_configureAssets(assetsConfig);
8280
}
83-
81+
8482
/// @inheritdoc IAaveIncentivesController
8583
function setClaimer(address user, address caller) external override onlyEmissionManager {
8684
_authorizedClaimers[user] = caller;
@@ -125,7 +123,7 @@ contract AaveIncentivesController is
125123
return unclaimedRewards;
126124
}
127125

128-
/// @inheritdoc IAaveIncentivesController
126+
/// @inheritdoc IAaveIncentivesController
129127
function claimRewards(
130128
address[] calldata assets,
131129
uint256 amount,
@@ -148,7 +146,7 @@ contract AaveIncentivesController is
148146
}
149147

150148
/// @inheritdoc IAaveIncentivesController
151-
function getUserUnclaimedRewards(address _user) external override view returns (uint256) {
149+
function getUserUnclaimedRewards(address _user) external view override returns (uint256) {
152150
return _usersUnclaimedRewards[_user];
153151
}
154152

@@ -217,10 +215,9 @@ contract AaveIncentivesController is
217215
_usersUnclaimedRewards[user] = unclaimedRewards - amountToClaim; // Safe due to the previous line
218216

219217
IERC20(REWARD_TOKEN).transferFrom(_rewardsVault, to, amountToClaim);
220-
218+
221219
emit RewardsClaimed(claimer, user, to, amountToClaim);
222220

223221
return amountToClaim;
224222
}
225-
226223
}

0 commit comments

Comments
 (0)