{
    "Function": "transferOut",
    "File": "src/UserEscrow.sol",
    "Parent Contracts": [
        "src/util/Auth.sol"
    ],
    "High-Level Calls": [
        "ERC20Like",
        "SafeTransferLib"
    ],
    "Internal Calls": [
        "require(bool,string)",
        "require(bool,string)",
        "auth"
    ],
    "Library Calls": [
        "safeTransfer"
    ],
    "Low-Level Calls": [],
    "Code": "function transferOut(address token, address destination, address receiver, uint256 amount) external auth {\n        require(destinations[token][destination] >= amount, \"UserEscrow/transfer-failed\");\n        require(\n            /// @dev transferOut can only be initiated by the destination address or an authorized admin.\n            ///      The check is just an additional protection to secure destination funds in case of compromized auth.\n            ///      Since userEscrow is not able to decrease the allowance for the receiver,\n            ///      a transfer is only possible in case receiver has received the full allowance from destination address.\n            receiver == destination || (ERC20Like(token).allowance(destination, receiver) == type(uint256).max),\n            \"UserEscrow/receiver-has-no-allowance\"\n        );\n        destinations[token][destination] -= amount;\n\n        SafeTransferLib.safeTransfer(token, receiver, amount);\n        emit TransferOut(token, receiver, amount);\n    }"
}