Skip to content

Commit 324d0c3

Browse files
feat: Return addresses and amounts of claimed rewards
1 parent dc25b5a commit 324d0c3

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/ATokenVault.sol

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ contract ATokenVault is ERC4626Upgradeable, OwnableUpgradeable, EIP712Upgradeabl
431431
}
432432

433433
/// @inheritdoc IATokenVault
434-
function claimRewards(address to) public override onlyOwner {
434+
function claimRewards(address to) public override onlyOwner returns (address[] memory, uint256[] memory) {
435435
require(to != address(0), "CANNOT_CLAIM_TO_ZERO_ADDRESS");
436436

437437
address[] memory assets = new address[](1);
@@ -441,6 +441,8 @@ contract ATokenVault is ERC4626Upgradeable, OwnableUpgradeable, EIP712Upgradeabl
441441
).claimAllRewards(assets, to);
442442

443443
emit RewardsClaimed(to, rewardsList, claimedAmounts);
444+
445+
return (rewardsList, claimedAmounts);
444446
}
445447

446448
/// @inheritdoc IATokenVault

src/interfaces/IATokenVault.sol

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,10 @@ interface IATokenVault is IERC4626Upgradeable {
394394
* @notice Claims any additional Aave rewards earned from vault deposits.
395395
* @dev Only callable by the owner
396396
* @param to The address to receive any rewards tokens
397+
* @return The list of addresses of the rewards that have been claimed
398+
* @return The list of amounts of rewards that have been claimed
397399
*/
398-
function claimRewards(address to) external;
400+
function claimRewards(address to) external returns (address[] memory, uint256[] memory);
399401

400402
/**
401403
* @notice Rescue any tokens other than the vault's aToken which may have accidentally been transferred to this

0 commit comments

Comments
 (0)