👻AaveV3ClaimRewards

Description

Action ID: 0x3c4556e9

Claims single reward type specified by reward for the list of assets. Rewards are received by _to address.

SDK Action

    const aaveClaimRewardsAction = new dfs.actions.aaveV3.AaveV3ClaimRewardsAction(
        assets.length,
        amount,
        to,
        rewardsAsset,
        assets,
    );

Contract

This is a DFS STANDARD_ACTION.

assetsLength must be === assets.length or the action reverts

Input:

    /// @param assetsLength Number of assets sent in the assets array (needed for encoding)
    /// @param amount Amount of reward to claim
    /// @param to The address we are sending the claimed tokens to
    /// @param reward Token address of the reward token (stkAave)
    /// @param assets Array of assets the user is into to
    struct Params {
        uint8 assetsLength;
        uint256 amount;
        address to;
        address reward;
        address[] assets;
    }

Return value:

return bytes32(amountReceived);

Events:

emit ActionEvent("AaveV3ClaimRewards", logData);

logger.logActionDirectEvent("AaveV3ClaimRewards", logData);

bytes memory logData = abi.encode(params, amountReceived)

Last updated