{
    "Function": "withdraw",
    "File": "src/contracts/strategies/StrategyWrapper.sol",
    "Parent Contracts": [
        "src/contracts/interfaces/IStrategy.sol"
    ],
    "High-Level Calls": [
        "SafeERC20"
    ],
    "Internal Calls": [
        "require(bool,string)",
        "require(bool,string)",
        "onlyStrategyManager"
    ],
    "Library Calls": [
        "safeTransfer"
    ],
    "Low-Level Calls": [],
    "Code": "function withdraw(address depositor, IERC20 token, uint256 amountShares)\n        external\n        override\n        onlyStrategyManager\n    {\n        require(token == underlyingToken, \"StrategyWrapper.withdraw: Can only withdraw the strategy token\");\n        require(\n            amountShares <= totalShares,\n            \"StrategyWrapper.withdraw: amountShares must be less than or equal to totalShares\"\n        );\n        // Decrease `totalShares` to reflect withdrawal. Unchecked arithmetic since we just checked this above.\n        unchecked {\n            totalShares -= amountShares;\n        }\n        underlyingToken.safeTransfer(depositor, amountShares);\n    }"
}