{
    "Function": "processMint",
    "File": "src/InvestmentManager.sol",
    "Parent Contracts": [
        "src/util/Auth.sol"
    ],
    "High-Level Calls": [],
    "Internal Calls": [
        "_deposit",
        "auth",
        "_calculateCurrencyAmount",
        "calculateDepositPrice",
        "require(bool,string)",
        "require(bool,string)",
        "_toUint128"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function processMint(address user, uint256 trancheTokenAmount) public auth returns (uint256 currencyAmount) {\n        address liquidityPool = msg.sender;\n        uint128 _trancheTokenAmount = _toUint128(trancheTokenAmount);\n        require(\n            (_trancheTokenAmount <= orderbook[user][liquidityPool].maxMint && _trancheTokenAmount != 0),\n            \"InvestmentManager/amount-exceeds-mint-limits\"\n        );\n\n        uint256 depositPrice = calculateDepositPrice(user, liquidityPool);\n        require(depositPrice != 0, \"LiquidityPool/deposit-token-price-0\");\n\n        uint128 _currencyAmount = _calculateCurrencyAmount(_trancheTokenAmount, liquidityPool, depositPrice);\n        _deposit(_trancheTokenAmount, _currencyAmount, liquidityPool, user);\n        currencyAmount = uint256(_currencyAmount);\n    }"
}