{
    "Function": "_getLiquidationInfo",
    "File": "contracts/MarginAccount.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": [
        "IOracle",
        "SafeCast"
    ],
    "Internal Calls": [
        "isLiquidatable",
        "require(bool,string)"
    ],
    "Library Calls": [
        "toUint256"
    ],
    "Low-Level Calls": [],
    "Code": "function _getLiquidationInfo(address trader, uint idx) internal view returns (LiquidationBuffer memory buffer) {\n        require(idx > VUSD_IDX && idx < supportedCollateral.length, \"collateral not seizable\");\n        (buffer.status, buffer.repayAble, buffer.incentivePerDollar) = isLiquidatable(trader, false);\n        if (buffer.status == IMarginAccount.LiquidationStatus.IS_LIQUIDATABLE) {\n            Collateral memory coll = supportedCollateral[idx];\n            buffer.priceCollateral = oracle.getUnderlyingPrice(address(coll.token)).toUint256();\n            buffer.decimals = coll.decimals;\n        }\n    }"
}