{
    "Function": "withdrawLiquidity",
    "File": "contracts/LaunchEvent.sol",
    "Parent Contracts": [
        "node_modules/@openzeppelin/contracts/access/Ownable.sol",
        "node_modules/@openzeppelin/contracts/utils/Context.sol"
    ],
    "High-Level Calls": [
        "IERC20Metadata",
        "IJoePair"
    ],
    "Internal Calls": [
        "pairBalance",
        "require(bool,string)",
        "require(bool,string)",
        "isStopped",
        "timelockElapsed"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function withdrawLiquidity() external isStopped(false) timelockElapsed {\n        require(address(pair) != address(0), \"LaunchEvent: pair not created\");\n\n        UserInfo storage user = getUserInfo[msg.sender];\n        require(\n            !user.hasWithdrawnPair,\n            \"LaunchEvent: liquidity already withdrawn\"\n        );\n\n        uint256 balance = pairBalance(msg.sender);\n        user.hasWithdrawnPair = true;\n\n        if (msg.sender == issuer) {\n            balance = lpSupply / 2;\n\n            emit IssuerLiquidityWithdrawn(msg.sender, address(pair), balance);\n\n            if (tokenReserve > 0) {\n                uint256 amount = tokenReserve;\n                tokenReserve = 0;\n                token.transfer(msg.sender, amount);\n            }\n        } else {\n            emit UserLiquidityWithdrawn(msg.sender, address(pair), balance);\n        }\n\n        pair.transfer(msg.sender, balance);\n    }"
}