{
    "Function": "_addShares",
    "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": [
        "IDelegationManager"
    ],
    "Internal Calls": [
        "require(bool,string)",
        "require(bool,string)",
        "require(bool,string)"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function _addShares(address depositor, IStrategy strategy, uint256 shares) internal {\n        // sanity checks on inputs\n        require(depositor != address(0), \"StrategyManager._addShares: depositor cannot be zero address\");\n        require(shares != 0, \"StrategyManager._addShares: shares should not be zero!\");\n\n        // if they dont have existing shares of this strategy, add it to their strats\n        if (stakerStrategyShares[depositor][strategy] == 0) {\n            require(\n                stakerStrategyList[depositor].length < MAX_STAKER_STRATEGY_LIST_LENGTH,\n                \"StrategyManager._addShares: deposit would exceed MAX_STAKER_STRATEGY_LIST_LENGTH\"\n            );\n            stakerStrategyList[depositor].push(strategy);\n        }\n\n        // add the returned shares to their existing shares for this strategy\n        stakerStrategyShares[depositor][strategy] += shares;\n\n        // if applicable, increase delegated shares accordingly\n        delegation.increaseDelegatedShares(depositor, strategy, shares);\n    }"
}