💲McdGenerate

Description

Action ID: 0xad463b00

Network mainnet: (Deployed address | Code)

Generate Dai from a Maker Vault

SDK Action

    const mcdGenerateAction = new dfs.actions.maker.MakerGenerateAction(
        vaultId,
        amount,
        to,
        mcdManager,
    );

Contract

This is a DFS STANDARD_ACTION.

Input:

    /// @param vaultId Id of the vault
    /// @param amount Amount of DAI to generate as debt
    /// @param to The address to receive generated DAI
    /// @param mcdManager The manager address we are using [mcd, b.protocol]
    struct Params {
        uint256 vaultId;
        uint256 amount;
        address to;
        address mcdManager;
    }

Return value:

return bytes32(borrowedAmount);

Events:

emit ActionEvent("McdGenerate", logData);

logger.logActionDirectEvent("McdGenerate", logData);

bytes memory logData = abi.encode(_vaultId, _amount, _to, _mcdManager)

Last updated