👻AaveV3Withdraw

Description

Action ID: 0x72a6498a

Withdraw a token from an AaveV3 market

SDK Action

    const aaveWithdrawAction = new dfs.actions.aaveV3.AaveV3WithdrawAction(
        assetId, useDefaultMarket, amount, to, market
    );

Contract

This is a DFS STANDARD_ACTION.

If amount is uint.max withdraws whole amount

Input:

    /// @param assetId The id of the token to be withdrawn
    /// @param useDefaultMarket If true the action will inject aave default market
    /// @param amount Amount of tokens to be withdrawn
    /// @param to Where the withdrawn tokens will be sent
    /// @param market Address provider for specific market
    struct Params {
        uint16 assetId;
        bool useDefaultMarket;
        uint256 amount;
        address to;
        address market;
    }

Return value:

return bytes32(withdrawnAmount);

Events:

bytes memory logData = abi.encode(_market, tokenAddr, _amount, _to);

emit ActionEvent("AaveV3Withdraw", logData);

logger.logActionDirectEvent("AaveV3Withdraw", logData);

Last updated