{
    "Function": "_getNewTCRFromTroveChange",
    "File": "contracts/src/BorrowerOperations.sol",
    "Parent Contracts": [
        "contracts/src/Interfaces/IBorrowerOperations.sol",
        "contracts/src/Dependencies/AddRemoveManagers.sol",
        "contracts/src/Interfaces/IAddRemoveManagers.sol",
        "contracts/src/Dependencies/LiquityBase.sol",
        "contracts/src/Interfaces/ILiquityBase.sol"
    ],
    "High-Level Calls": [
        "LiquityMath"
    ],
    "Internal Calls": [
        "getEntireBranchDebt",
        "getEntireBranchColl"
    ],
    "Library Calls": [
        "_computeCR"
    ],
    "Low-Level Calls": [],
    "Code": "function _getNewTCRFromTroveChange(\n        TroveChange memory _troveChange,\n        uint256 _price\n    ) internal view returns (uint256 newTCR) {\n        uint256 totalColl = getEntireBranchColl();\n        totalColl += _troveChange.collIncrease;\n        totalColl -= _troveChange.collDecrease;\n\n        uint256 totalDebt = getEntireBranchDebt();\n        totalDebt += _troveChange.debtIncrease;\n        totalDebt += _troveChange.upfrontFee;\n        totalDebt -= _troveChange.debtDecrease;\n\n        newTCR = LiquityMath._computeCR(totalColl, totalDebt, _price);\n    }"
}