File size: 121,119 Bytes
f998fcd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{
  "language": "Solidity",
  "sources": {
    "sir-token.sol": {
      "content": "// SPDX-License-Identifier: MIT\n/**----------------------------------------------------------------\n    This is: v2.0 \n    defunct: 0x5E57C528EF9126200D76620e7b843600635E74Ca\n\n                           ,▄▄███,                                 \n                    ,▄▄███████████▄                                             \n              ▄▄▄███████████████████                                            \n         ,▄██████████████████████████⌐                                          \n      ▄███████████████████████████████▄                                         \n   ▄███████████████████████████████████▄                                        \n  ██████████████████████████████████████▄                                       \n   ▀█████████████████████████████████████▄                                      \n     █████████████████████████████████████▄           ,▄▄▄████▌                 \n      ▀████████████████████████████████████▌   ,▄▄▄██████████▀                  \n        ███████████████████████████▀▀▀' ,▄▄██████████████▀▀'                    \n         ▀██████████████████▀▀▀` ,▄▄▄████████████▀▀▀'                           \n          ╙███████████▀▀\"  ,▄▄██████████████████▄                               \n            ███▀▀`  ,▄▄▄██████████████▀▀▀` -`` \"▀▀█▄,                           \n             ▀█▄▄███████████████▀▀' ▄▄▄             ▀█,                         \n         ,▄▄███████████████▀▀` ▄      ▀▀███████████   █▄                        \n    ▄▄████████████████▀▀'   ,,,▐█       ██▀,▄▄∞██▀█    █▌                      \n▄███████████▀▀ ████▀   ▄▄██▀▀▀▀██▌      ███▀   ▀▀▐█    ▐█      ,▄▄              \n▐█████▀▀▀     ███▀   ▄█\" █▀  ,█╓██▌     ▀█▄    ,▄█`,▄▄▄▄██▄,   `▀██             \n ▀▀          ▐██▌  ╓██ ,█▀  ╓█▄▀ ▐█        ▀▀▀▀▀▀▄████████████████▀             \n             ███  ▄██▌▄█▀  ▄▀▄▀ ▄▀█    ,▄███████████▀   ▐█  ▀▀`                 \n            ▐██▌ ▐█ ▀██▌  ▄▀▄` █`▄▌   ████▀▀▀████▀▀'▄▄   █▌                     \n            ▐██▌  █   '▀██▌█,▄█▄█▀  ╓███▀  ▄r ,▄▄▄▄▄ ▐▌ ]█                      \n            ▐██▌  █U      `▀▀▀▀ ▄▄ ¿███   ]█▌ ▀╓▄M+  '  ██                      \n             ███  ▐▌           ╘█▄▄██▀     ▀▀          ╓█▌                      \n             ███▌ j█              -                   ╓█▀                       \n              ███▄ █                                 ▄█▀                ▄██████▄\n               █████                               ▄██▀               ,██▀ `▀▀` \n                ▀████▄                          ▄▄██▀                ▄█▀        \n                   ▀████▄▄                 ,▄▄███▀██▄               ██          \n                      ▀▀▀████████▄▄██████████▀  █  ▐██▄▄          ,██           \n                          ▀█▄ -'▀█   ╙█  █`  ▀██▌ █▀ ▐█▀███▄▄▄  ▄██▀            \n                           ╙█▄   █▌   █▌██▄   █▀▀▄ █▄▐█µ  ▀▀█████▀              \n                            ▐██   ▀▀█ ▐█▀  ████  ╙█ ▐▄▀█                        \n                            ████   ]█  █   ▐█ \"█,  █▀  ▀█                       \n                           ▄█▀▀██   ╙█▄▐▄  █▌   █▄ ▐█   ▀█                      \n                          ▐█▌  ██     ▀██▄ █▌    █▄ █    ██                     \n                          ██   ██▌      ▀█▄▀█,   █▌██     █▌                    \n                         ██`   ███▄█▄▄    ██m██▄█▀ ▐█     ▐█                    \n                        ▐██▄██▀██`╒█▀▀▀▀▀▀ ▀█▄  █  █▀      █`                   \n                        ▀▀'    ██ █▌          ▀▀██▀        █▌                   \n                              '▀  '              ▀         ▀`   \n    \n    ▄▄███▄▄·██╗██████╗     ████████╗ ██████╗ ██╗  ██╗███████╗███╗   ██╗\n    ██╔════╝██║██╔══██╗    ╚══██╔══╝██╔═══██╗██║ ██╔╝██╔════╝████╗  ██║\n    ███████╗██║██████╔╝       ██║   ██║   ██║█████╔╝ █████╗  ██╔██╗ ██║\n    ╚════██║██║██╔══██╗       ██║   ██║   ██║██╔═██╗ ██╔══╝  ██║╚██╗██║\n    ███████║██║██║  ██║       ██║   ╚██████╔╝██║  ██╗███████╗██║ ╚████║\n    ╚═▀▀▀══╝╚═╝╚═╝  ╚═╝       ╚═╝    ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═╝  ╚═══╝\n\n    initial supply 1.000.000.000 $IR\n    to be burned     750.000.000 $IR\n    final supply     250.000.000 $IR\n\n    TAXES -------------------------------------------------------------\n\n    - on sell 2% buyback & burn on the mainnet\n      (on other networks added to treasury tax)\n    - on buy, 2% added to liquidity\n    - treasury 8%\n\n    Total buy/sell tax 10%.\n\n    wallet to wallet is not taxed.\n\n    Burn and sell tax will end when the burn is completed.\n    Auto buyback and burn works only on eth mainnet.\n\n    Slippage up to 12%-15% will be required on sell/buy because of taxes!\n\n    LIQUIDITY LOCK ----------------------------------------------------\n\n    After address [0xAB] provides liquidity, we simply prevent any transaction, \n    from this address, with tokens in liquidity.\n    Liquidity can't be removed manually before the set time (there is no such \n    function in the contract), nor can it be removed using Uniswap. \n    (Similar goes for other networks).\n\n    setLock(address, timestamp) and [0xAB] (LP PROV.) tokens are locked.\n\n    Lock time can't be shortened but it can be increased.\n    We will not remove any liquidity until our next project is launched.\n    If we can't open our next platform to the public on time, we will extend\n    the liquidity lock until we are sure we can open our next platform to \n    the public.\n\n    setLock(address, timestamp) sets or extends lock timestamp.\n\n    All these actions are ofc logged on the blockchain.\n    \n    isLiqudityLocked() returns true or false.\n    LiqudityIsLockedUntil() returns timestamp.\n    unlock() unlocks liquidity if timer expired.\n\n    Details and info on: https://dapp.sirtoken.com\n\n    LOCKED TOKENS -----------------------------------------------------\n\n    There are only three wallets with locked tokens ...\n    SEED 90 days 37.5 mil.\n    TEAM 90 days 10 mil.\n    RESERVE 60 days 30 mil.\n\n    There is no function in the contract that would enable unlocking before\n    previously set time.\n    \n    setLocked(address, timestamp) to lock or extend lock time.\n    AccountIsLockedUntil() returns timestamp.\n    isAccountLocked(address) returns true/false\n\n    LIMITS ---------------------------------------------------------\n    \n    The default max transfer amount by default is 1% of the current supply.\n    This can be checked with getMaxTransactionAmount()\n    or on https://dapp.sirtoken.com\n\n    The default max sell amount by default is 0.3% of current liquidity tokens\n    that round to about 1 mil $IR at market initialisation.\n    This can be checked with getMaxSellAmount()\n    or on https://dapp.sirtoken.com\n\n    The default max buy amount by default is 0.3% of current liquidity tokens.\n    that round to about 1 mil $IR at market initialisation.\n    This can be checked with getMaxBuyAmount()\n    or on https://dapp.sirtoken.com\n\n    All transfer limits are disabled after the burn ends.\n\n    Be aware:\n        - if you ware to provide liquidity you will be taxed the same as if \n        you were selling tokens!\n        - maximum liquidity that you could add is also limited to default\n        0.3% of current liquidity tokens!\n\n    -------------------------------------------------------------------\n\n    \n    web: https://sirtoken.com\n    dapp: https://dapp.sirtoken.com\n    twitter: https://twitter.com/likeaSIRtoken\n    telegram: https://t.me/SirToken\n\n    dev: [email protected]\n\n    KEYS\n    --------------\n    BURN      0xA0 | LIQUIDITY 0xA1 | TREASURY  0xA2 | PROXY     0xA3\n    DEV       0xA4 | ADVISORS  0xA5 | TEAM      0xA6 | MARKETING 0xA7\n    RESERVE   0xA8 | SEED      0xA9 | AIRDROPS  0xAA | LP PROV.  0xAB\n    PAIR      0xB3 | FACTORY   0xB4 | ROUTER    0xB2 | WETH      0xB1\n    LP ADDR.  0xB0 |\n\n    ERROR CODES\n    ----------------------------------------------------------------\n    00  Zero amount\n    01  Zero address\n    02  balance is zero \n    03  this tax no longer applies\n    04  amount > than the allowance\n    05  amount > than balance\n    06  buy amount over the maximum\n    07  base fee is over 8%\n    08  Caller is not the owner\n    09  value same as current\n    10  LP time locked\n    11  address time locked\n    12  trading is not enabled\n    13  transaction amount over the maximum\n    14  sell amount over the maximum\n    15  timestamp is in past\n    16  amount > than the current Ethereum balance\n    17  total tax is over 15%\n    18  we are at the max burn\n    19  we are not on the Etherum mainnet\n    20  values can be only 1 to 10\n    21  BuyBack&burn is not enabled\n    22  over maximum\n    23  only non-native token\n    24  already used\n    25  Invalid index\n    26  timestamp must extend the lock time\n    27  amount to low\n    28  not over threshold\n    29  tax not enabled\n----------------------------------------------------------------*/\npragma solidity 0.8.17;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/utils/Context.sol\";\nimport \"@openzeppelin/contracts/utils/Counters.sol\";\nimport \"@openzeppelin/contracts/utils/Address.sol\";\nimport \"@openzeppelin/contracts/utils/math/Safemath.sol\";\nimport \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\";\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol\";\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol\";\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\";\n\nlibrary UniswapV2Library {\n    using SafeMath for uint;\n\n    function sortTokens(address tokenA, address tokenB) internal pure returns(address token0, address token1) {\n        require(tokenA != tokenB, \"09\");\n        (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);\n        require(token0 != address(0), \"01\");\n    }\n\n    function pairFor(address factory, address tokenA, address tokenB) internal pure returns(address pair) {\n        (address token0, address token1) = sortTokens(tokenA, tokenB);\n        pair = address(uint160(uint(keccak256(\n            abi.encodePacked(hex\"ff\", factory, keccak256(abi.encodePacked(token0, token1)), \n            hex\"96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f\"\n        )))));\n    }\n\n    function getReserves(address factory, address tokenA, address tokenB) internal view returns(uint reserveA, uint reserveB) {\n        (address token0,) = sortTokens(tokenA, tokenB);\n        (uint reserve0, uint reserve1,) = IUniswapV2Pair(pairFor(factory, tokenA, tokenB)).getReserves();\n        (reserveA, reserveB) = tokenA == token0 ? (reserve0, reserve1) : (reserve1, reserve0);\n    }\n}\n\n/// @dev for external swap eth to token\ncontract Proxy {\n    address private main;\n\n    receive() external payable {}\n    fallback() external payable {}\n\n    modifier onlyMainContract {\n        require(msg.sender == main, \"19\");\n        _;\n    }\n\n    constructor(address address_) payable {\n        main = address_;\n    }\n\n    function sendEth() public onlyMainContract {\n        payable(main).transfer(address(this).balance);\n    }\n}\n\ncontract SirToken is IERC20, Context {\n    using SafeMath for uint;\n    using EnumerableSet for EnumerableSet.AddressSet;\n\n    mapping(address => uint256) private _balances;\n    mapping(address => mapping(address => uint256)) private _allowances;\n    mapping(address => uint256) private _locked;\n    mapping(bytes1 => address) private _address;\n\n    EnumerableSet.AddressSet private ExcludedFromFee;\n    EnumerableSet.AddressSet private ExcludedFromMaxTx;\n    EnumerableSet.AddressSet private Airdrops;\n\n    IUniswapV2Router02 private _dexRouter;\n    address private _dexPair;\n    address private _owner;\n    \n    Proxy public proxy;\n    bool inSwap;\n\n    uint8 private constant _decimals = 18;\n    string private constant _name = \"SIR Token\";\n    string private constant _symbol = \"$IR\";\n\n    uint256 private constant _multiplier = 10 ** _decimals;\n    uint256 private constant _initialSupply = 1000000000 * _multiplier;\n    address private constant DEAD = 0x000000000000000000000000000000000000dEaD;\n    uint256 private tradingStartTime;\n\n    struct Booleans {\n        bool buyBack;\n        bool isMainNet;\n        bool isTradingEnabled;\n        bool autoDistributeFees;\n        bool limitsEnabled;\n        bool feesEnabled;\n        bool autoProcessFees;\n        bool swapEnabled;\n        bool liquidityLocked;\n    }\n    Booleans private Bool;\n\n    struct Taxes {\n        bool enabled;\n        bool previousState;\n        uint256 percent;\n        uint256 previousPercent;\n        uint256 ethBalance;\n        uint256 balance;\n        uint256 sirThreshold;\n        uint256 ethThreshold;\n    }\n    mapping(bytes1 => Taxes) private Tax;\n    \n    struct Totals {\n        uint8 lockedAccounts;\n        uint256 baseTax;\n        uint256 buyTax;\n        uint256 sellTax;\n        uint256 supply;\n        uint256 burned;\n        uint256 buyback;\n        uint256 liquidatedTokens;\n        uint256 liquidatedEthers;\n        uint256 airdropped;\n        uint256 sirFromFees;\n        uint256 ethFromFees;\n    }\n    Totals private Total;\n\n    struct MaxVal {\n        uint256 sellPercent;\n        uint256 buyPercent;\n        uint256 txPercent;\n        uint256 sellAmount;\n        uint256 buyAmount;\n        uint256 txAmount;\n        uint256 burn;\n        uint256 airdrop;\n    }\n    MaxVal private Max;\n\n    event AccountExcludedFromFee(address address_, bool excluded);\n    event AccountExcludedFromMaxTx(address address_, bool excluded);\n    event AccountUnlocked(address account, uint256 timestamp);\n    event AddedLiquidity(uint256 eth, uint256 token);\n    event AddressSet(bytes1 index, address previous, address A);\n    event Airdroped(address A, uint256 amount);\n    event AutoBuyBackAndBurnEnabled(bool enabled);\n    event AutoDistributeFeesEnabled(bool enabled);\n    event AutoSwapEnabled(bool enabled);\n    event BoughtBackAndBurned(uint256 amountETH, uint256 toBurn);\n    event Burned(address account, uint256 amount);\n    event BurnEnded(uint256 timestamp, uint256 number);\n    event FeesEnabled(bool enabled);\n    event LimitsEnabled(bool enabled);\n    event LiquidityLockSet(address address_, uint256 previousTime, uint256 timestamp);\n    event LiquidityUnlocked(address account, uint256 timestamp);\n    event LockSet(address address_, uint256 previousTime, uint256 timestamp);\n    event MaxBuyPercentChanged(uint256 previous, uint256 percent);\n    event MaxSellPercentChanged(uint256 previous, uint256 percent);\n    event MaxTransactionChanged(uint256 previousPercent, uint256 percent, uint256 previosAmount, uint256 amount);\n    event Minted(address address_, uint256 amount_);\n    event NewThresholdSet(bytes1 index, uint256 previous, uint256 amount, bool ethThreshold);\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n    event RouterUpdated(address previousAddress, address router, address previousPair, address _pair);\n    event SentFees(uint256 total);\n    event SetLpProvider(address address_, bool isSet);\n    event TaxSet(bytes1 index, uint256 percent, bool enabled);\n    event TradingEnabled(bool enabled, uint256 block, uint256 time);\n    event WithdrawnERC20(address token, address ownerAddress, uint256 amount);\n    event WithdrawnETH(address address_, uint256 amount);\n\n    modifier lockTheSwap() {\n        inSwap = true;\n        _;\n        inSwap = false;\n    }\n\n    modifier onlyOwner() {\n        require(owner() == _msgSender(), \"08\");\n        _;\n    }\n\n    constructor (\n        address routerAddress_ // 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n    ) payable {\n        _owner = _msgSender();\n        emit OwnershipTransferred(address(0), _owner);\n    \n        Bool = Booleans(true, false, false, true, true, true, true, true, false);\n\n        proxy = new Proxy(address(this));\n        _address[0xA0] = 0xcA3075C9ea6036a30027d5eC2009DEaF40c68492; // burn\n        _address[0xA1] = 0xd8bAD6bef968e93Cff6614336dDfb4bc5Bb5b1B4; // liquidity\n        _address[0xA2] = 0xB0B821b6588c9bd329cf8BF2837BD46fD44368d8; // treasury\n        _address[0xA3] = payable(proxy);                             // proxy\n        _address[0xA4] = 0x8D84381e3261f12C15C6c2ab87D05E1692aB9d85; // dev\n        _address[0xA5] = 0xf2eBcBdE26E2903f7de1A9EbBDF7f8594621D183; // advisors\n        _address[0xA6] = 0xa168f350c0B9Cc1c9a32bAAc64b82A1E0298C8EB; // team\n        _address[0xA7] = 0xb2584e5e922B08Ed38b5179825CAC578CC2377D5; // marketing\n        _address[0xA8] = 0xd57210E74D76df532E7E8Bb60C828dAB5BC3e00a; // reserve \n        _address[0xA9] = 0xb2c6c4994a47dfC327270F0835796cc25735EbDE; // seed investor\n        _address[0xAA] = 0xbb3e0f9eC231eB1AAc41ea422A91D16923eca8F4; // airdrops\n        _address[0xAB] = 0x39D4C8638a4c0679292a03628bA9c039533128eC; // LP provider address\n        _address[0xAC] = 0x604861ad9b4212A938547C63e77D00815fDB0f5a; // liquify reserve address\n\n        IUniswapV2Router02 router = IUniswapV2Router02(routerAddress_);\n        _dexRouter = router;\n        _address[0xB1] = _dexRouter.WETH();\n        _dexPair = IUniswapV2Factory(router.factory()).createPair(address(this), _address[0xB1]);\n        _address[0xB4] = address(router.factory());\n        _address[0xB2] = address(_dexRouter);\n        _address[0xB3] = address(_dexPair);\n        _address[0xB0] = getLiquidityPoolAddress();\n        Bool.isMainNet = isRouterUniswap();\n\n        ExcludedFromFee.add(_owner);\n        ExcludedFromFee.add(address(this));\n\n        ExcludedFromFee.add(_address[0xA0]);\n        ExcludedFromFee.add(_address[0xA1]);\n        ExcludedFromFee.add(_address[0xA2]);\n        ExcludedFromFee.add(_address[0xA3]);\n        ExcludedFromFee.add(_address[0xA8]);\n        ExcludedFromFee.add(_address[0xAB]);\n        ExcludedFromFee.add(_address[0xAA]);\n\n        ExcludedFromMaxTx.add(_owner);\n        ExcludedFromMaxTx.add(address(this));\n\n        ExcludedFromMaxTx.add(_address[0xA0]);\n        ExcludedFromMaxTx.add(_address[0xA1]);\n        ExcludedFromMaxTx.add(_address[0xA2]);\n        ExcludedFromMaxTx.add(_address[0xA3]);\n        ExcludedFromMaxTx.add(_address[0xB2]);\n        ExcludedFromMaxTx.add(_address[0xB3]);\n        ExcludedFromMaxTx.add(_address[0xAB]);\n\n        Max = MaxVal(30, 30, 100, 0, 0, 0, 750000000 * _multiplier, 2000000 * _multiplier);\n\n        if (Bool.isMainNet) {\n            /// @dev tokens for Polygon are sent to Owner since 0xAB will be locked on mainnet\n            __mint(_address[0xAB], 350000000 * _multiplier);   // Main LP\n            __mint(_address[0xA6],  10000000 * _multiplier);   // team\n            __mint(_address[0xA8],  30000000 * _multiplier);   // reserve\n            __mint(_address[0xA9],  37500000 * _multiplier);   // seed investor\n            __mint(_address[0xA7],   5000000 * _multiplier);   // marketing\n            __mint(_address[0xA5],   3000000 * _multiplier);   // advisors\n            __mint(_address[0xAA], Max.airdrop);               // airdrop 2.000.000\n            __mint(_owner, _initialSupply - Total.supply);\n        }\n    }\n\n    receive() external payable {}\n    fallback() external payable {}\n\n    /**\n     *  @dev sets new router address\n     *  @param address_ address router\n     *  @notice Required:\n     *      - address has to be different from the current router address\n     *      - address \n     *  @notice Emits:\n     *      {RouterUpdated} address previous, address new, address previous pair, address new pair\n     */\n    function setRouter(\n        address address_\n    ) public onlyOwner {\n        validAddress(address_);\n        require(address_ != _address[0xB2], \"09\");\n        address previousAddress = _address[0xB2];\n        address previousPair = _address[0xB3];\n\n        IUniswapV2Router02 router = IUniswapV2Router02(address_);\n        _dexRouter = router;\n\n        _address[0xB1] = _dexRouter.WETH();\n        address pair = IUniswapV2Factory(router.factory()).getPair(address(this), _address[0xB1]);\n        if (pair == address(0)) {\n            _dexPair = IUniswapV2Factory(router.factory()).createPair(address(this), _address[0xB1]);\n        } else {\n            _dexPair = pair;\n        }\n\n        _address[0xB4] = address(router.factory());\n        _address[0xB2] = address(_dexRouter);\n        _address[0xB3] = address(_dexPair);\n        _address[0xB0] = getLiquidityPoolAddress();\n        Bool.isMainNet = isRouterUniswap();\n\n        emit RouterUpdated(previousAddress, _address[0xB2], previousPair, _address[0xB3]);\n    }\n\n    /**\n     *  @dev initialize trading\n     *  @notice Emits:\n     *      {TradingEnabled} bool, uint256 block, uint256 timestamp\n     */ \n    function initialize() external onlyOwner {\n        if (!Bool.isTradingEnabled) {\n            setDefaultVars(0xA0);\n            setDefaultVars(0xA1);\n            setDefaultVars(0xA2);\n\n            Max.sellAmount = _getMaxSellAmount();\n            Max.buyAmount = _getMaxBuyAmount();\n            Max.txAmount = _getMaxTransactionAmount();\n\n            tradingStartTime = block.timestamp;\n            Bool.isTradingEnabled = true;\n\n            setLock(_address[0xA8], tradingStartTime + 60 days);\n            setLock(_address[0xA9], tradingStartTime + 90 days);\n            setLock(_address[0xA6], tradingStartTime + 90 days);\n\n            emit TradingEnabled(true, block.number, tradingStartTime);\n        }\n    }\n\n    /**\n     *  @dev Sets default taxes.\n     * \n     *  Tax[index].enabled     (enable/disable = true/false)\n     *  Tax[index].percent     (integer 0 - 9 | multiplied by 100)\n     *  Tax[index].sirThreshold   (integer x * 10**18)\n     *  Tax[index].ethThreshold   (integer x * 10**18)\n     * \n     *  @param index_ bytes1 (lookup Keys)\n     *  defult:\n     *      - treasury 8%,  (800)\n     *      - burn 2%,      (200)\n     *      - liquidity 2%  (200)\n     */\n    function setDefaultVars(\n        bytes1 index_\n    ) private {\n        Tax[index_].enabled = true;\n        Tax[index_].percent = index_ == 0xA2 ? 800 : 200;\n        Tax[index_].sirThreshold = index_ == 0xA2 ? 400000 * _multiplier : 100000 * _multiplier;\n        Tax[index_].ethThreshold = 1e15;\n        if (index_ == 0xA2) {\n            Total.baseTax = Tax[0xA2].percent;\n        }\n        Total.buyTax = Total.baseTax + Tax[0xA0].percent;\n        Total.sellTax = Total.baseTax + Tax[0xA1].percent;\n    }\n\n    /// @dev returns owner address\n    function owner() public view virtual returns(address) {\n        return _owner;\n    }\n\n    /**\n     *  @dev transfers ownership & possible tokens on balance\n     *  @param address_ address\n     *  @notice Reuired:\n     *      - validAddress(address_) non 0 address\n     *      - new Owner address is different from current _owner address\n     *  @notice Emits:\n     *      {OwnershipTransferred} address _owner, address address_\n     */\n    function transferOwnership(\n        address address_\n    ) public onlyOwner {\n        validAddress(address_);\n        _transferOwnership(address_);\n    }\n\n    /**\n     *  @dev transfers ownership & possible tokens on balance\n     *  @param address_ address\n     *  @notice Reuired:\n     *      - address should not be 0 address or DEAD address\n     *      - new Owner address must different from current _owner address\n     */\n    function _transferOwnership(\n        address address_\n    ) internal virtual {\n        validAddress(address_);\n        require(address_ != _owner, \"09\");\n        ExcludedFromFee.remove(_owner);\n        ExcludedFromMaxTx.remove(_owner);\n        ExcludedFromFee.add(address_);\n        ExcludedFromMaxTx.add(address_);\n        if (_balances[_owner] > 0) {\n            moveBalance(_owner, address_);\n        }\n        _owner = address_;\n        emit OwnershipTransferred(_owner, address_);\n    }\n\n    /**\n     *  @dev Get the name of the token.\n     *  @return string name\n     */\n    function name() public pure returns(string memory) {\n        return _name;\n    }\n\n    /**\n     *  @dev Get the symbol of the token, usually a shorter version of the name.\n     *  @return string symbol\n     */\n    function symbol() public pure returns(string memory) {\n        return _symbol;\n    }\n\n    /**\n     *  @dev See IERC20-decimals.\n     *  @return uint8 decimal\n     */\n    function decimals() public pure returns(uint8) {\n        return _decimals;\n    }\n\n    /**\n     *  @dev See IERC20-totalSupply.\n     *  @return uint256 token total initial supply\n     */\n    function totalSupply() public view override returns(uint256) {\n        return Total.supply;\n    }\n\n    /**\n     *  @dev Get account token balance.\n     *  @param address_ address\n     *  @return uint256 account balance\n     */\n    function balanceOf(\n        address address_\n    ) public view override returns(uint256) {\n        return _balances[address_];\n    }\n\n    /// @dev See IERC20-transfer.\n    function transfer(\n        address recipient_,\n        uint256 amount_\n    ) public override returns(bool) {\n        _transfer(_msgSender(), recipient_, amount_);\n        return true;\n    }\n\n    /// @dev See IERC20-allowance\n    function allowance(\n        address owner_,\n        address spender_\n    ) public view override returns(uint256) {\n        return _allowances[owner_][spender_];\n    }\n\n    /// @dev See IERC20-approve\n    function approve(\n        address spender_,\n        uint256 amount_\n    ) public override returns(bool) {\n        _approve(_msgSender(), spender_, amount_);\n        return true;\n    }\n\n    /// @dev See IERC20-transferFrom\n    function transferFrom(\n        address sender_,\n        address recipient_,\n        uint256 amount_\n    ) public override returns(bool) {\n        _transfer(sender_, recipient_, amount_);\n        _approve(sender_, _msgSender(), _allowances[sender_][_msgSender()].sub(amount_, \"04\"));\n        return true;\n    }\n\n    /**\n     *  @dev Sets amount_ as the allowance of spender_ over the owner`s tokens.\n     *  This internal function is equivalent to `approve`, and can be used to\n     *  e.g. set automatic allowances for certain subsystems, etc.\n     *  @notice Emits: \n     *      {Approval} event.\n     *  @notice Required:\n     *      - owner_ can't be zero address.\n     *      - spender_ can't be zero address.\n     */\n    function _approve(\n        address owner_,\n        address spender_,\n        uint256 amount_\n    ) private {\n        validAddress(owner_);\n        validAddress(spender_);\n        _allowances[owner_][spender_] = amount_;\n        emit Approval(owner_, spender_, amount_);\n    }\n\n    /**\n     *  @dev base token transfer\n     *  @param sender_ address\n     *  @param recipient_ address\n     *  @param amount_ uint256\n     *\n     *  @notice Required:\n     *      - sender_ can't be zero address\n     *      - recipient_ can't be zero address\n     *      - amount_ must be greater than 100 wei because under certain conditions\n     *        when the amount is less than 100 wei we get wrong amounts in fee calculations \n     *        later in processing functions. This has been tested and amounts over 100 are OK.\n     *      - amount_ must be less or equal to sender_ balance\n     *      \n     *  @notice Emits:\n     *      {Transfer} address_ from, address_ to, amount_ tokens\n     */\n    function _transfer(\n        address sender_,\n        address recipient_,\n        uint256 amount_\n    ) private {\n        validAddress(sender_);\n        validAddress(recipient_);\n        require(amount_ > 100 wei, \"27\");\n        require(amount_ <= _balances[sender_], \"05\");\n\n        bool SenderIsPair = sender_ == _address[0xB3];\n        bool SenderExcludedFromFee = ExcludedFromFee.contains(sender_);\n        \n        bool txBuy = SenderIsPair && recipient_ != _address[0xB2];\n        bool txSell = recipient_ == _address[0xB3] && sender_ != _address[0xB2];\n        bool txTransfer = !txBuy && !txSell;\n        \n        if (!Bool.isTradingEnabled) {\n            /// @dev only addresses excluded from fee can transfer brefore trading is enabled\n            require(SenderExcludedFromFee || ExcludedFromFee.contains(recipient_), \"12\");\n        } else {\n            /// @dev check if sender or recipient is LP provider or locked address\n            if (Total.lockedAccounts > 0) {\n                require(!_checkLock(sender_), sender_ == _address[0xAB] ? \"10\" : \"11\");\n                require(!_checkLock(recipient_), recipient_ == _address[0xAB] ? \"10\" : \"11\");\n            }\n            if (Bool.limitsEnabled) {\n                if (!ExcludedFromMaxTx.contains(sender_) || \n                    !ExcludedFromMaxTx.contains(recipient_)) {\n                    require(amount_ <= Max.txAmount, \"13\");\n                    if (txSell) {\n                        require(amount_ <= Max.sellAmount, \"14\");\n                    } else if (txBuy) {\n                        require(amount_ <= Max.buyAmount, \"06\");\n                    }\n                }\n            }\n        }\n\n        /**\n         *  @dev just transfer if in swap, transfer, excluded or sender is \n         *  router (LP remove)\n         */\n        if (inSwap || \n            txTransfer || \n            SenderExcludedFromFee || \n            sender_ == _address[0xB2]) {\n            return transferBalance(sender_, recipient_, amount_);\n        } else {\n            if (Bool.feesEnabled) {\n                uint256 _fee;\n                /// @dev burn & liquidiy fee only util the end of burn\n                if (Bool.buyBack) {\n                    if (txSell && Tax[0xA0].enabled) {\n                        _fee += _processFee(sender_, amount_, 0xA0);\n                    } else\n                    if (txBuy && Tax[0xA1].enabled) {\n                        _fee += _processFee(sender_, amount_, 0xA1);\n                    }\n                }\n                /// @dev calculate treasury fee\n                if (Tax[0xA2].enabled) {\n                    _fee += _processFee(sender_, amount_, 0xA2);\n                }\n                amount_ -= _fee;\n            }\n\n            if (Bool.swapEnabled && !SenderIsPair) { \n                if (isOverThresholdE(0xA0)) {\n                    _buyBackAndBurn();\n                } else \n                if (isOverThresholdE(0xA1)) {\n                    _addLiquidity();\n                } else \n                if (isOverThresholdE(0xA2)) {\n                    _distributeFees();\n                } else \n                if (Bool.isMainNet && \n                    Bool.buyBack && \n                    Tax[0xA0].enabled && \n                    isOverThresholdT(0xA0)) {\n                    _processBurnFees();\n                } else \n                if (Bool.buyBack && \n                    Tax[0xA1].enabled && \n                    isOverThresholdT(0xA1)) {\n                    _processLiquidityFees();\n                } else \n                if (Tax[0xA2].enabled && \n                    isOverThresholdT(0xA2)) {\n                    _processTreasuryFees();\n                }\n            }\n\n            transferBalance(sender_, recipient_, amount_);\n        }\n    }\n\n    /**\n     *  @dev calculates fee by tax index\n     *  @param sender_ address\n     *  @param amount_ uint256\n     *  @param index_ bytes1 0xA0, 0xA1, and 0xA2\n     *  @return fee uint256\n     *  @notice transfers fee from sender_ to tax address\n     */\n    function _processFee(address sender_, uint256 amount_, bytes1 index_) private returns(uint256 fee) {\n        fee = amount_.mul(Tax[index_].percent).div(1e4);\n        if (index_ == 0xA0 && !Bool.isMainNet) {\n            index_ = 0xA2;\n        }\n        transferBalance(sender_, _address[index_], fee);\n        return fee;\n    }\n\n    function processBurnFees() external onlyOwner {\n        require(isOverThresholdT(0xA0), \"28\");\n        _processBurnFees();\n    }\n\n    function processLiquidityFees() external onlyOwner {\n        require(isOverThresholdT(0xA1), \"28\");\n        _processLiquidityFees();\n    }\n\n    function processTreasuryFees() external onlyOwner {\n        require(isOverThresholdT(0xA2), \"28\");\n        _processTreasuryFees();\n    }\n\n    function processBuyBack() external onlyOwner {\n        require(isOverThresholdE(0xA0), \"28\");\n        _buyBackAndBurn();\n    }\n\n    function processLiquidity() external onlyOwner {\n        require(isOverThresholdE(0xA1), \"28\");\n        _addLiquidity();\n    }\n\n    function distributeFees() external onlyOwner {\n        require(isOverThresholdE(0xA2), \"28\");\n        _distributeFees();\n    }\n\n    /**\n     *  @dev processes collected burn fees\n     *  also adds treasury fees if over threshold\n     */\n    function _processBurnFees() private {\n        uint256 b = _balances[_address[0xA0]];\n        moveBalance(_address[0xA0], address(this));\n        bool t;\n        if (Tax[0xA2].enabled && isOverThresholdE(0xA2)) {\n            b += _balances[_address[0xA2]];\n            moveBalance(_address[0xA2], address(this));\n            t = true;\n        }\n        uint256 e = _swapTokensForEth(b);\n        if (t) {\n            uint256 p = e.div(Tax[0xA0].percent + Tax[0xA2].percent);\n            uint256 r = p * Tax[0xA2].percent;\n            Tax[0xA2].ethBalance += r;\n            e -= r;\n        }\n        Tax[0xA0].ethBalance += e;\n    }\n\n    /**\n     *  @dev processes collected liquidity fees\n     */\n    function _processLiquidityFees() private {\n        uint256 b = _balances[_address[0xA1]];\n        moveBalance(_address[0xA1], address(this));\n        uint256 h = b / 2;\n        uint256 e = _swapTokensForEth(h);\n        Tax[0xA1].ethBalance += e;\n        _balances[_address[0xAC]] += b - h;\n    }\n\n    /**\n     *  @dev processes collected treasury fees\n     */\n    function _processTreasuryFees() private {\n        uint256 b = _balances[_address[0xA2]];\n        Total.sirFromFees += b;\n        moveBalance(_address[0xA2], address(this));\n        Tax[0xA2].ethBalance += _swapTokensForEth(b);\n    }\n\n    /**\n     *  @dev distributes collected ethers to trasury and dev\n     *  @notice Emits:\n     *      {SentFees} amount eth\n     */\n    function _distributeFees() private {\n        uint256 b = Tax[0xA2].ethBalance;\n        Tax[0xA2].ethBalance = 0;\n        uint256 p = b.mul(Total.baseTax * 2).div(1e4);\n        payable(_address[0xA2]).transfer(b - p);\n        payable(_address[0xA4]).transfer(p);\n        Total.ethFromFees += b;\n        emit SentFees(b);\n    }\n\n    /**\n     *  @dev checkes if tax ether balance over threshold\n     *  @return bool\n     */\n    function isOverThresholdE(\n        bytes1 index_\n    ) private view returns(bool) {\n        return Tax[index_].ethBalance > Tax[index_].ethThreshold;\n    }\n\n    /**\n     *  @dev checkes if tax token balance over threshold\n     *  @return bool\n     */\n    function isOverThresholdT(\n        bytes1 index_\n    ) private view returns(bool) {\n        return _balances[_address[index_]] > Tax[index_].sirThreshold;\n    }\n\n    /**\n     *  @dev exclude or include an account in taxed list\n     *  @param address_ address\n     *  @notice Emits:\n     *      {AccountExcludedFromFee} address account, bool true / false\n     */\n    function setAccountExcludedFromFee(\n        address address_\n    ) external onlyOwner {\n        if (ExcludedFromFee.contains(address_)) {\n            ExcludedFromFee.remove(address_);\n            emit AccountExcludedFromFee(address_, false);\n        } else {\n            ExcludedFromFee.add(address_);\n            emit AccountExcludedFromFee(address_, true);\n        }\n    }\n\n    /**\n     *  @dev exclude or include an account in max transfer list\n     *  @param address_ address\n     *  @notice Reqired:\n     *      - only owner account\n     *  @notice Emits:\n     *      {AccountExcludedFromMaxTx} address account, bool true / false\n     */\n    function setAccountExcludedFromMaxTx(\n        address address_\n    ) external onlyOwner {\n        if (ExcludedFromMaxTx.contains(address_)) {\n            ExcludedFromMaxTx.remove(address_);\n            emit AccountExcludedFromFee(address_, false);\n        } else {\n            ExcludedFromMaxTx.add(address_);\n            emit AccountExcludedFromMaxTx(address_, true);\n        }\n    }\n\n    /**\n     *  @dev adds time lock to accounts tokens\n     *  @param address_ address\n     *  @param timestamp_ uint256 locked unitil timestamp\n     *  @notice Required:\n     *      - address_ is address of SEED, TEAM, RESERVE, or POOL (lp provider)\n     *  @notice Emits:\n     *      {LiquidityLockSet} address_ address, previousTime timestamp uint256, timestamp uint256\n     *      {LockSet} address_ address, previousTime timestamp uint256, timestamp uint256\n     */\n    function setLock(\n        address address_, \n        uint256 timestamp_\n    ) public onlyOwner {\n        validAddress(address_);\n        require(\n            address_ == _address[0xA6] || \n            address_ == _address[0xA8] ||\n            address_ == _address[0xA9] || \n            address_ == _address[0xAB]\n        );\n        uint256 previousTime;\n        if (_locked[address_] == 0) {\n            require(timestamp_ > block.timestamp, \"15\");\n            _locked[address_] = timestamp_;\n            Total.lockedAccounts += 1;\n        } else {\n            require(timestamp_ > _locked[address_], \"26\");\n            previousTime = _locked[address_];\n            _locked[address_] = timestamp_;\n        }\n        if (address_ == _address[0xAB]) {\n            Bool.liquidityLocked = true;\n            emit LiquidityLockSet(address_, previousTime, _locked[address_]);\n        } else {\n            emit LockSet(address_, previousTime, _locked[address_]);\n        }\n    }\n\n    /// @dev returns locks timestamps\n    function getLockTimes() external view returns(uint256, uint256, uint256, uint256) {\n        return (\n            _locked[_address[0xA6]],\n            _locked[_address[0xA8]],\n            _locked[_address[0xA9]],\n            _locked[_address[0xAB]]\n        );\n    }\n\n    /**\n     *  @dev returns lock state of an account\n     *  @param address_ address\n     *  @return bool locked\n     */\n    function isAccountLocked(\n        address address_\n    ) public view returns(bool) {\n        return (_locked[address_] > 0) ? true : false;\n    }\n\n    /** \n     *  @dev returns account lock timestamp\n     *  @param address_ address\n     *  @return uint256 timestamp\n     */\n    function accountIsLockedUntil(\n        address address_\n    ) external view returns(uint256) {\n        return _locked[address_];\n    }\n\n    /**\n     *  @dev returns lock state of LP provider address\n     *  @return bool locked\n     */\n    function isLiqudityLocked() public view returns(bool) {\n        return _locked[_address[0xAB]] == 0 ? false : true;\n    }\n\n    /**\n     *  @dev returns LP lock timestamp\n     *  @return uint256 timestamp\n     */\n    function liqudityIsLockedUntil() external view returns(uint256) {\n        return _locked[_address[0xAB]];\n    }\n\n    /**\n     *  @dev toggles fees enabled/disabled\n     *  @notice Emits:\n     *      {FeesEnabled} bool\n     */\n    function toggleFeesEnabled() external onlyOwner {\n        Bool.feesEnabled = !Bool.feesEnabled;\n        emit FeesEnabled(Bool.feesEnabled);\n    }\n\n    /**\n     *  @dev toggles limits enabled/disabled\n     *  @notice Emits:\n     *      {LimitsEnabled} bool\n     */\n    function toggleLimitsEnabled() external onlyOwner {\n        Bool.limitsEnabled = !Bool.limitsEnabled;\n        emit LimitsEnabled(Bool.limitsEnabled);\n    }\n\n    /**\n     *  @dev toggles automatic processing of collected fees\n     *  @notice Emits:\n     *      {AutoSwapEnabled} bool\n     */\n    function toggleSwapEnabled() external onlyOwner {\n        Bool.swapEnabled = !Bool.swapEnabled;\n        emit AutoSwapEnabled(Bool.swapEnabled);\n    }\n\n    /**\n     *  @dev toggles automatic distribution of collected fees\n     *  @notice Emits:\n     *      {AutoDistributeFeesEnabled} bool\n     */\n    function toggleAutoDistributeFees() external onlyOwner {\n        Bool.autoDistributeFees = !Bool.autoDistributeFees;\n        emit AutoDistributeFeesEnabled(Bool.autoDistributeFees);\n    }\n\n    /**\n     *  @dev sets tax percentage of specific tax by index_\n     *  @param index_ bytes1\n     *  @param percent_ uint256 | multiply by 100 (100 = 1%, 50 = 0.5%, ...)\n     *  @notice Required:\n     *      - index_ must still be in effect (we are not in post burn era)\n     *      - tax percentage has to be different from current\n     *      - tax percentage for treasury tax has to be less or equal to 8% (800)\n     *      - total sell or burn tax has to be less or equal to 15% (1500)\n     *  @notice Emits:\n     *      {TaxSet} index_ bytes1, percent_ uint256, bool enabled\n     */\n    function setTaxPercentage(\n        bytes1 index_, \n        uint256 percent_\n    ) external onlyOwner {\n        applies(index_);\n        require(Tax[index_].percent != percent_, \"09\");\n        uint256 percent = percent_ > 0 ? percent_ : 0;\n        Tax[index_].previousPercent = Tax[index_].percent;\n        Tax[index_].previousState = Tax[index_].enabled;\n        Tax[index_].enabled = percent > 0 ? true : false;\n        Tax[index_].percent = Tax[index_].enabled ? percent : 0;\n        if (index_ == 0xA2) {\n            require(percent <= 800, \"07\");\n            Total.baseTax = Tax[0xA2].percent;          \n        }\n        Total.sellTax = Total.baseTax + Tax[0xA0].percent;\n        Total.buyTax = Total.baseTax + Tax[0xA1].percent;\n        require(Total.sellTax <= 1500 && Total.buyTax <= 1500, \"17\");\n        emit TaxSet(index_, percent_, Tax[index_].enabled);\n    }\n\n    /**\n     *  @dev Other networks will not \"know\" if it's enabled or disabled.\n     *      We need ability to disable or re-enable autobuybackandburn.\n     *  @notice If something goes wrong it can also be turned on/off\n     *      manually by the contract owner, but can be re-enabled only on main net;\n     *      it will be auto disabled if total supply is equal or less then max burn\n     *  @notice Requires if value_ is true:\n     *      - Total of burned tokens must be less than Max.burn var\n     *      - isMainNet is true eg. we have to be on ethereum mainnet\n     *  @notice Emits:\n     *      {AutoBuyBackAndBurnEnabled} bool value_\n     */\n    function setAutoBuyBackAndBurn(\n        bool value_\n    ) external onlyOwner {\n        if (value_) {\n            require(Total.burned < Max.burn, \"18\");\n            require(Bool.isMainNet, \"19\");\n            Tax[0xA0].enabled = Tax[0xA0].previousState;\n            Tax[0xA0].percent = Tax[0xA0].previousPercent;\n            Tax[0xA1].enabled = Tax[0xA1].previousState;\n            Tax[0xA1].percent = Tax[0xA1].previousPercent;\n            Bool.buyBack = true;\n        }\n        if (!value_ && Bool.buyBack) {\n            cleanUpAndEndTheBurn();\n        }\n        emit AutoBuyBackAndBurnEnabled(value_);\n    }\n\n    /**\n     *  @dev check is AutoBuyBackAndBurn is Enabled\n     *  @return bool\n     */\n    function isBuyBackAndBurnEnabled() external view returns(bool) {\n        return Bool.buyBack;\n    }\n\n    /**\n     *  @param index_ bytes1\n     *  @param threshold_ uint256, token amount threshold\n     *  @param ethThreshold bool, if true eth threshold will be set\n     *  @notice Requires:\n     *      - index_ must still be in effect (we are not in post burn era)\n     *      - amount_ must be different than current threshild\n     *  @notice Emits:\n     *      {NewThresholdSet} bytes1 index, uint256 previous, uint256 amount\n     */\n     /// @dev be carefull not to set the threshold too low on mainnet\n    function setThreshold(\n        bytes1 index_, \n        uint256 threshold_, \n        bool ethThreshold\n    ) external onlyOwner {\n        applies(index_);\n        require(index_ >= 0xA0 && index_ <= 0xA3, \"25\");\n        uint256 previous;\n        if (ethThreshold) {\n            require(Tax[index_].ethThreshold != threshold_, \"09\");\n            previous = Tax[index_].ethThreshold;\n            Tax[index_].ethThreshold = threshold_;\n        } else {\n            require(Tax[index_].sirThreshold != threshold_, \"09\");\n            previous = Tax[index_].sirThreshold;\n            Tax[index_].sirThreshold = threshold_;\n        }\n        emit NewThresholdSet(index_, previous, threshold_, ethThreshold);\n    }\n\n    /**\n     *  @dev Check if an account is excluded from paying taxes.\n     *  @param address_ address\n     *  @return boolean\n     */\n    function isExcludedFromFee(\n        address address_\n    ) external view returns(bool) {\n        return ExcludedFromFee.contains(address_);\n    }\n\n    /**\n     *  @dev Check if an account is excluded from max transacion limit.\n     *  @param address_ address\n     *  @return boolean\n     */\n    function isExcludedFromMaxTx(\n        address address_\n    ) external view returns(bool) {\n        return ExcludedFromMaxTx.contains(address_);\n    }\n\n   /**\n     *  @dev Sets an address of account by index (lookup Keys).\n     *  @notice if an address is locked then the lock timestamp will be \n     *  transferred to new address\n     *  @param index_ bytes1\n     *  @param address_ standard address\n     *  @notice Required:\n     *      - ValidAddress(address_) non 0 address\n     *      - valid index_ (lookup Keys)\n     *      - address_ is different from stored one.\n     *  @notice Emits:\n     *      {AddressSet} bytes1 index, address previous, address _address\n     */\n    function setAddress(\n        bytes1 index_,\n        address address_\n    ) external onlyOwner {\n        validAddress(address_);\n        require(index_ >= 0xA0 && index_ <= 0xAC, \"25\");\n        require(_address[index_] != address_, \"09\");\n        address previousAddress = _address[index_];\n        if (_balances[previousAddress] > 0) {\n            moveBalance(previousAddress, address_);\n        }\n        _address[index_] = address_;\n        if (isAccountLocked(previousAddress)) {\n            setLock(_address[index_], _locked[previousAddress]);\n            setLock(previousAddress, 0);\n        }\n        emit AddressSet(index_, previousAddress, address_);\n    }\n\n    /**\n     *  @dev Sets maximum sell amount in percent.\n     *  @param percent_ uint256 max sell in percent of liquidity.\n     *  @notice Reqired: \n     *      - percent_ 100 to 1000 | multiply by 100 (100 = 1%, 50 = 0.5%, ...)\n     *  @notice Emits: \n     *      {MaxSellPercentChanged} uint256 previous, uint256 percent.\n     */\n    function setMaxSellAmountPercent(\n        uint256 percent_\n    ) external onlyOwner {\n        require(percent_ >= 100 && percent_ <= 1000, \"20\");\n        uint256 previous = Max.sellPercent;\n        Max.sellPercent = percent_;\n        emit MaxSellPercentChanged(previous, percent_);\n    }\n\n    /**\n     *  @dev Sets maximum buy amount in percent.\n     *  @param percent_ uint256 max sell in percent of liquidity.\n     *  @notice Reqired: \n     *      - percent_ 100 to 1000 | multiply by 100 (100 = 1%, 50 = 0.5%, ...)\n     *  @notice Emits: \n     *      {MaxBuyPercentChanged} uint256 previous, uint256 percent.\n     */\n    function setMaxBuyAmountPercent(\n        uint256 percent_\n    ) external onlyOwner {\n        require(percent_ >= 100 && percent_ <= 1000, \"20\");\n        uint256 previous = Max.buyPercent;\n        Max.buyPercent = percent_;\n        emit MaxBuyPercentChanged(previous, percent_);\n    }\n\n    /// @dev returns maximum amount of tokens that can be sold in a transaction\n    function getMaxSellAmount() external view returns(uint256) {\n        return Max.sellAmount.div(_multiplier);\n    }\n\n    /// @dev returns maximum amount of tokens that can be sold in a transaction\n    function _getMaxSellAmount() private view returns(uint256) {\n        (uint256 count,) = _getReserves();\n        return count.mul(Max.sellPercent).div(1e4);\n    }\n\n    /// @dev returns maximum amount of tokens that can be bought in a transaction\n    function getMaxBuyAmount() external view returns(uint256) {\n        return Max.buyAmount.div(_multiplier);\n    }\n\n    /// @dev returns maximum amount of tokens that can be bought in a transaction\n    function _getMaxBuyAmount() private view returns(uint256) {\n        (uint256 count,) = _getReserves();\n        return count.mul(Max.buyPercent).div(1e4);\n    }\n\n    /// @dev returns maximum amount of tokens that can be transferred from wallet to wallet\n    function getMaxTransactionAmount() external view returns(uint256) {\n        return Max.txAmount.div(_multiplier);\n    }\n\n    /// @dev returns maximum amount of tokens that can be transferred from wallet to wallet\n    function _getMaxTransactionAmount() private view returns(uint256) {\n        return Total.supply.mul(Max.txPercent).div(1e4);\n    }\n\n    /// @dev returns data of Total struct\n    function getTotals() external view returns(Totals memory) {\n        return Total;\n    }\n    \n    /// @dev returns data of Bool struct\n    function getBooleans() external view returns(Booleans memory) {\n        return Bool;\n    }\n\n    /// @dev returns data of Max struct\n    function getMaxValues() external view returns(MaxVal memory) {\n        return Max;\n    }\n\n    /**\n     *  @dev returns data stored in Tax struct, by index\n     *  @param index_ bytes1\n     *  @return Taxes memory\n     */\n    function getTaxData(\n        bytes1 index_\n    ) external view returns(Taxes memory) {\n        return Tax[index_];\n    }\n\n    /**\n     *  @dev Sets maximum transaction amount in percent.\n     *  @param percent_ uint256 max sell in percent of liquidity.\n     *  @notice Reqired: \n     *      - percent_ 1 to 10 | multiply by 100 (100 = 1%, 50 = 0.5%, ...)\n     *  @notice Emits: \n     *      {MaxTransactionChanged} uint256 previous percent, uint256 percent, previous Amount, new Amount\n     */\n    function setMaxTransactionPercent(\n        uint256 percent_\n    ) external onlyOwner {\n        require(percent_ >= 100 && percent_ <= 1000, \"20\");\n        uint256 previousPercent = Max.txPercent;\n        uint256 previousAmount = Max.txAmount;\n        Max.txPercent = percent_;\n        Max.txAmount = _getMaxTransactionAmount();\n        emit MaxTransactionChanged(previousPercent, Max.txPercent, previousAmount, Max.txAmount);\n    }\n\n    /**\n     *  @param address_ address\n     *  @param amount_ uint256\n     *  @notice Required: \n     *      - non 0 or dead address\n     *      - amount_ > 0\n     *      - Total airdropped + amount has to be less than max total airdropped\n     *      - isMainNet must be False\n     *      - address_ wasn't used previously\n     *  @notice Emits:\n     *      {Airdroped} address _address, uint256 amount\n     */\n    function airdrop(\n        address address_,\n        uint256 amount_\n    ) external onlyOwner {\n        validAddress(address_);\n        require(amount_ > 0, \"00\");\n        require(Total.airdropped + amount_ <= Max.airdrop, \"22\");\n        require(!Bool.isMainNet, \"19\");\n        require(!Airdrops.contains(address_), \"24\");\n        Total.airdropped += amount_;\n        Airdrops.add(address_);\n        transferBalance(_address[0xAA], address_, amount_);\n        emit Airdroped(address_, amount_);\n    }\n\n    /**\n     *  @dev buys tokens, with ETH on contract balance, and burns them.\n     *  When amount of burned tokens reaches Max.burned limit, this function \n     *  is no longer used.\n     *  @notice Emits:\n     *      {BoughtBackAndBurned} uint256 eAmount eth, uint256 tAmount tokens\n     */\n    function _buyBackAndBurn() private lockTheSwap {\n        uint256 eAmount = Tax[0xA0].ethBalance;\n        Tax[0xA2].ethBalance = 0;\n        if (Total.burned >= Max.burn && Bool.buyBack) {\n            cleanUpAndEndTheBurn();\n        } else {\n            Total.buyback += eAmount;\n            _swapEthForTokens(_address[0xA3], eAmount);\n            uint256 diff;\n            uint256 tAmount = _balances[_address[0xA3]];\n            if (tAmount > 0) {\n                uint256 burned = Total.burned + tAmount;\n                if (burned > Max.burn) {\n                    diff = burned - Max.burn;\n                    tAmount -= diff;\n                }\n                __burn(_address[0xA3], tAmount);\n                if (Total.burned == Max.burn) {\n                    cleanUpAndEndTheBurn();\n                }\n                if (diff > 0) {\n                    transferBalance(_address[0xA0], _address[0xA2], diff);\n                }\n                emit BoughtBackAndBurned(eAmount, tAmount);\n            }\n        }\n    }\n\n    /**\n     *  @dev swap tokens to eth\n     *  @param amount_ uint256 amount\n     *  @return amount uint256 of new converted eth\n     */\n    function _swapTokensForEth(\n        uint256 amount_\n    ) private lockTheSwap returns(uint256) {\n        uint256 previousBalance = address(this).balance;\n        address[] memory path = new address[](2);\n        path[0] = address(this);\n        path[1] = _address[0xB1];\n        _approve(address(this), _address[0xB2], amount_);\n        _dexRouter.swapExactTokensForETHSupportingFeeOnTransferTokens(\n            amount_, 0, path, address(this), block.timestamp + 60000\n        );\n        return address(this).balance.sub(previousBalance);\n    }\n\n    /**\n     *  @dev swap ethers to tokens\n     *  @param to_ address\n     *  @param amount_ uint256 amount\n     */\n    function _swapEthForTokens(\n        address to_,\n        uint256 amount_\n    ) private lockTheSwap {\n        address[] memory path = new address[](2);\n        path[0] = _address[0xB1];\n        path[1] = address(this);\n        _dexRouter.swapExactETHForTokensSupportingFeeOnTransferTokens{value: amount_}(\n            0, path, to_, block.timestamp + 60000\n        );\n    }\n\n    /**\n     *  @dev returns address by index\n     *  @param index_ bytes1 (lookup indexes)\n     *  @return address\n     */\n    function getAddress(\n        bytes1 index_\n    ) external view returns(address) {\n        return index_ <= 0xB4 ? _address[index_] : address(0);\n    }\n\n    /**\n     *  @dev clean up after end of burn\n     *  @notice Required:\n     *      - buyBack has to be enabled \n     */\n    function cleanUpAndEndTheBurn() private {\n        require(Bool.buyBack, \"21\");\n        moveBalance(_address[0xA0], _address[0xA2]);\n        moveBalance(_address[0xA1], _address[0xA2]);\n        moveBalance(_address[0xA3], _address[0xA2]);\n        Tax[0xA0].enabled = false;\n        Tax[0xA1].enabled = false;\n        Bool.buyBack = false;\n        Bool.limitsEnabled = false;\n        emit BurnEnded(block.timestamp, block.number);\n    }\n\n    /// @dev checks it trading enabled\n    function isTradingEnabled() external view returns(bool) {\n        return Bool.isTradingEnabled;\n    }\n\n    /// @dev returns state of lp (token, eth)\n    function _getReserves() public view returns(uint256, uint256) {\n        return UniswapV2Library.getReserves(_dexRouter.factory(), address(this), _address[0xB1]);\n    }\n\n    /// @dev returns address of liquidity pool\n    function getLiquidityPoolAddress() public view returns(address) {\n        return UniswapV2Library.pairFor(_address[0xB4], _address[0xB1], address(this));\n    }\n\n    /**\n     *  @dev mints tokens to address\n     *  @param address_ address\n     *  @param amount_ amount\n     *  @notice Required:\n     *      - current total supply has to be less than initial supply\n     *  @notice Emits:\n     *      {Minted} address_ to, amount_ amount\n     *      {Transfer} address_ from, address_ to, amount_ tokens\n     */\n    function __mint(\n        address address_,\n        uint256 amount_\n    ) private {\n        Total.supply += amount_;\n        require(Total.supply <= _initialSupply, \"22\");\n        _balances[address_] += amount_;\n        emit Minted(address_, amount_);\n        emit Transfer(address(0), address_, amount_);\n    }\n\n    /**\n     *  @dev burns tokens from address\n     *  @param from_ address\n     *  @param amount_ amount\n     *  @notice Required:\n     *      - Total.burned + amount_ has to be less or equal to Max burn\n     *      - amount has to be less or equal to balance\n     */\n    function burn(\n        address from_, \n        uint256 amount_\n    ) external onlyOwner {\n        require(Total.burned + amount_ <= Max.burn, \"22\");\n        require(amount_ <= _balances[from_], \"05\");\n        __burn(from_, amount_);\n    }\n\n    /**\n     *  @dev burns tokens from address\n     *  @param address_ address\n     *  @param amount_ amount\n     *  @notice Emits:\n     *      {Burned} address_ address, amount_ amount\n     *      {Transfer} address_ from, address_ to, amount_ tokens\n     */\n    function __burn(\n        address address_,\n        uint256 amount_\n    ) private {\n        unchecked {\n            _balances[address_] -= amount_;   \n        }\n        _balances[DEAD] += amount_;\n        Total.burned += amount_;\n        Total.supply -= amount_;\n        Tax[0xA0].ethBalance = 0;\n        IUniswapV2Pair(_dexPair).sync();\n        Max.txAmount = _getMaxTransactionAmount();\n        emit Burned(address_, amount_);\n        emit Transfer(address_, DEAD, amount_);\n    }\n\n    /// @dev adds liquidity\n    function _addLiquidity() private lockTheSwap {\n        uint256 e = Tax[0xA1].ethBalance;\n        Tax[0xA1].ethBalance = 0;\n        uint256 b = _balances[_address[0xAC]];\n        moveBalance(_address[0xAC], address(this));\n        _approve(address(this), _address[0xB2], b);\n        (uint256 t1, uint256 e1,) = _dexRouter.addLiquidityETH{value : e} (\n            address(this), b, 0, 0, _owner, block.timestamp + 60000\n        );\n        Total.liquidatedTokens += t1;\n        Total.liquidatedEthers += e1;\n        Max.sellAmount = _getMaxSellAmount();\n        Max.buyAmount = _getMaxBuyAmount();\n        emit AddedLiquidity(e, b);\n    }\n\n    /**\n     *  @dev Add eAmount_ of ETH and tAmount_ of tokens to the LP.\n     *  Depends on the current rate for the pair between this token and WETH,\n     *  eAmount_ and tAmount_ might not match perfectly.\n     *  Dust(leftover) ETH or token will be refunded to this contract\n     *  (usually very small quantity).\n     *  @param eAmount_ uint256\n     *  @param tAmount_ uint256\n     *  @notice Required:\n     *      - eth balance must be greater or equal to amount\n     *      - token balance must be greater or equal to amount\n     */\n    function addLiquidity(\n        uint256 eAmount_,\n        uint256 tAmount_\n    ) external onlyOwner {\n        require(address(this).balance >= eAmount_, \"16\");\n        require(_balances[_address[0xAC]] >= tAmount_, \"05\");\n        _addLiquidity();\n    }\n\n    /**\n     *  @dev transfer amount of tokens from_ address to to_ address\n     *  @param from_ address\n     *  @param to_ address\n     *  @notice Emits:\n     *      {Transfer} from_ address, to_ address, amount_ uint256\n     */\n    function moveBalance(\n        address from_, \n        address to_\n    ) private { \n        uint256 amount_ = _balances[from_];\n        _balances[from_] = 0;\n        _balances[to_] += amount_;\n        emit Transfer(from_, to_, amount_);\n    }\n\n    /**\n     *  @dev transfer amount of tokens from_ address to to_ address\n     *  @param from_ address\n     *  @param to_ address\n     *  @param amount_ uint256\n     *  @notice Emits:\n     *      {Transfer} from_ address, to_ address, amount_ uint256\n     */\n    function transferBalance(\n        address from_, \n        address to_, \n        uint256 amount_\n    ) private {\n        unchecked {\n            _balances[from_] -= amount_;\n            _balances[to_] += amount_;   \n        }\n        emit Transfer(from_, to_, amount_);\n    }\n\n    /// @dev recover ethers stuck on proxy\n    function recoverETHFromProxy() external onlyOwner {\n        proxy.sendEth();\n    }\n\n    /// @dev recovers Tokens stuck on proxy\n    function recoverTokensFromProxy() external onlyOwner {\n        moveBalance(_address[0xA3], _address[0xA2]);\n    }\n\n    /**\n     *  @dev withdraw non-native tokens sent to contract address\n     *  @param token_ address\n     *  @param amount_ uint256\n     *  @param senderAddress_ address\n     *  @notice Required:\n     *      - token address is not native token address\n     *      - onlyOwner\n     *  @notice Emits:\n     *      {WithdrawnERC20} token_ address, senderAddress_ address, amount_ uint256\n     */\n    function withdrawTokenERC20(\n        address token_,\n        uint256 amount_,\n        address senderAddress_\n    ) external onlyOwner {\n        require(token_ != address(this), \"23\");\n        IERC20(token_).transfer(_owner, amount_);\n        emit WithdrawnERC20(token_, senderAddress_, amount_);\n    }\n\n    /**\n     *  @dev withdraw surplus ETH if any\n     *  @param address_ address to\n     */\n    function withdrawETH(\n        address address_\n    ) external onlyOwner {\n        uint256 sBalance = address(this).balance.sub(\n            Tax[0xA0].ethBalance + \n            Tax[0xA1].ethBalance + \n            Tax[0xA2].ethBalance\n        );\n        if (sBalance > 1 ether) {\n            payable(address_).transfer(sBalance);\n            emit WithdrawnETH(address_, sBalance);\n        }\n    }\n\n    /**\n     *  @dev check if tax is in use - burn era\n     *  @param index_ bytes1\n     */\n    function applies(\n        bytes1 index_\n    ) private view { \n        if (index_ == 0xA0 || index_ == 0xA1) {\n            require(Bool.buyBack, \"03\");\n        }\n    }\n\n    /**\n     *  @dev cheks if an address is locked and unlocks if time has expired\n     *  @param address_ address\n     *  @return bool\n     *  @notice Emits:\n     *      {LiquidityUnlocked} address, timestamp\n     *      or\n     *      {AccountUnlocked} address, timestamp\n     */\n    function _checkLock(\n        address address_\n    ) private returns(bool) {\n        if (_locked[address_] == 0) {\n            return false;\n        }\n        if (_locked[address_] < block.timestamp) {\n            _locked[address_] = 0;\n            if (address_ == _address[0xAB]) {\n                Bool.liquidityLocked = false;\n                emit LiquidityUnlocked(address_, block.timestamp);\n            } else {\n                emit AccountUnlocked(address_, block.timestamp);\n            }\n            if (Total.lockedAccounts > 0) {\n                Total.lockedAccounts -= 1;\n            }\n            return false;\n        }\n        return true;\n    }\n\n    /**\n     *  @dev unlocks an address if timer has expired\n     *  @param address_ address\n     */\n    function unlock(\n        address address_\n    ) external onlyOwner {\n        _checkLock(address_);\n    }\n\n    /**\n     *  @dev returns token and eth balances of tax addresses\n     */\n        function getTaxBalances() external view returns(\n        uint256, uint256, uint256, \n        uint256, uint256, uint256, \n        uint256, uint256, uint256\n    ) {\n        return (\n            address(this).balance,\n            Tax[0xA0].ethBalance,\n            Tax[0xA1].ethBalance,\n            Tax[0xA2].ethBalance,\n            _balances[address(this)],\n            _balances[_address[0xA0]],\n            _balances[_address[0xA1]],\n            _balances[_address[0xAC]],\n            _balances[_address[0xA2]]\n        );\n    }\n\n    /**\n     *  @dev check if router is Uniswap because we burn only on Uniswap\n     *  @return bool\n     */\n    function isRouterUniswap() private view returns(bool) {\n        return _address[0xB2] == address(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D) ? true : false;\n    }\n    \n    /**\n     *  @dev check if an address is valid \n     *  @param address_ address\n     *  @notice Required:\n     *      - address should not be 0 or DEAD\n     */\n    function validAddress(\n        address address_\n    ) private pure {\n        require(address_ != address(0) && address_ != DEAD, \"01\");\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/IUniswapV2Pair.sol": {
      "content": "pragma solidity >=0.5.0;\n\ninterface IUniswapV2Pair {\n    event Approval(address indexed owner, address indexed spender, uint value);\n    event Transfer(address indexed from, address indexed to, uint value);\n\n    function name() external pure returns (string memory);\n    function symbol() external pure returns (string memory);\n    function decimals() external pure returns (uint8);\n    function totalSupply() external view returns (uint);\n    function balanceOf(address owner) external view returns (uint);\n    function allowance(address owner, address spender) external view returns (uint);\n\n    function approve(address spender, uint value) external returns (bool);\n    function transfer(address to, uint value) external returns (bool);\n    function transferFrom(address from, address to, uint value) external returns (bool);\n\n    function DOMAIN_SEPARATOR() external view returns (bytes32);\n    function PERMIT_TYPEHASH() external pure returns (bytes32);\n    function nonces(address owner) external view returns (uint);\n\n    function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;\n\n    event Mint(address indexed sender, uint amount0, uint amount1);\n    event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);\n    event Swap(\n        address indexed sender,\n        uint amount0In,\n        uint amount1In,\n        uint amount0Out,\n        uint amount1Out,\n        address indexed to\n    );\n    event Sync(uint112 reserve0, uint112 reserve1);\n\n    function MINIMUM_LIQUIDITY() external pure returns (uint);\n    function factory() external view returns (address);\n    function token0() external view returns (address);\n    function token1() external view returns (address);\n    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\n    function price0CumulativeLast() external view returns (uint);\n    function price1CumulativeLast() external view returns (uint);\n    function kLast() external view returns (uint);\n\n    function mint(address to) external returns (uint liquidity);\n    function burn(address to) external returns (uint amount0, uint amount1);\n    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;\n    function skim(address to) external;\n    function sync() external;\n\n    function initialize(address, address) external;\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/token/ERC20/utils/SafeERC20.sol": {
      "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../extensions/draft-IERC20Permit.sol\";\nimport \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n    using Address for address;\n\n    function safeTransfer(\n        IERC20 token,\n        address to,\n        uint256 value\n    ) internal {\n        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n    }\n\n    function safeTransferFrom(\n        IERC20 token,\n        address from,\n        address to,\n        uint256 value\n    ) internal {\n        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n    }\n\n    /**\n     * @dev Deprecated. This function has issues similar to the ones found in\n     * {IERC20-approve}, and its usage is discouraged.\n     *\n     * Whenever possible, use {safeIncreaseAllowance} and\n     * {safeDecreaseAllowance} instead.\n     */\n    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    }\n\n    function safeIncreaseAllowance(\n        IERC20 token,\n        address spender,\n        uint256 value\n    ) internal {\n        uint256 newAllowance = token.allowance(address(this), spender) + value;\n        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n    }\n\n    function safeDecreaseAllowance(\n        IERC20 token,\n        address spender,\n        uint256 value\n    ) internal {\n        unchecked {\n            uint256 oldAllowance = token.allowance(address(this), spender);\n            require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n            uint256 newAllowance = oldAllowance - value;\n            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n        }\n    }\n\n    function safePermit(\n        IERC20Permit token,\n        address owner,\n        address spender,\n        uint256 value,\n        uint256 deadline,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) internal {\n        uint256 nonceBefore = token.nonces(owner);\n        token.permit(owner, spender, value, deadline, v, r, s);\n        uint256 nonceAfter = token.nonces(owner);\n        require(nonceAfter == nonceBefore + 1, \"SafeERC20: permit did not succeed\");\n    }\n\n    /**\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\n     * @param token The token targeted by the call.\n     * @param data The call data (encoded using abi.encode or one of its variants).\n     */\n    function _callOptionalReturn(IERC20 token, bytes memory data) private {\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\n        // the target address contains contract code and also asserts for success in the low-level call.\n\n        bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n        if (returndata.length > 0) {\n            // Return data is optional\n            require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n        }\n    }\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/utils/structs/EnumerableSet.sol": {
      "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\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 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 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        return _values(set._inner);\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 on 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/math/Safemath.sol": {
      "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)\n\npragma solidity ^0.8.0;\n\n// CAUTION\n// This version of SafeMath should only be used with Solidity 0.8 or later,\n// because it relies on the compiler's built in overflow checks.\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations.\n *\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\n * now has built in overflow checking.\n */\nlibrary SafeMath {\n    /**\n     * @dev Returns the addition of two unsigned integers, with an overflow flag.\n     *\n     * _Available since v3.4._\n     */\n    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            uint256 c = a + b;\n            if (c < a) return (false, 0);\n            return (true, c);\n        }\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\n     *\n     * _Available since v3.4._\n     */\n    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b > a) return (false, 0);\n            return (true, a - b);\n        }\n    }\n\n    /**\n     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n     *\n     * _Available since v3.4._\n     */\n    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n            // benefit is lost if 'b' is also tested.\n            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n            if (a == 0) return (true, 0);\n            uint256 c = a * b;\n            if (c / a != b) return (false, 0);\n            return (true, c);\n        }\n    }\n\n    /**\n     * @dev Returns the division of two unsigned integers, with a division by zero flag.\n     *\n     * _Available since v3.4._\n     */\n    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b == 0) return (false, 0);\n            return (true, a / b);\n        }\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n     *\n     * _Available since v3.4._\n     */\n    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b == 0) return (false, 0);\n            return (true, a % b);\n        }\n    }\n\n    /**\n     * @dev Returns the addition of two unsigned integers, reverting on\n     * overflow.\n     *\n     * Counterpart to Solidity's `+` operator.\n     *\n     * Requirements:\n     *\n     * - Addition cannot overflow.\n     */\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a + b;\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, reverting on\n     * overflow (when the result is negative).\n     *\n     * Counterpart to Solidity's `-` operator.\n     *\n     * Requirements:\n     *\n     * - Subtraction cannot overflow.\n     */\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a - b;\n    }\n\n    /**\n     * @dev Returns the multiplication of two unsigned integers, reverting on\n     * overflow.\n     *\n     * Counterpart to Solidity's `*` operator.\n     *\n     * Requirements:\n     *\n     * - Multiplication cannot overflow.\n     */\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a * b;\n    }\n\n    /**\n     * @dev Returns the integer division of two unsigned integers, reverting on\n     * division by zero. The result is rounded towards zero.\n     *\n     * Counterpart to Solidity's `/` operator.\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function div(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a / b;\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n     * reverting when dividing by zero.\n     *\n     * Counterpart to Solidity's `%` operator. This function uses a `revert`\n     * opcode (which leaves remaining gas untouched) while Solidity uses an\n     * invalid opcode to revert (consuming all remaining gas).\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a % b;\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n     * overflow (when the result is negative).\n     *\n     * CAUTION: This function is deprecated because it requires allocating memory for the error\n     * message unnecessarily. For custom revert reasons use {trySub}.\n     *\n     * Counterpart to Solidity's `-` operator.\n     *\n     * Requirements:\n     *\n     * - Subtraction cannot overflow.\n     */\n    function sub(\n        uint256 a,\n        uint256 b,\n        string memory errorMessage\n    ) internal pure returns (uint256) {\n        unchecked {\n            require(b <= a, errorMessage);\n            return a - b;\n        }\n    }\n\n    /**\n     * @dev Returns the integer division of two unsigned integers, reverting with custom message on\n     * division by zero. The result is rounded towards zero.\n     *\n     * Counterpart to Solidity's `/` operator. Note: this function uses a\n     * `revert` opcode (which leaves remaining gas untouched) while Solidity\n     * uses an invalid opcode to revert (consuming all remaining gas).\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function div(\n        uint256 a,\n        uint256 b,\n        string memory errorMessage\n    ) internal pure returns (uint256) {\n        unchecked {\n            require(b > 0, errorMessage);\n            return a / b;\n        }\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n     * reverting with custom message when dividing by zero.\n     *\n     * CAUTION: This function is deprecated because it requires allocating memory for the error\n     * message unnecessarily. For custom revert reasons use {tryMod}.\n     *\n     * Counterpart to Solidity's `%` operator. This function uses a `revert`\n     * opcode (which leaves remaining gas untouched) while Solidity uses an\n     * invalid opcode to revert (consuming all remaining gas).\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function mod(\n        uint256 a,\n        uint256 b,\n        string memory errorMessage\n    ) internal pure returns (uint256) {\n        unchecked {\n            require(b > 0, errorMessage);\n            return a % b;\n        }\n    }\n}\n"
    },
    "@openzeppelin/contracts/utils/Address.sol": {
      "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n    /**\n     * @dev Returns true if `account` is a contract.\n     *\n     * [IMPORTANT]\n     * ====\n     * It is unsafe to assume that an address for which this function returns\n     * false is an externally-owned account (EOA) and not a contract.\n     *\n     * Among others, `isContract` will return false for the following\n     * types of addresses:\n     *\n     *  - an externally-owned account\n     *  - a contract in construction\n     *  - an address where a contract will be created\n     *  - an address where a contract lived, but was destroyed\n     * ====\n     *\n     * [IMPORTANT]\n     * ====\n     * You shouldn't rely on `isContract` to protect against flash loan attacks!\n     *\n     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n     * constructor.\n     * ====\n     */\n    function isContract(address account) internal view returns (bool) {\n        // This method relies on extcodesize/address.code.length, which returns 0\n        // for contracts in construction, since the code is only stored at the end\n        // of the constructor execution.\n\n        return account.code.length > 0;\n    }\n\n    /**\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n     * `recipient`, forwarding all available gas and reverting on errors.\n     *\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\n     * imposed by `transfer`, making them unable to receive funds via\n     * `transfer`. {sendValue} removes this limitation.\n     *\n     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n     *\n     * IMPORTANT: because control is transferred to `recipient`, care must be\n     * taken to not create reentrancy vulnerabilities. Consider using\n     * {ReentrancyGuard} or the\n     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n     */\n    function sendValue(address payable recipient, uint256 amount) internal {\n        require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n        (bool success, ) = recipient.call{value: amount}(\"\");\n        require(success, \"Address: unable to send value, recipient may have reverted\");\n    }\n\n    /**\n     * @dev Performs a Solidity function call using a low level `call`. A\n     * plain `call` is an unsafe replacement for a function call: use this\n     * function instead.\n     *\n     * If `target` reverts with a revert reason, it is bubbled up by this\n     * function (like regular Solidity function calls).\n     *\n     * Returns the raw returned data. To convert to the expected return value,\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n     *\n     * Requirements:\n     *\n     * - `target` must be a contract.\n     * - calling `target` with `data` must not revert.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCall(target, data, \"Address: low-level call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n     * `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but also transferring `value` wei to `target`.\n     *\n     * Requirements:\n     *\n     * - the calling contract must have an ETH balance of at least `value`.\n     * - the called Solidity function must be `payable`.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n     * with `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(address(this).balance >= value, \"Address: insufficient balance for call\");\n        require(isContract(target), \"Address: call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        return functionStaticCall(target, data, \"Address: low-level static call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        require(isContract(target), \"Address: static call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a delegate call.\n     *\n     * _Available since v3.4._\n     */\n    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n     * but performing a delegate call.\n     *\n     * _Available since v3.4._\n     */\n    function functionDelegateCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(isContract(target), \"Address: delegate call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.delegatecall(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n     * revert reason using the provided one.\n     *\n     * _Available since v4.3._\n     */\n    function verifyCallResult(\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal pure returns (bytes memory) {\n        if (success) {\n            return returndata;\n        } else {\n            // Look for revert reason and bubble it up if present\n            if (returndata.length > 0) {\n                // The easiest way to bubble the revert reason is using memory via assembly\n                /// @solidity memory-safe-assembly\n                assembly {\n                    let returndata_size := mload(returndata)\n                    revert(add(32, returndata), returndata_size)\n                }\n            } else {\n                revert(errorMessage);\n            }\n        }\n    }\n}\n"
    },
    "@openzeppelin/contracts/utils/Counters.sol": {
      "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @title Counters\n * @author Matt Condon (@shrugs)\n * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\n *\n * Include with `using Counters for Counters.Counter;`\n */\nlibrary Counters {\n    struct Counter {\n        // This variable should never be directly accessed by users of the library: interactions must be restricted to\n        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\n        // this feature: see https://github.com/ethereum/solidity/issues/4637\n        uint256 _value; // default: 0\n    }\n\n    function current(Counter storage counter) internal view returns (uint256) {\n        return counter._value;\n    }\n\n    function increment(Counter storage counter) internal {\n        unchecked {\n            counter._value += 1;\n        }\n    }\n\n    function decrement(Counter storage counter) internal {\n        uint256 value = counter._value;\n        require(value > 0, \"Counter: decrement overflow\");\n        unchecked {\n            counter._value = value - 1;\n        }\n    }\n\n    function reset(Counter storage counter) internal {\n        counter._value = 0;\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/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"
    },
    "@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol": {
      "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n */\ninterface IERC20Permit {\n    /**\n     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n     * given ``owner``'s signed approval.\n     *\n     * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n     * ordering also apply here.\n     *\n     * Emits an {Approval} event.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     * - `deadline` must be a timestamp in the future.\n     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n     * over the EIP712-formatted function arguments.\n     * - the signature must use ``owner``'s current nonce (see {nonces}).\n     *\n     * For more information on the signature format, see the\n     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n     * section].\n     */\n    function permit(\n        address owner,\n        address spender,\n        uint256 value,\n        uint256 deadline,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) external;\n\n    /**\n     * @dev Returns the current nonce for `owner`. This value must be\n     * included whenever a signature is generated for {permit}.\n     *\n     * Every successful call to {permit} increases ``owner``'s nonce by one. This\n     * prevents a signature from being used multiple times.\n     */\n    function nonces(address owner) external view returns (uint256);\n\n    /**\n     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n     */\n    // solhint-disable-next-line func-name-mixedcase\n    function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n"
    }
  },
  "settings": {
    "optimizer": {
      "enabled": true,
      "runs": 200
    },
    "outputSelection": {
      "*": {
        "*": [
          "evm.bytecode",
          "evm.deployedBytecode",
          "devdoc",
          "userdoc",
          "metadata",
          "abi"
        ]
      }
    }
  }
}