{
    "Function": "handleExecutedCollectInvest",
    "File": "src/InvestmentManager.sol",
    "Parent Contracts": [
        "src/util/Auth.sol"
    ],
    "High-Level Calls": [
        "PoolManagerLike",
        "LiquidityPoolLike",
        "PoolManagerLike"
    ],
    "Internal Calls": [
        "onlyGateway",
        "require(bool,string)",
        "require(bool,string)",
        "_updateLiquidityPoolPrice"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function handleExecutedCollectInvest(\n        uint64 poolId,\n        bytes16 trancheId,\n        address recipient,\n        uint128 currency,\n        uint128 currencyPayout,\n        uint128 trancheTokensPayout\n    ) public onlyGateway {\n        require(currencyPayout != 0, \"InvestmentManager/zero-invest\");\n        address _currency = poolManager.currencyIdToAddress(currency);\n        address liquidityPool = poolManager.getLiquidityPool(poolId, trancheId, _currency);\n        require(liquidityPool != address(0), \"InvestmentManager/tranche-does-not-exist\");\n\n        LPValues storage lpValues = orderbook[recipient][liquidityPool];\n        lpValues.maxDeposit = lpValues.maxDeposit + currencyPayout;\n        lpValues.maxMint = lpValues.maxMint + trancheTokensPayout;\n\n        LiquidityPoolLike(liquidityPool).mint(address(escrow), trancheTokensPayout); // mint to escrow. Recepeint can claim by calling withdraw / redeem\n        _updateLiquidityPoolPrice(liquidityPool, currencyPayout, trancheTokensPayout);\n    }"
}