{
    "Function": "protocolUpdate",
    "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": [],
    "Internal Calls": [
        "revert ZeroArgument()",
        "_settleProtocolDebt",
        "_calcGlobalPremiumPerSecForStakers",
        "_settleTotalDebt",
        "_verifyProtocolExists",
        "revert ZeroArgument()",
        "revert InvalidArgument()",
        "onlyOwner"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function protocolUpdate(\n    bytes32 _protocol,\n    bytes32 _coverage,\n    uint256 _nonStakers,\n    uint256 _coverageAmount\n  ) public override onlyOwner {\n    if (_coverage == bytes32(0)) revert ZeroArgument();\n    if (_nonStakers > HUNDRED_PERCENT) revert InvalidArgument();\n    if (_coverageAmount == uint256(0)) revert ZeroArgument();\n\n    // Checks to make sure the protocol has been assigned a protocol agent\n    _verifyProtocolExists(_protocol);\n\n    // Subtracts the accrued debt from a protocol's active balance (if any)\n    // Updates the amount that can be claimed by nonstakers\n    _settleProtocolDebt(_protocol);\n\n    // Updates the global claimable amount for stakers\n    _settleTotalDebt();\n\n    // Gets the premium per second for this protocol\n    uint256 premium = premiums_[_protocol];\n\n    // Updates allPremiumsPerSecToStakers (premium is not able to be updated in this function, but percentage to nonstakers can be)\n    allPremiumsPerSecToStakers = _calcGlobalPremiumPerSecForStakers(\n      premium,\n      premium,\n      nonStakersPercentage[_protocol],\n      _nonStakers,\n      allPremiumsPerSecToStakers\n    );\n\n    // Updates the stored value of percentage of premiums that go to nonstakers\n    nonStakersPercentage[_protocol] = _nonStakers;\n\n    // Updates previous coverage and current coverage amounts\n    previousCoverage[_protocol] = currentCoverage[_protocol];\n    currentCoverage[_protocol] = _coverageAmount;\n\n    emit ProtocolUpdated(_protocol, _coverage, _nonStakers, _coverageAmount);\n  }"
}