{
    "Function": "safeApprove",
    "File": "contracts/openzeppelin-solidity/contracts/token/ERC20/utils/SafeERC20.sol",
    "Parent Contracts": [],
    "High-Level Calls": [
        "IERC20"
    ],
    "Internal Calls": [
        "_callOptionalReturn",
        "require(bool,string)",
        "abi.encodeWithSelector()"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function safeApprove(\n        IERC20 token,\n        address spender,\n        uint256 value\n    ) internal {\n        // safeApprove should only be called when setting an initial allowance,\n        // or when resetting it to zero. To increase and decrease it, use\n        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n        require(\n            (value == 0) || (token.allowance(address(this), spender) == 0),\n            \"SafeERC20: approve from non-zero to non-zero allowance\"\n        );\n        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n    }"
}