{
    "Function": "slashShares",
    "File": "src/contracts/core/StrategyManager.sol",
    "Parent Contracts": [
        "src/contracts/core/StrategyManagerStorage.sol",
        "src/contracts/interfaces/IStrategyManager.sol",
        "src/contracts/permissions/Pausable.sol",
        "src/contracts/interfaces/IPausable.sol",
        "lib/openzeppelin-contracts-upgradeable/contracts/security/ReentrancyGuardUpgradeable.sol",
        "lib/openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol",
        "lib/openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol",
        "lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol"
    ],
    "High-Level Calls": [
        "IStrategy",
        "IDelegationManager"
    ],
    "Internal Calls": [
        "require(bool,string)",
        "_withdrawBeaconChainETH",
        "nonReentrant",
        "onlyFrozen",
        "_removeShares",
        "onlyOwner"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function slashShares(\n        address slashedAddress,\n        address recipient,\n        IStrategy[] calldata strategies,\n        IERC20[] calldata tokens,\n        uint256[] calldata strategyIndexes,\n        uint256[] calldata shareAmounts\n    )\n        external\n        onlyOwner\n        onlyFrozen(slashedAddress)\n        nonReentrant\n    {\n        require(tokens.length == strategies.length, \"StrategyManager.slashShares: input length mismatch\");\n        uint256 strategyIndexIndex;\n        uint256 strategiesLength = strategies.length;\n        for (uint256 i = 0; i < strategiesLength;) {\n            // the internal function will return 'true' in the event the strategy was\n            // removed from the slashedAddress's array of strategies -- i.e. stakerStrategyList[slashedAddress]\n            if (_removeShares(slashedAddress, strategyIndexes[strategyIndexIndex], strategies[i], shareAmounts[i])) {\n                unchecked {\n                    ++strategyIndexIndex;\n                }\n            }\n\n            if (strategies[i] == beaconChainETHStrategy) {\n                 //withdraw the beaconChainETH to the recipient\n                _withdrawBeaconChainETH(slashedAddress, recipient, shareAmounts[i]);\n            }\n            else {\n                // withdraw the shares and send funds to the recipient\n                strategies[i].withdraw(recipient, tokens[i], shareAmounts[i]);\n            }\n\n            // increment the loop\n            unchecked {\n                ++i;\n            }\n        }\n\n        // modify delegated shares accordingly, if applicable\n        delegation.decreaseDelegatedShares(slashedAddress, strategies, shareAmounts);\n    }"
}