💲McdSupply

Description

Action ID: 0xa173f4ab

Network mainnet: (Deployed address | Code)

Supply collateral to a Maker vault

SDK Action

    const mcdSupplyAction = new dfs.actions.maker.MakerSupplyAction(
        vaultId,
        amount,
        joinAddr,
        from,
        mcdManager,
    );

Contract

This is a DFS STANDARD_ACTION.

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

If amount = uint.max this will pull and supply whole balance

Input:

    /// @param vaultId Id of the vault
    /// @param amount Amount of tokens to supply
    /// @param joinAddr Join address of the maker collateral
    /// @param from Address where to pull the collateral from
    /// @param mcdManager The manager address we are using [mcd, b.protocol]
    struct Params {
        uint256 vaultId;
        uint256 amount;
        address joinAddr;
        address from;
        address mcdManager;
    }

Return value:

return bytes32(returnAmount);

Events:

emit ActionEvent("McdSupply", logData);

logger.logActionDirectEvent("McdSupply", logData);

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

Last updated