{
    "Function": "_spendAllowance",
    "File": "contracts/src/vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/ERC20.sol",
    "Parent Contracts": [
        "contracts/src/vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/extensions/IERC20Metadata.sol",
        "contracts/src/vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol",
        "contracts/src/vendor/openzeppelin-solidity/v4.8.3/contracts/utils/Context.sol"
    ],
    "High-Level Calls": [],
    "Internal Calls": [
        "_approve",
        "require(bool,string)",
        "allowance"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\n    uint256 currentAllowance = allowance(owner, spender);\n    if (currentAllowance != type(uint256).max) {\n      require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n      unchecked {\n        _approve(owner, spender, currentAllowance - amount);\n      }\n    }\n  }"
}