{
    "Function": "transferProtocolAgent",
    "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()",
        "_setProtocolAgent",
        "revert Unauthorized()",
        "_verifyProtocolExists",
        "revert InvalidArgument()",
        "whenNotPaused"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function transferProtocolAgent(bytes32 _protocol, address _protocolAgent)\n    external\n    override\n    whenNotPaused\n  {\n    if (_protocolAgent == address(0)) revert ZeroArgument();\n    // Can't set the new protocol agent to the caller address\n    if (msg.sender == _protocolAgent) revert InvalidArgument();\n    // Because the caller must be the current protocol agent\n    if (msg.sender != _verifyProtocolExists(_protocol)) revert Unauthorized();\n\n    // Sets the protocol agent to the new address\n    _setProtocolAgent(_protocol, msg.sender, _protocolAgent);\n  }"
}