mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
Update claim
This commit is contained in:
parent
51a324473a
commit
1ad2361789
|
@ -4,7 +4,6 @@ contract Events {
|
|||
event LogClaimed(
|
||||
address[] assets,
|
||||
uint256 amt,
|
||||
bool stake,
|
||||
uint256 getId,
|
||||
uint256 setId
|
||||
);
|
||||
|
|
|
@ -4,7 +4,6 @@ interface AaveIncentivesInterface {
|
|||
function claimRewards(
|
||||
address[] calldata assets,
|
||||
uint256 amount,
|
||||
address to,
|
||||
bool stake
|
||||
address to
|
||||
) external returns (uint256);
|
||||
}
|
|
@ -12,14 +12,12 @@ abstract contract IncentivesResolver is Helpers, Events {
|
|||
* @notice Claim Pending Rewards from Aave incentives contract.
|
||||
* @param assets The list of assets supplied and borrowed.
|
||||
* @param amt The amount of reward to claim. (uint(-1) for max)
|
||||
* @param stake Whether to stake the claimed rewards or not.
|
||||
* @param getId ID to retrieve amt.
|
||||
* @param setId ID stores the amount of rewards claimed.
|
||||
*/
|
||||
function claim(
|
||||
address[] calldata assets,
|
||||
uint256 amt,
|
||||
bool stake,
|
||||
uint256 getId,
|
||||
uint256 setId
|
||||
) external payable returns (string memory _eventName, bytes memory _eventParam) {
|
||||
|
@ -27,12 +25,12 @@ abstract contract IncentivesResolver is Helpers, Events {
|
|||
|
||||
require(assets.length > 0, "invalid-assets");
|
||||
|
||||
_amt = incentives.claimRewards(assets, _amt, address(this), stake);
|
||||
_amt = incentives.claimRewards(assets, _amt, address(this));
|
||||
|
||||
setUint(setId, _amt);
|
||||
|
||||
_eventName = "LogClaimed(address[],uint256,bool,uint256,uint256)";
|
||||
_eventParam = abi.encode(assets, _amt, stake, getId, setId);
|
||||
_eventName = "LogClaimed(address[],uint256,uint256,uint256)";
|
||||
_eventParam = abi.encode(assets, _amt, getId, setId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user