{
    "Function": "addLiquidity",
    "File": "contracts/ClearingHouse.sol",
    "Parent Contracts": [
        "contracts/legos/HubbleBase.sol",
        "node_modules/@openzeppelin/contracts/metatx/ERC2771Context.sol",
        "node_modules/@openzeppelin/contracts/security/Pausable.sol",
        "node_modules/@openzeppelin/contracts/utils/Context.sol",
        "contracts/legos/Governable.sol",
        "node_modules/@openzeppelin/contracts/proxy/utils/Initializable.sol",
        "contracts/legos/Governable.sol",
        "contracts/Interfaces.sol"
    ],
    "High-Level Calls": [
        "IAMM"
    ],
    "Internal Calls": [
        "updatePositions",
        "require(bool,string)",
        "_msgSender",
        "isAboveMinAllowableMargin",
        "whenNotPaused"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function addLiquidity(uint idx, uint256 baseAssetQuantity, uint minDToken) override external whenNotPaused {\n        address maker = _msgSender();\n        updatePositions(maker);\n        amms[idx].addLiquidity(maker, baseAssetQuantity, minDToken);\n        require(isAboveMinAllowableMargin(maker), \"CH: Below Minimum Allowable Margin\");\n    }"
}