@@ -33,22 +33,13 @@ contract ATokenVaultMerklRewardClaimer is ATokenVault, IATokenVaultMerklRewardCl
3333 onlyOwner
3434 {
3535 require (_s.merklDistributor != address (0 ), "MERKL_DISTRIBUTOR_NOT_SET " );
36+ require (rewardTokens.length == amounts.length && rewardTokens.length == proofs.length , "ARRAY_LENGTH_MISMATCH " );
3637
3738 address [] memory users = new address [](rewardTokens.length );
3839 for (uint256 i = 0 ; i < rewardTokens.length ; i++ ) {
39- // users represent depositors into Aave which is this contract
4040 users[i] = address (this );
4141 }
42-
43- // The claim function does not return a list of tokens and amounts actually received.
44- // It is possible for rewards to be in aTokens, the underlying asset or some other token.
45- // If necessary the owner can use IATokenVault.emergencyRescue(...) to rescue the non-aToken rewards and non-native rewards.
4642 IMerklDistributor (_s.merklDistributor).claim (users, rewardTokens, amounts, proofs);
47- // Do not attempt to accrue yield as it can be delegated to subsequent calls to this contract.
48- // We do not need to accrue before claiming because new shares are not granted anywhere (rewards are socialized across all current share holders).
49- // We do not need to accrue after claiming because any subsequent call will trigger an accrual before state updates
50- // and preview functions read the balance of aTokens on the vault at runtime.
51-
5243 emit MerklRewardsClaimed (_s.merklDistributor, rewardTokens, amounts);
5344 }
5445
@@ -60,14 +51,6 @@ contract ATokenVaultMerklRewardClaimer is ATokenVault, IATokenVaultMerklRewardCl
6051 emit MerklDistributorUpdated (currentMerklDistributor, merklDistributor);
6152 }
6253
63- /// @inheritdoc IATokenVaultMerklRewardClaimer
64- function toggleOperator (address operator ) external override onlyOwner {
65- require (_s.merklDistributor != address (0 ), "MERKL_DISTRIBUTOR_NOT_SET " );
66- require (operator != address (0 ), "ZERO_ADDRESS_NOT_VALID " );
67- IMerklDistributor (_s.merklDistributor).toggleOperator (address (this ), operator);
68- emit MerklRewardsOperatorToggled (_s.merklDistributor, operator);
69- }
70-
7154 /// @inheritdoc IATokenVaultMerklRewardClaimer
7255 function getMerklDistributor () external view override returns (address ) {
7356 return _s.merklDistributor;
0 commit comments