👻AaveCollateralSwitch

Switch to enable/disable tokens to be used as collateral in AaveV2.

Description

Action ID: 0xa8af8b82

Switch to enable/disable tokens to be used as collateral in AaveV2.

SDK Action

const aaveSetAsCollateral = new dfs.actions.aave.AaveCollateralSwitchAction(
    aave_market,
    [UNI_ADDR, WETH_ADDRESS, DAI_ADDR],
    [true, true, true],
);

Contract

This is a DFS STANDARD_ACTION.

For the action to work tokens.length == useAsCollateral.length, contract doesn't enforce this

Input:

    /// @param market Address provider for specific market
    /// @param tokens Array of tokens the user wants to set coll enable/disable
    /// @param useAsCollateral Array of states for the tokens
    struct Params {
        address market;
        address[] tokens;
        bool[] useAsCollateral;
    }

Return value:

return bytes32(0); // empty return value

Events:

// No Events are emited for this action

Last updated