💲McdPayback

Description

Action ID: 0x43b7daec

Network mainnet: (Deployed address | Code)

Payback dai debt for a Maker vault

SDK Action

    const mcdPaybackAction = new dfs.actions.maker.MakerPaybackAction(
        vaultId,
        amount,
        from,
        mcdManager,
    );

Contract

This is a DFS STANDARD_ACTION.

The address from which we are pulling DAI must approve proxy to pull tokens

If amount = uint.max this will repay all debt

Input:

    /// @param vaultId Id of the vault
    /// @param amount Amount of dai to be paid back
    /// @param from The address from which we are pulling DAI from
    /// @param mcdManager The manager address we are using [mcd, b.protocol]
    struct Params {
        uint256 vaultId;
        uint256 amount;
        address from;
        address mcdManager;
    }

Return value:

return bytes32(inputData.amount);

Events:

bytes memory logData = _mcdPayback(inputData)

emit ActionEvent("McdPayback", logData);

bytes memory logData = _mcdPayback(inputData)

logger.logActionDirectEvent("McdPayback", logData);

Last updated