👻AaveV3CollateralSwitch

Description

Action ID: 0xbffa4e35

Switch if you'll use tokens for collateral on AaveV3 for a market.

SDK Action

    const aaveSwithCollAction = new dfs.actions.aaveV3.AaveV3CollateralSwitchAction(
        true, useDefaultMarket, arrayLength, tokens, useAsCollateral,
    );

Contract

This is a DFS STANDARD_ACTION.

arrayLength must be == assetIds.length or the tx reverts

arrayLength must be == useAsCollateral.length or the tx reverts

Input:

    /// @param arrayLength Number of assetIDs sent in the assetIds array (needed for encoding)
    /// @param useDefaultMarket If true the action will inject aave default market
    /// @param assetIds Array of assetIds (each asset in aave has an unique id)
    /// @param useAsCollateral Array of booleans true - enable as collateral, false - disable
    /// @param market Address provider for specific market
    struct Params {
        uint8 arrayLength;
        bool useDefaultMarket;
        uint16[] assetIds;
        bool[] useAsCollateral;
        address market;
    }

Return value:

return bytes32(0);

Events:

emit ActionEvent("AaveV3CollateralSwitch", logData);

logger.logActionDirectEvent("AaveV3CollateralSwitch", logData);

bytes memory logData = abi.encode(_inputData)

Last updated