{
    "Function": "decreaseDelegatedShares",
    "File": "src/contracts/core/DelegationManager.sol",
    "Parent Contracts": [
        "src/contracts/core/DelegationManagerStorage.sol",
        "src/contracts/interfaces/IDelegationManager.sol",
        "src/contracts/permissions/Pausable.sol",
        "src/contracts/interfaces/IPausable.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": [],
    "Internal Calls": [
        "onlyStrategyManager",
        "_delegationWithdrawnHook",
        "isDelegated"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function decreaseDelegatedShares(\n        address staker,\n        IStrategy[] calldata strategies,\n        uint256[] calldata shares\n    )\n        external\n        onlyStrategyManager\n    {\n        if (isDelegated(staker)) {\n            address operator = delegatedTo[staker];\n\n            // subtract strategy shares from delegate's shares\n            uint256 stratsLength = strategies.length;\n            for (uint256 i = 0; i < stratsLength;) {\n                operatorShares[operator][strategies[i]] -= shares[i];\n                unchecked {\n                    ++i;\n                }\n            }\n\n            // call into hook in delegationTerms contract\n            IDelegationTerms dt = delegationTerms[operator];\n            _delegationWithdrawnHook(dt, staker, strategies, shares);\n        }\n    }"
}