{
    "Function": "claimPremiumsForStakers",
    "File": "contracts/managers/SherlockProtocolManager.sol",
    "Parent Contracts": [
        "contracts/managers/Manager.sol",
        "node_modules/@openzeppelin/contracts/security/Pausable.sol",
        "node_modules/@openzeppelin/contracts/access/Ownable.sol",
        "node_modules/@openzeppelin/contracts/utils/Context.sol",
        "contracts/interfaces/managers/ISherlockProtocolManager.sol",
        "contracts/interfaces/managers/IManager.sol"
    ],
    "High-Level Calls": [
        "SafeERC20"
    ],
    "Internal Calls": [
        "revert InvalidConditions()",
        "claimablePremiums",
        "whenNotPaused"
    ],
    "Library Calls": [
        "safeTransfer"
    ],
    "Low-Level Calls": [],
    "Code": "function claimPremiumsForStakers() external override whenNotPaused {\n    // Gets address of core Sherlock contract\n    address sherlock = address(sherlockCore);\n    // Revert if core Sherlock contract not initialized yet\n    if (sherlock == address(0)) revert InvalidConditions();\n\n    // claimablePremiums is different from _settleTotalDebt() because it does not change state\n    // Retrieves current amount of all premiums that are owed to stakers\n    uint256 amount = claimablePremiums();\n\n    // Transfers all the premiums owed to stakers to the Sherlock core contract\n    if (amount != 0) {\n      // Global value of premiums owed to stakers is set to zero since we are transferring the entire amount out\n      lastClaimablePremiumsForStakers = 0;\n      lastAccountedGlobal = block.timestamp;\n      token.safeTransfer(sherlock, amount);\n    }\n  }"
}