{
    "Function": "nonStakersClaim",
    "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",
        "ISherlock"
    ],
    "Internal Calls": [
        "revert Unauthorized()",
        "_settleProtocolDebt",
        "revert ZeroArgument()",
        "revert ZeroArgument()",
        "whenNotPaused",
        "revert ZeroArgument()",
        "revert InsufficientBalance(bytes32)"
    ],
    "Library Calls": [
        "safeTransfer"
    ],
    "Low-Level Calls": [],
    "Code": "function nonStakersClaim(\n    bytes32 _protocol,\n    uint256 _amount,\n    address _receiver\n  ) external override whenNotPaused {\n    if (_protocol == bytes32(0)) revert ZeroArgument();\n    if (_amount == uint256(0)) revert ZeroArgument();\n    if (_receiver == address(0)) revert ZeroArgument();\n    // Only the nonstakers role (multisig or contract) can pull the funds\n    if (msg.sender != sherlockCore.nonStakersAddress()) revert Unauthorized();\n\n    // Call can't be executed on protocol that is removed\n    if (protocolAgent_[_protocol] != address(0)) {\n      // Updates the amount that nonstakers can claim from this protocol\n      _settleProtocolDebt(_protocol);\n    }\n\n    // Sets balance to the amount that is claimable by nonstakers for this specific protocol\n    uint256 balance = nonStakersClaimableByProtocol[_protocol];\n    // If the amount requested is more than what's owed to nonstakers, revert\n    if (_amount > balance) revert InsufficientBalance(_protocol);\n\n    // Sets the claimable amount to whatever is left over after this amount is pulled\n    nonStakersClaimableByProtocol[_protocol] = balance - _amount;\n    // Transfers the amount requested to the `_receiver` address\n    token.safeTransfer(_receiver, _amount);\n  }"
}