creation_sourcecode: {{
    "language": "Solidity",
    "settings": {
      "evmVersion": "paris",
      "libraries": {},
      "metadata": {
        "useLiteralContent": true
      },
      "optimizer": {
        "enabled": true,
        "runs": 200
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      }
    },
    "sources": {
      "SGROKToken.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"../libraries/ERC20Base.sol\";\nimport \"../libraries/TaxableToken.sol\";\n\n/**\n * @dev ERC20Token implementation with Tax capabilities\n */\ncontract SGROKToken is ERC20Base, Ownable, TaxableToken {\n    constructor(\n        uint256 initialSupply_,\n        address feeReceiver_,\n        address swapRouter_,\n        FeeConfiguration memory feeConfiguration_,\n        address[] memory collectors_,\n        uint256[] memory shares_\n    )\n        payable\n        ERC20Base(\"Super Grok\", \"SGROK\", 18, 0x312f313731313439322f4f2f54)\n        TaxableToken(true, initialSupply_ / 10000, swapRouter_, feeConfiguration_)\n        TaxDistributor(collectors_, shares_)\n    {\n        require(initialSupply_ > 0, \"Initial supply cannot be zero\");\n        payable(feeReceiver_).transfer(msg.value);\n        _mint(_msgSender(), initialSupply_);\n    }\n\n    /**\n     * @dev Enable/Disable autoProcessFees on transfer\n     * only callable by `owner()`\n     */\n    function setAutoprocessFees(bool autoProcess) external override onlyOwner {\n        require(autoProcessFees != autoProcess, \"Already set\");\n        autoProcessFees = autoProcess;\n    }\n\n    /**\n     * @dev add a fee collector\n     * only callable by `owner()`\n     */\n    function addFeeCollector(address account, uint256 share) external override onlyOwner {\n        _addFeeCollector(account, share);\n    }\n\n    /**\n     * @dev add/remove a LP\n     * only callable by `owner()`\n     */\n    function setIsLpPool(address pairAddress, bool isLp) external override onlyOwner {\n        _setIsLpPool(pairAddress, isLp);\n    }\n\n    /**\n     * @dev add/remove an address to the tax exclusion list\n     * only callable by `owner()`\n     */\n    function setIsExcludedFromFees(address account, bool excluded) external override onlyOwner {\n        _setIsExcludedFromFees(account, excluded);\n    }\n\n    /**\n     * @dev manually distribute fees to collectors\n     * only callable by `owner()`\n     */\n    function distributeFees(uint256 amount, bool inToken) external override onlyOwner {\n        if (inToken) {\n            require(balanceOf(address(this)) >= amount, \"Not enough balance\");\n        } else {\n            require(address(this).balance >= amount, \"Not enough balance\");\n        }\n        _distributeFees(amount, inToken);\n    }\n\n    /**\n     * @dev process fees\n     * only callable by `owner()`\n     */\n    function processFees(uint256 amount, uint256 minAmountOut) external override onlyOwner {\n        require(amount <= balanceOf(address(this)), \"Amount too high\");\n        _processFees(amount, minAmountOut);\n    }\n\n    /**\n     * @dev remove a fee collector\n     * only callable by `owner()`\n     */\n    function removeFeeCollector(address account) external override onlyOwner {\n        _removeFeeCollector(account);\n    }\n\n    /**\n     * @dev set the liquidity owner\n     * only callable by `owner()`\n     */\n    function setLiquidityOwner(address newOwner) external override onlyOwner {\n        liquidityOwner = newOwner;\n    }\n\n    /**\n     * @dev set the number of tokens to swap\n     * only callable by `owner()`\n     */\n    function setNumTokensToSwap(uint256 amount) external override onlyOwner {\n        numTokensToSwap = amount;\n    }\n\n    /**\n     * @dev update a fee collector share\n     * only callable by `owner()`\n     */\n    function updateFeeCollectorShare(address account, uint256 share) external override onlyOwner {\n        _updateFeeCollectorShare(account, share);\n    }\n\n    /**\n     * @dev update the fee configurations\n     * only callable by `owner()`\n     */\n    function setFeeConfiguration(FeeConfiguration calldata configuration) external override onlyOwner {\n        _setFeeConfiguration(configuration);\n    }\n\n    /**\n     * @dev update the swap router\n     * only callable by `owner()`\n     */\n    function setSwapRouter(address newRouter) external override onlyOwner {\n        _setSwapRouter(newRouter);\n    }\n\n    function _transfer(address from, address to, uint256 amount) internal override(ERC20, TaxableToken) {\n        super._transfer(from, to, amount);\n    }\n}\n"
      },
      "libraries/TaxableToken.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\";\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\";\nimport \"./ERC20Base.sol\";\nimport \"./TaxDistributor.sol\";\n\n/*\n * TaxableToken: Add a tax on buy, sell or transfer\n */\nabstract contract TaxableToken is ERC20Base, TaxDistributor {\n    struct FeeConfiguration {\n        bool feesInToken; // if set to true, collectors will get tokens, if false collector the fee will be swapped for the native currency\n        uint16 buyFees; // fees applied during buys, from 0 to 2000 (ie, 100 = 1%)\n        uint16 sellFees; // fees applied during sells, from 0 to 2000 (ie, 100 = 1%)\n        uint16 transferFees; // fees applied during transfers, from 0 to 2000 (ie, 100 = 1%)\n        uint16 burnFeeRatio; // from 0 to 10000 (ie 8000 = 80% of the fee collected are burned)\n        uint16 liquidityFeeRatio; // from 0 to 10000 (ie 8000 = 80% of the fee collected are added back to liquidity)\n        uint16 collectorsFeeRatio; // from 0 to 10000 (ie 8000 = 80% of the fee collected are sent to fee collectors)\n    }\n\n    address public constant BURN_ADDRESS = address(0x000000000000000000000000000000000000dEaD);\n    uint16 public constant MAX_FEE = 2000; // max 20% fees\n    uint16 public constant FEE_PRECISION = 10000;\n\n    // swap config\n    IUniswapV2Router02 public swapRouter;\n    address public swapPair;\n    address public liquidityOwner;\n\n    // fees\n    bool private _processingFees;\n    bool public autoProcessFees;\n    uint256 public numTokensToSwap; // amount of tokens to collect before processing fees (default to 0.05% of supply)\n    FeeConfiguration public feeConfiguration;\n\n    mapping(address => bool) private _excludedFromFees;\n    mapping(address => bool) private _lpPools;\n\n    event FeeConfigurationUpdated(FeeConfiguration configuration);\n    event SwapRouterUpdated(address indexed router, address indexed pair);\n    event ExcludedFromFees(address indexed account, bool excluded);\n    event SetLpPool(address indexed pairAddress, bool isLp);\n\n    modifier lockTheSwap() {\n        _processingFees = true;\n        _;\n        _processingFees = false;\n    }\n\n    constructor(\n        bool autoProcessFees_,\n        uint256 numTokensToSwap_,\n        address swapRouter_,\n        FeeConfiguration memory feeConfiguration_\n    ) {\n        numTokensToSwap = numTokensToSwap_;\n        autoProcessFees = autoProcessFees_;\n\n        liquidityOwner = _msgSender();\n\n        // Create a uniswap pair for this new token\n        swapRouter = IUniswapV2Router02(swapRouter_);\n        swapPair = _pairFor(swapRouter.factory(), address(this), swapRouter.WETH());\n        _lpPools[swapPair] = true;\n\n        // configure addresses excluded from fee\n        _setIsExcludedFromFees(_msgSender(), true);\n        _setIsExcludedFromFees(address(this), true);\n\n        // configure fees\n        _setFeeConfiguration(feeConfiguration_);\n    }\n\n    // receive ETH when swaping\n    receive() external payable {}\n\n    function isExcludedFromFees(address account) public view returns (bool) {\n        return _excludedFromFees[account];\n    }\n\n    function _setIsExcludedFromFees(address account, bool excluded) internal {\n        require(_excludedFromFees[account] != excluded, \"Already set\");\n        _excludedFromFees[account] = excluded;\n        emit ExcludedFromFees(account, excluded);\n    }\n\n    function _setIsLpPool(address pairAddress, bool isLp) internal {\n        require(_lpPools[pairAddress] != isLp, \"Already set\");\n        _lpPools[pairAddress] = isLp;\n        emit SetLpPool(pairAddress, isLp);\n    }\n\n    function isLpPool(address pairAddress) public view returns (bool) {\n        return _lpPools[pairAddress];\n    }\n\n    function _setSwapRouter(address _newRouter) internal {\n        require(_newRouter != address(0), \"Invalid router\");\n\n        swapRouter = IUniswapV2Router02(_newRouter);\n        IUniswapV2Factory factory = IUniswapV2Factory(swapRouter.factory());\n        require(address(factory) != address(0), \"Invalid factory\");\n\n        address weth = swapRouter.WETH();\n        swapPair = factory.getPair(address(this), weth);\n        if (swapPair == address(0)) {\n            swapPair = factory.createPair(address(this), weth);\n        }\n\n        require(swapPair != address(0), \"Invalid pair address.\");\n        emit SwapRouterUpdated(address(swapRouter), swapPair);\n    }\n\n    function _setFeeConfiguration(FeeConfiguration memory configuration) internal {\n        require(configuration.buyFees <= MAX_FEE, \"Invalid buy fee\");\n        require(configuration.sellFees <= MAX_FEE, \"Invalid sell fee\");\n        require(configuration.transferFees <= MAX_FEE, \"Invalid transfer fee\");\n\n        uint16 totalShare = configuration.burnFeeRatio +\n            configuration.liquidityFeeRatio +\n            configuration.collectorsFeeRatio;\n        require(totalShare == 0 || totalShare == FEE_PRECISION, \"Invalid fee share\");\n\n        feeConfiguration = configuration;\n        emit FeeConfigurationUpdated(configuration);\n    }\n\n    function _processFees(uint256 tokenAmount, uint256 minAmountOut) internal lockTheSwap {\n        uint256 contractTokenBalance = balanceOf(address(this));\n        if (contractTokenBalance >= tokenAmount) {\n            uint256 liquidityAmount = (tokenAmount * feeConfiguration.liquidityFeeRatio) /\n                (FEE_PRECISION - feeConfiguration.burnFeeRatio);\n            uint256 liquidityTokens = liquidityAmount / 2;\n\n            uint256 collectorsAmount = tokenAmount - liquidityAmount;\n            uint256 liquifyAmount = liquidityAmount - liquidityTokens;\n\n            if (!feeConfiguration.feesInToken) {\n                liquifyAmount += collectorsAmount;\n            }\n\n            // swap tokens\n            if (liquifyAmount > 0) {\n                if (balanceOf(swapPair) == 0) {\n                    // do not swap before the pair has liquidity\n                    return;\n                }\n\n                // capture the contract's current balance.\n                uint256 initialBalance = address(this).balance;\n\n                _swapTokensForEth(liquifyAmount, minAmountOut);\n\n                // how much did we just swap into?\n                uint256 swapBalance = address(this).balance - initialBalance;\n\n                // add liquidity\n                uint256 liquidityETH = (swapBalance * liquidityTokens) / liquifyAmount;\n                if (liquidityETH > 0) {\n                    _addLiquidity(liquidityTokens, liquidityETH);\n                }\n            }\n\n            if (feeConfiguration.feesInToken) {\n                // send tokens to fee collectors\n                _distributeFees(collectorsAmount, true);\n            } else {\n                // send remaining ETH to fee collectors\n                _distributeFees(address(this).balance, false);\n            }\n        }\n    }\n\n    /// @dev Swap tokens for eth\n    function _swapTokensForEth(uint256 tokenAmount, uint256 minAmountOut) private {\n        // generate the swap pair path of token -> weth\n        address[] memory path = new address[](2);\n        path[0] = address(this);\n        path[1] = swapRouter.WETH();\n\n        _approve(address(this), address(swapRouter), tokenAmount);\n\n        // make the swap\n        swapRouter.swapExactTokensForETHSupportingFeeOnTransferTokens(\n            tokenAmount,\n            minAmountOut,\n            path,\n            address(this),\n            block.timestamp\n        );\n    }\n\n    /// @dev Add liquidity\n    function _addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {\n        // approve token transfer to cover all possible scenarios\n        _approve(address(this), address(swapRouter), tokenAmount);\n\n        // add the liquidity\n        swapRouter.addLiquidityETH{value: ethAmount}(\n            address(this),\n            tokenAmount,\n            0, // slippage is unavoidable\n            0, // slippage is unavoidable\n            liquidityOwner,\n            block.timestamp\n        );\n    }\n\n    // calculates the CREATE2 address for a pair without making any external calls\n    function _pairFor(address factory, address tokenA, address tokenB) internal pure returns (address pair) {\n        (address token0, address token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);\n        pair = address(\n            uint160(\n                uint(\n                    keccak256(\n                        abi.encodePacked(\n                            hex\"ff\",\n                            factory,\n                            keccak256(abi.encodePacked(token0, token1)),\n                            hex\"96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f\" // init code hash\n                        )\n                    )\n                )\n            )\n        );\n    }\n\n    function _transfer(address from, address to, uint256 amount) internal virtual override {\n        require(amount > 0, \"Transfer <= 0\");\n\n        uint256 taxFee = 0;\n        bool processFee = !_processingFees && autoProcessFees;\n\n        if (!_processingFees) {\n            bool fromExcluded = isExcludedFromFees(from);\n            bool toExcluded = isExcludedFromFees(to);\n\n            bool fromLP = isLpPool(from);\n            bool toLP = isLpPool(to);\n\n            if (fromLP && !toLP && !toExcluded && to != address(swapRouter)) {\n                // buy fee\n                taxFee = feeConfiguration.buyFees;\n            } else if (toLP && !fromExcluded && !toExcluded) {\n                // sell fee\n                taxFee = feeConfiguration.sellFees;\n            } else if (!fromLP && !toLP && from != address(swapRouter) && !fromExcluded) {\n                // transfer fee\n                taxFee = feeConfiguration.transferFees;\n            }\n        }\n\n        // process fees\n        if (processFee && taxFee > 0 && !_lpPools[from]) {\n            uint256 contractTokenBalance = balanceOf(address(this));\n            if (contractTokenBalance >= numTokensToSwap) {\n                _processFees(numTokensToSwap, 0);\n            }\n        }\n\n        if (taxFee > 0) {\n            uint256 taxAmount = (amount * taxFee) / FEE_PRECISION;\n            uint256 sendAmount = amount - taxAmount;\n            uint256 burnAmount = (taxAmount * feeConfiguration.burnFeeRatio) / FEE_PRECISION;\n\n            if (burnAmount > 0) {\n                taxAmount -= burnAmount;\n                super._transfer(from, BURN_ADDRESS, burnAmount);\n            }\n\n            if (taxAmount > 0) {\n                super._transfer(from, address(this), taxAmount);\n            }\n\n            if (sendAmount > 0) {\n                super._transfer(from, to, sendAmount);\n            }\n        } else {\n            super._transfer(from, to, amount);\n        }\n    }\n\n    function setAutoprocessFees(bool autoProcess) external virtual;\n\n    function setIsLpPool(address pairAddress, bool isLp) external virtual;\n\n    function setIsExcludedFromFees(address account, bool excluded) external virtual;\n\n    function processFees(uint256 amount, uint256 minAmountOut) external virtual;\n\n    function setLiquidityOwner(address newOwner) external virtual;\n\n    function setNumTokensToSwap(uint256 amount) external virtual;\n\n    function setFeeConfiguration(FeeConfiguration calldata configuration) external virtual;\n\n    function setSwapRouter(address newRouter) external virtual;\n}\n"
      },
      "libraries/TaxDistributor.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.17;\n\nimport \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\nimport \"./ERC20Base.sol\";\n\nabstract contract TaxDistributor is ERC20Base {\n    using EnumerableSet for EnumerableSet.AddressSet;\n\n    EnumerableSet.AddressSet private _collectors;\n    mapping(address => uint256) private _shares;\n    uint256 public totalFeeCollectorsShares;\n\n    event FeeCollectorAdded(address indexed account, uint256 share);\n    event FeeCollectorUpdated(address indexed account, uint256 oldShare, uint256 newShare);\n    event FeeCollectorRemoved(address indexed account);\n    event FeeCollected(address indexed receiver, uint256 amount);\n\n    constructor(address[] memory collectors_, uint256[] memory shares_) {\n        require(collectors_.length == shares_.length, \"Invalid fee collectors\");\n        for (uint256 i = 0; i < collectors_.length; i++) {\n            _addFeeCollector(collectors_[i], shares_[i]);\n        }\n    }\n\n    function isFeeCollector(address account) public view returns (bool) {\n        return _collectors.contains(account);\n    }\n\n    function feeCollectorShare(address account) public view returns (uint256) {\n        return _shares[account];\n    }\n\n    function _addFeeCollector(address account, uint256 share) internal {\n        require(!_collectors.contains(account), \"Already fee collector\");\n        require(share > 0, \"Invalid share\");\n\n        _collectors.add(account);\n        _shares[account] = share;\n        totalFeeCollectorsShares += share;\n\n        emit FeeCollectorAdded(account, share);\n    }\n\n    function _removeFeeCollector(address account) internal {\n        require(_collectors.contains(account), \"Not fee collector\");\n        _collectors.remove(account);\n        totalFeeCollectorsShares -= _shares[account];\n        delete _shares[account];\n\n        emit FeeCollectorRemoved(account);\n    }\n\n    function _updateFeeCollectorShare(address account, uint256 share) internal {\n        require(_collectors.contains(account), \"Not fee collector\");\n        require(share > 0, \"Invalid share\");\n\n        uint256 oldShare = _shares[account];\n        totalFeeCollectorsShares -= oldShare;\n\n        _shares[account] = share;\n        totalFeeCollectorsShares += share;\n\n        emit FeeCollectorUpdated(account, oldShare, share);\n    }\n\n    function _distributeFees(uint256 amount, bool inToken) internal returns (bool) {\n        if (amount == 0) return false;\n        if (totalFeeCollectorsShares == 0) return false;\n\n        uint256 distributed = 0;\n        uint256 len = _collectors.length();\n        for (uint256 i = 0; i < len; i++) {\n            address collector = _collectors.at(i);\n            uint256 share = i == len - 1\n                ? amount - distributed\n                : (amount * _shares[collector]) / totalFeeCollectorsShares;\n\n            if (inToken) {\n                _transfer(address(this), collector, share);\n            } else {\n                payable(collector).transfer(share);\n            }\n            emit FeeCollected(collector, share);\n\n            distributed += share;\n        }\n\n        return true;\n    }\n\n    function addFeeCollector(address account, uint256 share) external virtual;\n\n    function removeFeeCollector(address account) external virtual;\n\n    function updateFeeCollectorShare(address account, uint256 share) external virtual;\n\n    function distributeFees(uint256 amount, bool inToken) external virtual;\n}\n"
      },
      "libraries/ERC20Base.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\n\nabstract contract ERC20Base is ERC20 {\n    uint8 private immutable _decimals;\n    uint256 public immutable TOKEN_CODE;\n\n    constructor(\n        string memory name_,\n        string memory symbol_,\n        uint8 decimals_,\n        uint256 token_code_\n    ) ERC20(name_, symbol_) {\n        _decimals = decimals_;\n        TOKEN_CODE = token_code_;\n    }\n\n    function decimals() public view override returns (uint8) {\n        return _decimals;\n    }\n}\n"
      },
      "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol": {
        "content": "pragma solidity >=0.6.2;\n\nimport './IUniswapV2Router01.sol';\n\ninterface IUniswapV2Router02 is IUniswapV2Router01 {\n    function removeLiquidityETHSupportingFeeOnTransferTokens(\n        address token,\n        uint liquidity,\n        uint amountTokenMin,\n        uint amountETHMin,\n        address to,\n        uint deadline\n    ) external returns (uint amountETH);\n    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(\n        address token,\n        uint liquidity,\n        uint amountTokenMin,\n        uint amountETHMin,\n        address to,\n        uint deadline,\n        bool approveMax, uint8 v, bytes32 r, bytes32 s\n    ) external returns (uint amountETH);\n\n    function swapExactTokensForTokensSupportingFeeOnTransferTokens(\n        uint amountIn,\n        uint amountOutMin,\n        address[] calldata path,\n        address to,\n        uint deadline\n    ) external;\n    function swapExactETHForTokensSupportingFeeOnTransferTokens(\n        uint amountOutMin,\n        address[] calldata path,\n        address to,\n        uint deadline\n    ) external payable;\n    function swapExactTokensForETHSupportingFeeOnTransferTokens(\n        uint amountIn,\n        uint amountOutMin,\n        address[] calldata path,\n        address to,\n        uint deadline\n    ) external;\n}\n"
      },
      "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol": {
        "content": "pragma solidity >=0.6.2;\n\ninterface IUniswapV2Router01 {\n    function factory() external pure returns (address);\n    function WETH() external pure returns (address);\n\n    function addLiquidity(\n        address tokenA,\n        address tokenB,\n        uint amountADesired,\n        uint amountBDesired,\n        uint amountAMin,\n        uint amountBMin,\n        address to,\n        uint deadline\n    ) external returns (uint amountA, uint amountB, uint liquidity);\n    function addLiquidityETH(\n        address token,\n        uint amountTokenDesired,\n        uint amountTokenMin,\n        uint amountETHMin,\n        address to,\n        uint deadline\n    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);\n    function removeLiquidity(\n        address tokenA,\n        address tokenB,\n        uint liquidity,\n        uint amountAMin,\n        uint amountBMin,\n        address to,\n        uint deadline\n    ) external returns (uint amountA, uint amountB);\n    function removeLiquidityETH(\n        address token,\n        uint liquidity,\n        uint amountTokenMin,\n        uint amountETHMin,\n        address to,\n        uint deadline\n    ) external returns (uint amountToken, uint amountETH);\n    function removeLiquidityWithPermit(\n        address tokenA,\n        address tokenB,\n        uint liquidity,\n        uint amountAMin,\n        uint amountBMin,\n        address to,\n        uint deadline,\n        bool approveMax, uint8 v, bytes32 r, bytes32 s\n    ) external returns (uint amountA, uint amountB);\n    function removeLiquidityETHWithPermit(\n        address token,\n        uint liquidity,\n        uint amountTokenMin,\n        uint amountETHMin,\n        address to,\n        uint deadline,\n        bool approveMax, uint8 v, bytes32 r, bytes32 s\n    ) external returns (uint amountToken, uint amountETH);\n    function swapExactTokensForTokens(\n        uint amountIn,\n        uint amountOutMin,\n        address[] calldata path,\n        address to,\n        uint deadline\n    ) external returns (uint[] memory amounts);\n    function swapTokensForExactTokens(\n        uint amountOut,\n        uint amountInMax,\n        address[] calldata path,\n        address to,\n        uint deadline\n    ) external returns (uint[] memory amounts);\n    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)\n        external\n        payable\n        returns (uint[] memory amounts);\n    function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)\n        external\n        returns (uint[] memory amounts);\n    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)\n        external\n        returns (uint[] memory amounts);\n    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)\n        external\n        payable\n        returns (uint[] memory amounts);\n\n    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);\n    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);\n    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);\n    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);\n    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);\n}\n"
      },
      "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol": {
        "content": "pragma solidity >=0.5.0;\n\ninterface IUniswapV2Factory {\n    event PairCreated(address indexed token0, address indexed token1, address pair, uint);\n\n    function feeTo() external view returns (address);\n    function feeToSetter() external view returns (address);\n\n    function getPair(address tokenA, address tokenB) external view returns (address pair);\n    function allPairs(uint) external view returns (address pair);\n    function allPairsLength() external view returns (uint);\n\n    function createPair(address tokenA, address tokenB) external returns (address pair);\n\n    function setFeeTo(address) external;\n    function setFeeToSetter(address) external;\n}\n"
      },
      "@openzeppelin/contracts/utils/structs/EnumerableSet.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/structs/EnumerableSet.sol)\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for managing\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\n * types.\n *\n * Sets have the following properties:\n *\n * - Elements are added, removed, and checked for existence in constant time\n * (O(1)).\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\n *\n * ```\n * contract Example {\n *     // Add the library methods\n *     using EnumerableSet for EnumerableSet.AddressSet;\n *\n *     // Declare a set state variable\n *     EnumerableSet.AddressSet private mySet;\n * }\n * ```\n *\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\n * and `uint256` (`UintSet`) are supported.\n *\n * [WARNING]\n * ====\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\n * unusable.\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\n *\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\n * array of EnumerableSet.\n * ====\n */\nlibrary EnumerableSet {\n    // To implement this library for multiple types with as little code\n    // repetition as possible, we write it in terms of a generic Set type with\n    // bytes32 values.\n    // The Set implementation uses private functions, and user-facing\n    // implementations (such as AddressSet) are just wrappers around the\n    // underlying Set.\n    // This means that we can only create new EnumerableSets for types that fit\n    // in bytes32.\n\n    struct Set {\n        // Storage of set values\n        bytes32[] _values;\n        // Position of the value in the `values` array, plus 1 because index 0\n        // means a value is not in the set.\n        mapping(bytes32 => uint256) _indexes;\n    }\n\n    /**\n     * @dev Add a value to a set. O(1).\n     *\n     * Returns true if the value was added to the set, that is if it was not\n     * already present.\n     */\n    function _add(Set storage set, bytes32 value) private returns (bool) {\n        if (!_contains(set, value)) {\n            set._values.push(value);\n            // The value is stored at length-1, but we add 1 to all indexes\n            // and use 0 as a sentinel value\n            set._indexes[value] = set._values.length;\n            return true;\n        } else {\n            return false;\n        }\n    }\n\n    /**\n     * @dev Removes a value from a set. O(1).\n     *\n     * Returns true if the value was removed from the set, that is if it was\n     * present.\n     */\n    function _remove(Set storage set, bytes32 value) private returns (bool) {\n        // We read and store the value's index to prevent multiple reads from the same storage slot\n        uint256 valueIndex = set._indexes[value];\n\n        if (valueIndex != 0) {\n            // Equivalent to contains(set, value)\n            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\n            // the array, and then remove the last element (sometimes called as 'swap and pop').\n            // This modifies the order of the array, as noted in {at}.\n\n            uint256 toDeleteIndex = valueIndex - 1;\n            uint256 lastIndex = set._values.length - 1;\n\n            if (lastIndex != toDeleteIndex) {\n                bytes32 lastValue = set._values[lastIndex];\n\n                // Move the last value to the index where the value to delete is\n                set._values[toDeleteIndex] = lastValue;\n                // Update the index for the moved value\n                set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\n            }\n\n            // Delete the slot where the moved value was stored\n            set._values.pop();\n\n            // Delete the index for the deleted slot\n            delete set._indexes[value];\n\n            return true;\n        } else {\n            return false;\n        }\n    }\n\n    /**\n     * @dev Returns true if the value is in the set. O(1).\n     */\n    function _contains(Set storage set, bytes32 value) private view returns (bool) {\n        return set._indexes[value] != 0;\n    }\n\n    /**\n     * @dev Returns the number of values on the set. O(1).\n     */\n    function _length(Set storage set) private view returns (uint256) {\n        return set._values.length;\n    }\n\n    /**\n     * @dev Returns the value stored at position `index` in the set. O(1).\n     *\n     * Note that there are no guarantees on the ordering of values inside the\n     * array, and it may change when more values are added or removed.\n     *\n     * Requirements:\n     *\n     * - `index` must be strictly less than {length}.\n     */\n    function _at(Set storage set, uint256 index) private view returns (bytes32) {\n        return set._values[index];\n    }\n\n    /**\n     * @dev Return the entire set in an array\n     *\n     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n     * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n     */\n    function _values(Set storage set) private view returns (bytes32[] memory) {\n        return set._values;\n    }\n\n    // Bytes32Set\n\n    struct Bytes32Set {\n        Set _inner;\n    }\n\n    /**\n     * @dev Add a value to a set. O(1).\n     *\n     * Returns true if the value was added to the set, that is if it was not\n     * already present.\n     */\n    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n        return _add(set._inner, value);\n    }\n\n    /**\n     * @dev Removes a value from a set. O(1).\n     *\n     * Returns true if the value was removed from the set, that is if it was\n     * present.\n     */\n    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n        return _remove(set._inner, value);\n    }\n\n    /**\n     * @dev Returns true if the value is in the set. O(1).\n     */\n    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\n        return _contains(set._inner, value);\n    }\n\n    /**\n     * @dev Returns the number of values in the set. O(1).\n     */\n    function length(Bytes32Set storage set) internal view returns (uint256) {\n        return _length(set._inner);\n    }\n\n    /**\n     * @dev Returns the value stored at position `index` in the set. O(1).\n     *\n     * Note that there are no guarantees on the ordering of values inside the\n     * array, and it may change when more values are added or removed.\n     *\n     * Requirements:\n     *\n     * - `index` must be strictly less than {length}.\n     */\n    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\n        return _at(set._inner, index);\n    }\n\n    /**\n     * @dev Return the entire set in an array\n     *\n     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n     * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n     */\n    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\n        bytes32[] memory store = _values(set._inner);\n        bytes32[] memory result;\n\n        /// @solidity memory-safe-assembly\n        assembly {\n            result := store\n        }\n\n        return result;\n    }\n\n    // AddressSet\n\n    struct AddressSet {\n        Set _inner;\n    }\n\n    /**\n     * @dev Add a value to a set. O(1).\n     *\n     * Returns true if the value was added to the set, that is if it was not\n     * already present.\n     */\n    function add(AddressSet storage set, address value) internal returns (bool) {\n        return _add(set._inner, bytes32(uint256(uint160(value))));\n    }\n\n    /**\n     * @dev Removes a value from a set. O(1).\n     *\n     * Returns true if the value was removed from the set, that is if it was\n     * present.\n     */\n    function remove(AddressSet storage set, address value) internal returns (bool) {\n        return _remove(set._inner, bytes32(uint256(uint160(value))));\n    }\n\n    /**\n     * @dev Returns true if the value is in the set. O(1).\n     */\n    function contains(AddressSet storage set, address value) internal view returns (bool) {\n        return _contains(set._inner, bytes32(uint256(uint160(value))));\n    }\n\n    /**\n     * @dev Returns the number of values in the set. O(1).\n     */\n    function length(AddressSet storage set) internal view returns (uint256) {\n        return _length(set._inner);\n    }\n\n    /**\n     * @dev Returns the value stored at position `index` in the set. O(1).\n     *\n     * Note that there are no guarantees on the ordering of values inside the\n     * array, and it may change when more values are added or removed.\n     *\n     * Requirements:\n     *\n     * - `index` must be strictly less than {length}.\n     */\n    function at(AddressSet storage set, uint256 index) internal view returns (address) {\n        return address(uint160(uint256(_at(set._inner, index))));\n    }\n\n    /**\n     * @dev Return the entire set in an array\n     *\n     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n     * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n     */\n    function values(AddressSet storage set) internal view returns (address[] memory) {\n        bytes32[] memory store = _values(set._inner);\n        address[] memory result;\n\n        /// @solidity memory-safe-assembly\n        assembly {\n            result := store\n        }\n\n        return result;\n    }\n\n    // UintSet\n\n    struct UintSet {\n        Set _inner;\n    }\n\n    /**\n     * @dev Add a value to a set. O(1).\n     *\n     * Returns true if the value was added to the set, that is if it was not\n     * already present.\n     */\n    function add(UintSet storage set, uint256 value) internal returns (bool) {\n        return _add(set._inner, bytes32(value));\n    }\n\n    /**\n     * @dev Removes a value from a set. O(1).\n     *\n     * Returns true if the value was removed from the set, that is if it was\n     * present.\n     */\n    function remove(UintSet storage set, uint256 value) internal returns (bool) {\n        return _remove(set._inner, bytes32(value));\n    }\n\n    /**\n     * @dev Returns true if the value is in the set. O(1).\n     */\n    function contains(UintSet storage set, uint256 value) internal view returns (bool) {\n        return _contains(set._inner, bytes32(value));\n    }\n\n    /**\n     * @dev Returns the number of values in the set. O(1).\n     */\n    function length(UintSet storage set) internal view returns (uint256) {\n        return _length(set._inner);\n    }\n\n    /**\n     * @dev Returns the value stored at position `index` in the set. O(1).\n     *\n     * Note that there are no guarantees on the ordering of values inside the\n     * array, and it may change when more values are added or removed.\n     *\n     * Requirements:\n     *\n     * - `index` must be strictly less than {length}.\n     */\n    function at(UintSet storage set, uint256 index) internal view returns (uint256) {\n        return uint256(_at(set._inner, index));\n    }\n\n    /**\n     * @dev Return the entire set in an array\n     *\n     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n     * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n     */\n    function values(UintSet storage set) internal view returns (uint256[] memory) {\n        bytes32[] memory store = _values(set._inner);\n        uint256[] memory result;\n\n        /// @solidity memory-safe-assembly\n        assembly {\n            result := store\n        }\n\n        return result;\n    }\n}\n"
      },
      "@openzeppelin/contracts/utils/Context.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n}\n"
      },
      "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20Metadata is IERC20 {\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() external view returns (string memory);\n\n    /**\n     * @dev Returns the symbol of the token.\n     */\n    function symbol() external view returns (string memory);\n\n    /**\n     * @dev Returns the decimals places of the token.\n     */\n    function decimals() external view returns (uint8);\n}\n"
      },
      "@openzeppelin/contracts/token/ERC20/IERC20.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n\n    /**\n     * @dev Returns the amount of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the amount of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves `amount` tokens from the caller's account to `to`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address to, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Moves `amount` tokens from `from` to `to` using the\n     * allowance mechanism. `amount` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(\n        address from,\n        address to,\n        uint256 amount\n    ) external returns (bool);\n}\n"
      },
      "@openzeppelin/contracts/token/ERC20/ERC20.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"./extensions/IERC20Metadata.sol\";\nimport \"../../utils/Context.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n    mapping(address => uint256) private _balances;\n\n    mapping(address => mapping(address => uint256)) private _allowances;\n\n    uint256 private _totalSupply;\n\n    string private _name;\n    string private _symbol;\n\n    /**\n     * @dev Sets the values for {name} and {symbol}.\n     *\n     * The default value of {decimals} is 18. To select a different value for\n     * {decimals} you should overload it.\n     *\n     * All two of these values are immutable: they can only be set once during\n     * construction.\n     */\n    constructor(string memory name_, string memory symbol_) {\n        _name = name_;\n        _symbol = symbol_;\n    }\n\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() public view virtual override returns (string memory) {\n        return _name;\n    }\n\n    /**\n     * @dev Returns the symbol of the token, usually a shorter version of the\n     * name.\n     */\n    function symbol() public view virtual override returns (string memory) {\n        return _symbol;\n    }\n\n    /**\n     * @dev Returns the number of decimals used to get its user representation.\n     * For example, if `decimals` equals `2`, a balance of `505` tokens should\n     * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n     *\n     * Tokens usually opt for a value of 18, imitating the relationship between\n     * Ether and Wei. This is the value {ERC20} uses, unless this function is\n     * overridden;\n     *\n     * NOTE: This information is only used for _display_ purposes: it in\n     * no way affects any of the arithmetic of the contract, including\n     * {IERC20-balanceOf} and {IERC20-transfer}.\n     */\n    function decimals() public view virtual override returns (uint8) {\n        return 18;\n    }\n\n    /**\n     * @dev See {IERC20-totalSupply}.\n     */\n    function totalSupply() public view virtual override returns (uint256) {\n        return _totalSupply;\n    }\n\n    /**\n     * @dev See {IERC20-balanceOf}.\n     */\n    function balanceOf(address account) public view virtual override returns (uint256) {\n        return _balances[account];\n    }\n\n    /**\n     * @dev See {IERC20-transfer}.\n     *\n     * Requirements:\n     *\n     * - `to` cannot be the zero address.\n     * - the caller must have a balance of at least `amount`.\n     */\n    function transfer(address to, uint256 amount) public virtual override returns (bool) {\n        address owner = _msgSender();\n        _transfer(owner, to, amount);\n        return true;\n    }\n\n    /**\n     * @dev See {IERC20-allowance}.\n     */\n    function allowance(address owner, address spender) public view virtual override returns (uint256) {\n        return _allowances[owner][spender];\n    }\n\n    /**\n     * @dev See {IERC20-approve}.\n     *\n     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\n     * `transferFrom`. This is semantically equivalent to an infinite approval.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     */\n    function approve(address spender, uint256 amount) public virtual override returns (bool) {\n        address owner = _msgSender();\n        _approve(owner, spender, amount);\n        return true;\n    }\n\n    /**\n     * @dev See {IERC20-transferFrom}.\n     *\n     * Emits an {Approval} event indicating the updated allowance. This is not\n     * required by the EIP. See the note at the beginning of {ERC20}.\n     *\n     * NOTE: Does not update the allowance if the current allowance\n     * is the maximum `uint256`.\n     *\n     * Requirements:\n     *\n     * - `from` and `to` cannot be the zero address.\n     * - `from` must have a balance of at least `amount`.\n     * - the caller must have allowance for ``from``'s tokens of at least\n     * `amount`.\n     */\n    function transferFrom(\n        address from,\n        address to,\n        uint256 amount\n    ) public virtual override returns (bool) {\n        address spender = _msgSender();\n        _spendAllowance(from, spender, amount);\n        _transfer(from, to, amount);\n        return true;\n    }\n\n    /**\n     * @dev Atomically increases the allowance granted to `spender` by the caller.\n     *\n     * This is an alternative to {approve} that can be used as a mitigation for\n     * problems described in {IERC20-approve}.\n     *\n     * Emits an {Approval} event indicating the updated allowance.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     */\n    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n        address owner = _msgSender();\n        _approve(owner, spender, allowance(owner, spender) + addedValue);\n        return true;\n    }\n\n    /**\n     * @dev Atomically decreases the allowance granted to `spender` by the caller.\n     *\n     * This is an alternative to {approve} that can be used as a mitigation for\n     * problems described in {IERC20-approve}.\n     *\n     * Emits an {Approval} event indicating the updated allowance.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     * - `spender` must have allowance for the caller of at least\n     * `subtractedValue`.\n     */\n    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n        address owner = _msgSender();\n        uint256 currentAllowance = allowance(owner, spender);\n        require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n        unchecked {\n            _approve(owner, spender, currentAllowance - subtractedValue);\n        }\n\n        return true;\n    }\n\n    /**\n     * @dev Moves `amount` of tokens from `from` to `to`.\n     *\n     * This internal function is equivalent to {transfer}, and can be used to\n     * e.g. implement automatic token fees, slashing mechanisms, etc.\n     *\n     * Emits a {Transfer} event.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `from` must have a balance of at least `amount`.\n     */\n    function _transfer(\n        address from,\n        address to,\n        uint256 amount\n    ) internal virtual {\n        require(from != address(0), \"ERC20: transfer from the zero address\");\n        require(to != address(0), \"ERC20: transfer to the zero address\");\n\n        _beforeTokenTransfer(from, to, amount);\n\n        uint256 fromBalance = _balances[from];\n        require(fromBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n        unchecked {\n            _balances[from] = fromBalance - amount;\n            // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\n            // decrementing then incrementing.\n            _balances[to] += amount;\n        }\n\n        emit Transfer(from, to, amount);\n\n        _afterTokenTransfer(from, to, amount);\n    }\n\n    /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n     * the total supply.\n     *\n     * Emits a {Transfer} event with `from` set to the zero address.\n     *\n     * Requirements:\n     *\n     * - `account` cannot be the zero address.\n     */\n    function _mint(address account, uint256 amount) internal virtual {\n        require(account != address(0), \"ERC20: mint to the zero address\");\n\n        _beforeTokenTransfer(address(0), account, amount);\n\n        _totalSupply += amount;\n        unchecked {\n            // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\n            _balances[account] += amount;\n        }\n        emit Transfer(address(0), account, amount);\n\n        _afterTokenTransfer(address(0), account, amount);\n    }\n\n    /**\n     * @dev Destroys `amount` tokens from `account`, reducing the\n     * total supply.\n     *\n     * Emits a {Transfer} event with `to` set to the zero address.\n     *\n     * Requirements:\n     *\n     * - `account` cannot be the zero address.\n     * - `account` must have at least `amount` tokens.\n     */\n    function _burn(address account, uint256 amount) internal virtual {\n        require(account != address(0), \"ERC20: burn from the zero address\");\n\n        _beforeTokenTransfer(account, address(0), amount);\n\n        uint256 accountBalance = _balances[account];\n        require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n        unchecked {\n            _balances[account] = accountBalance - amount;\n            // Overflow not possible: amount <= accountBalance <= totalSupply.\n            _totalSupply -= amount;\n        }\n\n        emit Transfer(account, address(0), amount);\n\n        _afterTokenTransfer(account, address(0), amount);\n    }\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n     *\n     * This internal function is equivalent to `approve`, and can be used to\n     * e.g. set automatic allowances for certain subsystems, etc.\n     *\n     * Emits an {Approval} event.\n     *\n     * Requirements:\n     *\n     * - `owner` cannot be the zero address.\n     * - `spender` cannot be the zero address.\n     */\n    function _approve(\n        address owner,\n        address spender,\n        uint256 amount\n    ) internal virtual {\n        require(owner != address(0), \"ERC20: approve from the zero address\");\n        require(spender != address(0), \"ERC20: approve to the zero address\");\n\n        _allowances[owner][spender] = amount;\n        emit Approval(owner, spender, amount);\n    }\n\n    /**\n     * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\n     *\n     * Does not update the allowance amount in case of infinite allowance.\n     * Revert if not enough allowance is available.\n     *\n     * Might emit an {Approval} event.\n     */\n    function _spendAllowance(\n        address owner,\n        address spender,\n        uint256 amount\n    ) 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    }\n\n    /**\n     * @dev Hook that is called before any transfer of tokens. This includes\n     * minting and burning.\n     *\n     * Calling conditions:\n     *\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n     * will be transferred to `to`.\n     * - when `from` is zero, `amount` tokens will be minted for `to`.\n     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n     * - `from` and `to` are never both zero.\n     *\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n     */\n    function _beforeTokenTransfer(\n        address from,\n        address to,\n        uint256 amount\n    ) internal virtual {}\n\n    /**\n     * @dev Hook that is called after any transfer of tokens. This includes\n     * minting and burning.\n     *\n     * Calling conditions:\n     *\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n     * has been transferred to `to`.\n     * - when `from` is zero, `amount` tokens have been minted for `to`.\n     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n     * - `from` and `to` are never both zero.\n     *\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n     */\n    function _afterTokenTransfer(\n        address from,\n        address to,\n        uint256 amount\n    ) internal virtual {}\n}\n"
      },
      "@openzeppelin/contracts/access/Ownable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the deployer as the initial owner.\n     */\n    constructor() {\n        _transferOwnership(_msgSender());\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        _checkOwner();\n        _;\n    }\n\n    /**\n     * @dev Returns the address of the current owner.\n     */\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n    /**\n     * @dev Throws if the sender is not the owner.\n     */\n    function _checkOwner() internal view virtual {\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions anymore. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby removing any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n        _transferOwnership(newOwner);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Internal function without access restriction.\n     */\n    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n}\n"
      }
    }
  }}