creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "contracts/ClappinCheeks.sol": {
        "content": "/*\r\n    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#%?%S@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r\n    @@@@@@@@@@@@@@@@@@@@@@@@@@@#?++;;;;::::;;;;++%@@@@@@@@@@@@@@@@@@@@@@@@\r\n    @@@@@@@@@@@@@@@@@@@@@@@@@*+;::,,,........,,,::;+?@@@@@@@@@@@@@@@@@@@@@\r\n    @@@@@@@@@@@@@@@@@@@@@@S+;:,,..................,:;+*@@@@@@@@@@@@@@@@@@@\r\n    @@@@@@@@@@@@@@@@@@@@@*;:,.......................,,;+?@@@@@@@@@@@@@@@@@\r\n    @@@@@@@@@@@@@@@@@@@%+;,,..........................,:;*@@@@@@@@@@@@@@@@\r\n    @@@@@@@@@@@@@@@@@@?+:,,,..........................,,,;+@@@@@@@@@@@@@@@\r\n    @@@@@@@@@@@@@@@@@S*;,,,,,,,,,,,,,,,,,,,,,,,,,,,,::,,,;*+@@@@@@@@@@@@@@\r\n    @@@@@@@@@@@@@@@@@?+:,,,,,,,,,,,,,,,,,,,,,,,,,,,:SS;,,+%*%@@@@@@@@@@@@@\r\n    @@@@@@@@@@@@@@@@S*;,,,,,,,,,,,,,,,,,,,,,,,,,,,,:%%?,,:%*+@@@@@@@@@@@@@\r\n    @@@@@@@@@@@@@@@@?+;:,,,,,,,,,,,,,,,,,,,,,,,,,,,,+%*,,:+*+@@@@@@@@@@@@@\r\n    @@@@@@@@@@@@@@@@%+;::,,,,,,,,,,,,,,,,,,,,,,,,,,,,::,:;;+*@@@@@@@@@@@@@\r\n    @@@@@@@@@@@@@@@%+;:,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,:?%?+*@@@@@@@@@@@@@\r\n    @@@@@@@@@@@@@@*;,,..,,,,,,,.........,,,,,,,,,,,,,,::;;+*%@@@@@@@@@@@@@\r\n    @@@@@@@@@@@@@?+:,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,::;;++*@@@@@@@@@@@@@@\r\n    @@@@@@@@@@@@@*+;:,,,,,,:,,,,,,,,,,,,,,,,,,,,,:::::;;++*@@@@@@@@@@@@@@@\r\n    @@@@@@@@@@@@@*++;:,,,,:;::,,,,,,,,,,,,,::::::::;;;++**@@@@@@@@@@@@@@@@\r\n    @@@@@@@@@@@@@?*++;;:::;+;;::,,,,,,,,,::;;;;;;;;+++**?@@@@@@@@@@@@@@@@@\r\n    @@@@@@@@@@@@@@?****+++**++;;::,,,,,::;;;;+++++++**?@@@@@@@@@@@@@@@@@@@\r\n    @@@@@@@@@@@@@@@?*******??**+++;;;;++++++++++****?@@@@@@@@@@@@@@@@@@@@@\r\n    @@@@@@@@@@@@@@@@@?*****?%%?*****************?%@@@@@@@@@@@@@@@@@@@@@@@@\r\n    @@@@@@@@@@@@@@@@@@@@@%??*%@S?*?*?*??*??%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r\n    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r\n\r\n\r\n    Website: https://www.clappincheeks.fun\r\n    X: https://X.com/Clappin_Ch33ks\r\n    Telegram Portal: https://t.me/clappincheeksportal \r\n       \r\n */\r\npragma solidity 0.8.19;\r\n\r\nabstract contract Context {\r\n    function _msgSender() internal view virtual returns (address) {\r\n        return msg.sender;\r\n    }\r\n\r\n    function _msgData() internal view virtual returns (bytes calldata) {\r\n        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\r\n        return msg.data;\r\n    }\r\n}\r\n\r\ninterface IERC20 {\r\n    /**\r\n     * @dev Returns the amount of tokens in existence.\r\n     */\r\n    function totalSupply() external view returns (uint256);\r\n\r\n    /**\r\n     * @dev Returns the amount of tokens owned by `account`.\r\n     */\r\n    function balanceOf(address account) external view returns (uint256);\r\n\r\n    /**\r\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\r\n     *\r\n     * Returns a boolean value indicating whether the operation succeeded.\r\n     *\r\n     * Emits a {Transfer} event.\r\n     */\r\n    function transfer(\r\n        address recipient,\r\n        uint256 amount\r\n    ) external returns (bool);\r\n\r\n    /**\r\n     * @dev Returns the remaining number of tokens that `spender` will be\r\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\r\n     * zero by default.\r\n     *\r\n     * This value changes when {approve} or {transferFrom} are called.\r\n     */\r\n    function allowance(\r\n        address owner,\r\n        address spender\r\n    ) external view returns (uint256);\r\n\r\n    /**\r\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\r\n     *\r\n     * Returns a boolean value indicating whether the operation succeeded.\r\n     *\r\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\r\n     * that someone may use both the old and the new allowance by unfortunate\r\n     * transaction ordering. One possible solution to mitigate this race\r\n     * condition is to first reduce the spender's allowance to 0 and set the\r\n     * desired value afterwards:\r\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\r\n     *\r\n     * Emits an {Approval} event.\r\n     */\r\n    function approve(address spender, uint256 amount) external returns (bool);\r\n\r\n    /**\r\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\r\n     * allowance mechanism. `amount` is then deducted from the caller's\r\n     * allowance.\r\n     *\r\n     * Returns a boolean value indicating whether the operation succeeded.\r\n     *\r\n     * Emits a {Transfer} event.\r\n     */\r\n    function transferFrom(\r\n        address sender,\r\n        address recipient,\r\n        uint256 amount\r\n    ) external returns (bool);\r\n\r\n    /**\r\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\r\n     * another (`to`).\r\n     *\r\n     * Note that `value` may be zero.\r\n     */\r\n    event Transfer(address indexed from, address indexed to, uint256 value);\r\n\r\n    /**\r\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\r\n     * a call to {approve}. `value` is the new allowance.\r\n     */\r\n    event Approval(\r\n        address indexed owner,\r\n        address indexed spender,\r\n        uint256 value\r\n    );\r\n}\r\n\r\ninterface IERC20Metadata is IERC20 {\r\n    /**\r\n     * @dev Returns the name of the token.\r\n     */\r\n    function name() external view returns (string memory);\r\n\r\n    /**\r\n     * @dev Returns the symbol of the token.\r\n     */\r\n    function symbol() external view returns (string memory);\r\n\r\n    /**\r\n     * @dev Returns the decimals places of the token.\r\n     */\r\n    function decimals() external view returns (uint8);\r\n}\r\n\r\ncontract ERC20 is Context, IERC20, IERC20Metadata {\r\n    mapping(address => uint256) private _balances;\r\n\r\n    mapping(address => mapping(address => uint256)) private _allowances;\r\n\r\n    uint256 private _totalSupply;\r\n\r\n    string private _name;\r\n    string private _symbol;\r\n\r\n    constructor(string memory name_, string memory symbol_) {\r\n        _name = name_;\r\n        _symbol = symbol_;\r\n    }\r\n\r\n    function name() public view virtual override returns (string memory) {\r\n        return _name;\r\n    }\r\n\r\n    function symbol() public view virtual override returns (string memory) {\r\n        return _symbol;\r\n    }\r\n\r\n    function decimals() public view virtual override returns (uint8) {\r\n        return 18;\r\n    }\r\n\r\n    function totalSupply() public view virtual override returns (uint256) {\r\n        return _totalSupply;\r\n    }\r\n\r\n    function balanceOf(\r\n        address account\r\n    ) public view virtual override returns (uint256) {\r\n        return _balances[account];\r\n    }\r\n\r\n    function transfer(\r\n        address recipient,\r\n        uint256 amount\r\n    ) public virtual override returns (bool) {\r\n        _transfer(_msgSender(), recipient, amount);\r\n        return true;\r\n    }\r\n\r\n    function allowance(\r\n        address owner,\r\n        address spender\r\n    ) public view virtual override returns (uint256) {\r\n        return _allowances[owner][spender];\r\n    }\r\n\r\n    function approve(\r\n        address spender,\r\n        uint256 amount\r\n    ) public virtual override returns (bool) {\r\n        _approve(_msgSender(), spender, amount);\r\n        return true;\r\n    }\r\n\r\n    function transferFrom(\r\n        address sender,\r\n        address recipient,\r\n        uint256 amount\r\n    ) public virtual override returns (bool) {\r\n        _transfer(sender, recipient, amount);\r\n\r\n        uint256 currentAllowance = _allowances[sender][_msgSender()];\r\n        require(\r\n            currentAllowance >= amount,\r\n            \"ERC20: transfer amount exceeds allowance\"\r\n        );\r\n        unchecked {\r\n            _approve(sender, _msgSender(), currentAllowance - amount);\r\n        }\r\n\r\n        return true;\r\n    }\r\n\r\n    function increaseAllowance(\r\n        address spender,\r\n        uint256 addedValue\r\n    ) public virtual returns (bool) {\r\n        _approve(\r\n            _msgSender(),\r\n            spender,\r\n            _allowances[_msgSender()][spender] + addedValue\r\n        );\r\n        return true;\r\n    }\r\n\r\n    function decreaseAllowance(\r\n        address spender,\r\n        uint256 subtractedValue\r\n    ) public virtual returns (bool) {\r\n        uint256 currentAllowance = _allowances[_msgSender()][spender];\r\n        require(\r\n            currentAllowance >= subtractedValue,\r\n            \"ERC20: decreased allowance below zero\"\r\n        );\r\n        unchecked {\r\n            _approve(_msgSender(), spender, currentAllowance - subtractedValue);\r\n        }\r\n\r\n        return true;\r\n    }\r\n\r\n    function _transfer(\r\n        address sender,\r\n        address recipient,\r\n        uint256 amount\r\n    ) internal virtual {\r\n        require(sender != address(0), \"ERC20: transfer from the zero address\");\r\n        require(recipient != address(0), \"ERC20: transfer to the zero address\");\r\n\r\n        uint256 senderBalance = _balances[sender];\r\n        require(\r\n            senderBalance >= amount,\r\n            \"ERC20: transfer amount exceeds balance\"\r\n        );\r\n        unchecked {\r\n            _balances[sender] = senderBalance - amount;\r\n        }\r\n        _balances[recipient] += amount;\r\n\r\n        emit Transfer(sender, recipient, amount);\r\n    }\r\n\r\n    function _createInitialSupply(\r\n        address account,\r\n        uint256 amount\r\n    ) internal virtual {\r\n        require(account != address(0), \"ERC20: mint to the zero address\");\r\n\r\n        _totalSupply += amount;\r\n        _balances[account] += amount;\r\n        emit Transfer(address(0), account, amount);\r\n    }\r\n\r\n    function _approve(\r\n        address owner,\r\n        address spender,\r\n        uint256 amount\r\n    ) internal virtual {\r\n        require(owner != address(0), \"ERC20: approve from the zero address\");\r\n        require(spender != address(0), \"ERC20: approve to the zero address\");\r\n\r\n        _allowances[owner][spender] = amount;\r\n        emit Approval(owner, spender, amount);\r\n    }\r\n}\r\n\r\ncontract Ownable is Context {\r\n    address private _owner;\r\n\r\n    event OwnershipTransferred(\r\n        address indexed previousOwner,\r\n        address indexed newOwner\r\n    );\r\n\r\n    constructor() {\r\n        address msgSender = _msgSender();\r\n        _owner = msgSender;\r\n        emit OwnershipTransferred(address(0), msgSender);\r\n    }\r\n\r\n    function owner() public view returns (address) {\r\n        return _owner;\r\n    }\r\n\r\n    modifier onlyOwner() {\r\n        require(_owner == _msgSender(), \"Ownable: caller is not the owner\");\r\n        _;\r\n    }\r\n\r\n    function renounceOwnership(\r\n        bool confirmRenounce\r\n    ) external virtual onlyOwner {\r\n        require(confirmRenounce, \"Please confirm renounce!\");\r\n        emit OwnershipTransferred(_owner, address(0));\r\n        _owner = address(0);\r\n    }\r\n\r\n    function transferOwnership(address newOwner) public virtual onlyOwner {\r\n        require(\r\n            newOwner != address(0),\r\n            \"Ownable: new owner is the zero address\"\r\n        );\r\n        emit OwnershipTransferred(_owner, newOwner);\r\n        _owner = newOwner;\r\n    }\r\n}\r\n\r\ninterface ILpPair {\r\n    function sync() external;\r\n}\r\n\r\ninterface IDexRouter {\r\n    function factory() external pure returns (address);\r\n\r\n    function WETH() external pure returns (address);\r\n\r\n    function swapExactTokensForETHSupportingFeeOnTransferTokens(\r\n        uint256 amountIn,\r\n        uint256 amountOutMin,\r\n        address[] calldata path,\r\n        address to,\r\n        uint256 deadline\r\n    ) external;\r\n\r\n    function swapExactETHForTokensSupportingFeeOnTransferTokens(\r\n        uint256 amountOutMin,\r\n        address[] calldata path,\r\n        address to,\r\n        uint256 deadline\r\n    ) external payable;\r\n\r\n    function addLiquidityETH(\r\n        address token,\r\n        uint256 amountTokenDesired,\r\n        uint256 amountTokenMin,\r\n        uint256 amountETHMin,\r\n        address to,\r\n        uint256 deadline\r\n    )\r\n        external\r\n        payable\r\n        returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);\r\n\r\n    function getAmountsOut(\r\n        uint256 amountIn,\r\n        address[] calldata path\r\n    ) external view returns (uint256[] memory amounts);\r\n\r\n    function removeLiquidityETH(\r\n        address token,\r\n        uint256 liquidity,\r\n        uint256 amountTokenMin,\r\n        uint256 amountETHMin,\r\n        address to,\r\n        uint256 deadline\r\n    ) external returns (uint256 amountToken, uint256 amountETH);\r\n}\r\n\r\ninterface IDexFactory {\r\n    function createPair(\r\n        address tokenA,\r\n        address tokenB\r\n    ) external returns (address pair);\r\n}\r\n\r\ncontract ClappinCheeks is ERC20, Ownable {\r\n    uint256 public maxBuyAmount;\r\n    uint256 public maxSellAmount;\r\n    uint256 public maxWallet;\r\n    \r\n\r\n    IDexRouter public dexRouter;\r\n    address public lpPair;\r\n\r\n    bool private swapping;\r\n    uint256 public swapTokensAtAmount;\r\n    address public operationsAddress;\r\n\r\n    uint256 public tradingActiveBlock = 0;\r\n   \r\n    bool public limitsInEffect = true;\r\n    bool public tradingActive = false;\r\n    bool public swapEnabled = false;\r\n\r\n    uint256 public buyTotalFees;\r\n    uint256 public buyOperationsFee;\r\n\r\n    uint256 public sellTotalFees;\r\n    uint256 public sellOperationsFee;\r\n\r\n    uint256 public tokensForOperations;\r\n\r\n    mapping(address => bool) private _isExcludedFromFees;\r\n    mapping(address => bool) public _isExcludedMaxTransactionAmount;\r\n    mapping(address => bool) public automatedMarketMakerPairs;\r\n\r\n    event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);\r\n\r\n    event EnabledTrading();\r\n\r\n    event ExcludeFromFees(address indexed account, bool isExcluded);\r\n\r\n    event UpdatedOperationsAddress(address indexed newWallet);\r\n\r\n    event MaxTransactionExclusion(address _address, bool excluded);\r\n\r\n    event OwnerForcedSwapBack(uint256 timestamp);\r\n\r\n\r\n    event SwapAndLiquify(\r\n        uint256 tokensSwapped,\r\n        uint256 ethReceived,\r\n        uint256 tokensIntoLiquidity\r\n    );\r\n\r\n    event TransferForeignToken(address token, uint256 amount);\r\n\r\n    constructor() payable ERC20(\"Clappin Cheeks\", \"CHEEKS\") {\r\n        address newOwner = msg.sender;  \r\n\r\n        uint256 totalSupply = 8008135 * 1e18; \r\n\r\n        buyOperationsFee = 20;\r\n        buyTotalFees = buyOperationsFee;\r\n\r\n        sellOperationsFee = 40;\r\n        sellTotalFees = sellOperationsFee;        \r\n\r\n        maxBuyAmount = (totalSupply * 20) / 1000; // 2%\r\n        maxSellAmount = (totalSupply * 20) / 1000; // 2%\r\n        maxWallet = (totalSupply * 20) / 1000; // 2%\r\n        swapTokensAtAmount = (totalSupply * 5) / 10000; // 0.05 %\r\n\r\n        operationsAddress = address(msg.sender);\r\n\r\n        _excludeFromMaxTransaction(newOwner, true);\r\n        _excludeFromMaxTransaction(address(this), true);\r\n        _excludeFromMaxTransaction(address(0xdead), true);\r\n        _excludeFromMaxTransaction(address(operationsAddress), true);\r\n\r\n        excludeFromFees(newOwner, true);\r\n        excludeFromFees(address(this), true);\r\n        excludeFromFees(address(0xdead), true);\r\n        excludeFromFees(address(operationsAddress), true);\r\n\r\n        _createInitialSupply(newOwner, totalSupply);\r\n\r\n        transferOwnership(newOwner);\r\n    }\r\n\r\n    receive() external payable {}\r\n\r\n    function setSwapTokensAtAmount(uint256 newSwapAmount) external onlyOwner {\r\n      require(newSwapAmount <= 50, \"Cannot set SwapTokensAtAmount above 0.5%\");\r\n       swapTokensAtAmount = (totalSupply() * newSwapAmount) / 10000;\r\n    }\r\n\r\n    function _excludeFromMaxTransaction(\r\n        address updAds,\r\n        bool isExcluded\r\n    ) private {\r\n        _isExcludedMaxTransactionAmount[updAds] = isExcluded;\r\n        emit MaxTransactionExclusion(updAds, isExcluded);\r\n    }\r\n\r\n    function excludeFromMaxTransaction(\r\n        address updAds,\r\n        bool isEx\r\n    ) external onlyOwner {\r\n        if (!isEx) {\r\n            require(\r\n                updAds != lpPair,\r\n                \"Cannot remove uniswap pair from max txn\"\r\n            );\r\n        }\r\n        _isExcludedMaxTransactionAmount[updAds] = isEx;\r\n    }\r\n\r\n    function _setAutomatedMarketMakerPair(address pair, bool value) private {\r\n        automatedMarketMakerPairs[pair] = value;\r\n        _excludeFromMaxTransaction(pair, value);\r\n        emit SetAutomatedMarketMakerPair(pair, value);\r\n    }\r\n\r\n    function setAutomatedMarketMakerPair(\r\n        address pair,\r\n        bool value\r\n    ) external onlyOwner {\r\n        require(\r\n            pair != lpPair,\r\n            \"The pair cannot be removed from automatedMarketMakerPairs\"\r\n        );\r\n        _setAutomatedMarketMakerPair(pair, value);\r\n        emit SetAutomatedMarketMakerPair(pair, value);\r\n    }        \r\n\r\n    function updateBuyTax(\r\n        uint256 _operationsFee\r\n    ) external onlyOwner {\r\n        buyOperationsFee = _operationsFee;\r\n        buyTotalFees = buyOperationsFee;\r\n        require(buyTotalFees <= 10, \"Must keep fees at 10% or less\");\r\n    }\r\n\r\n    function updateSellTax(\r\n        uint256 _operationsFee\r\n    ) external onlyOwner {\r\n        sellOperationsFee = _operationsFee;\r\n        sellTotalFees = sellOperationsFee;\r\n        require(sellTotalFees <= 10, \"Must keep fees at 10% or less\");\r\n    }\r\n\r\n    function emergencyETHRetrieval() external onlyOwner {\r\n        bool success;\r\n        (success, ) = address(msg.sender).call{value: address(this).balance}(\r\n            \"\"\r\n        );\r\n    }      \r\n\r\n    function excludeFromFees(address account, bool excluded) public onlyOwner {\r\n        _isExcludedFromFees[account] = excluded;\r\n        emit ExcludeFromFees(account, excluded);\r\n    }\r\n\r\n    function _transfer(\r\n        address from,\r\n        address to,\r\n        uint256 amount\r\n    ) internal override {\r\n        require(from != address(0), \"ERC20: transfer from the zero address\");\r\n        require(to != address(0), \"ERC20: transfer to the zero address\");\r\n        require(amount > 0, \"amount must be greater than 0\");\r\n\r\n        if (!tradingActive) {\r\n            require(\r\n                _isExcludedFromFees[from] || _isExcludedFromFees[to],\r\n                \"Trading is not active.\"\r\n            );\r\n        }\r\n\r\n       \r\n        if (limitsInEffect) {\r\n            if (\r\n                from != owner() &&\r\n                to != owner() &&\r\n                to != address(0xdead) &&\r\n                !_isExcludedFromFees[from] &&\r\n                !_isExcludedFromFees[to]\r\n            ) {                \r\n                //when buy\r\n                if (\r\n                    automatedMarketMakerPairs[from] &&\r\n                    !_isExcludedMaxTransactionAmount[to]\r\n                ) {\r\n                    require(\r\n                        amount <= maxBuyAmount,\r\n                        \"Buy transfer amount exceeds the max buy.\"\r\n                    );\r\n                    require(\r\n                        amount + balanceOf(to) <= maxWallet,\r\n                        \"Max Wallet Exceeded\"\r\n                    );\r\n                }\r\n                //when sell\r\n                else if (\r\n                    automatedMarketMakerPairs[to] &&\r\n                    !_isExcludedMaxTransactionAmount[from]\r\n                ) {\r\n                    require(\r\n                        amount <= maxSellAmount,\r\n                        \"Sell transfer amount exceeds the max sell.\"\r\n                    );\r\n                } else if (!_isExcludedMaxTransactionAmount[to]) {\r\n                    require(\r\n                        amount + balanceOf(to) <= maxWallet,\r\n                        \"Max Wallet Exceeded\"\r\n                    );\r\n                }\r\n            }\r\n        }\r\n\r\n        uint256 contractTokenBalance = balanceOf(address(this));\r\n\r\n        bool canSwap = contractTokenBalance >= swapTokensAtAmount;\r\n\r\n        if (\r\n            canSwap && swapEnabled && !swapping && automatedMarketMakerPairs[to]\r\n        ) {\r\n            swapping = true;\r\n            swapBack();\r\n            swapping = false;\r\n        }\r\n\r\n        bool takeFee = true;\r\n        // if any account belongs to _isExcludedFromFee account then remove the fee\r\n        if (_isExcludedFromFees[from] || _isExcludedFromFees[to]) {\r\n            takeFee = false;\r\n        }\r\n\r\n        uint256 fees = 0;\r\n        // only take fees on buys/sells, do not take on wallet transfers\r\n        if (takeFee) {\r\n           \r\n            // on sell\r\n            if (automatedMarketMakerPairs[to] && sellTotalFees > 0) {\r\n                fees = (amount * sellTotalFees) / 100;\r\n\r\n                tokensForOperations += (fees * sellOperationsFee) / sellTotalFees;\r\n            }\r\n            // on buy\r\n            else if (automatedMarketMakerPairs[from] && buyTotalFees > 0) {\r\n                fees = (amount * buyTotalFees) / 100;\r\n                tokensForOperations += (fees * buyOperationsFee) / buyTotalFees;\r\n            }\r\n\r\n            if (fees > 0) {\r\n                super._transfer(from, address(this), fees);\r\n            }\r\n\r\n            amount -= fees;\r\n        }\r\n\r\n        super._transfer(from, to, amount);\r\n    }\r\n\r\n    function swapTokensForEth(uint256 tokenAmount) private {\r\n        // generate the uniswap pair path of token -> weth\r\n        address[] memory path = new address[](2);\r\n        path[0] = address(this);\r\n        path[1] = dexRouter.WETH();\r\n\r\n        _approve(address(this), address(dexRouter), tokenAmount);\r\n\r\n        // make the swap\r\n        dexRouter.swapExactTokensForETHSupportingFeeOnTransferTokens(\r\n            tokenAmount,\r\n            0, // accept any amount of ETH\r\n            path,\r\n            address(this),\r\n            block.timestamp\r\n        );\r\n    }\r\n\r\n    function swapBack() private {\r\n        uint256 contractBalance = balanceOf(address(this));\r\n        uint256 totalTokensToSwap = tokensForOperations;\r\n\r\n        if (contractBalance == 0 || totalTokensToSwap == 0) {\r\n            return;\r\n        }\r\n\r\n        if (contractBalance > swapTokensAtAmount * 15) {\r\n            contractBalance = swapTokensAtAmount * 15;\r\n        }\r\n\r\n        bool success;\r\n\r\n        swapTokensForEth(contractBalance);\r\n\r\n        tokensForOperations = 0;\r\n\r\n        (success, ) = address(operationsAddress).call{\r\n            value: address(this).balance\r\n        }(\"\");\r\n    }\r\n\r\n    function transferForeignToken(\r\n        address _token,\r\n        address _to\r\n    ) external onlyOwner returns (bool _sent) {\r\n        require(_token != address(0), \"_token address cannot be 0\");\r\n        require(\r\n            _token != address(this) || !tradingActive,\r\n            \"Can't withdraw native tokens while trading is active\"\r\n        );\r\n        uint256 _contractBalance = IERC20(_token).balanceOf(address(this));\r\n        _sent = IERC20(_token).transfer(_to, _contractBalance);\r\n        emit TransferForeignToken(_token, _contractBalance);\r\n    }\r\n\r\n    function setOperationsAddress(\r\n        address _operationsAddress\r\n    ) external onlyOwner {\r\n        require(\r\n            _operationsAddress != address(0),\r\n            \"_operationsAddress address cannot be 0\"\r\n        );\r\n        operationsAddress = payable(_operationsAddress);\r\n        emit UpdatedOperationsAddress(_operationsAddress);\r\n    }\r\n\r\n    function removeLimits() external onlyOwner {\r\n        limitsInEffect = false;\r\n    }\r\n\r\n    function restoreLimits() external onlyOwner { \r\n        limitsInEffect = true;\r\n    }\r\n\r\n    function initializeLaunch() external onlyOwner {\r\n        require(!tradingActive, \"Trading is already active, cannot relaunch.\");     \r\n\r\n        address _dexRouter;\r\n\r\n        if (block.chainid == 1) {\r\n            _dexRouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; // ETH: Uniswap V2\r\n        } else if (block.chainid == 5) {\r\n            _dexRouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; // ETH: Goerli\r\n        } else if (block.chainid == 56) {\r\n            _dexRouter = 0x10ED43C718714eb63d5aA57B78B54704E256024E; // BNB Chain: PCS V2\r\n        } else if (block.chainid == 97) {\r\n            _dexRouter = 0xD99D1c33F9fC3444f8101754aBC46c52416550D1; // BNB Chain: PCS V2\r\n        } else if (block.chainid == 42161) {\r\n            _dexRouter = 0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506; // Arbitrum: SushiSwap\r\n        } else if (block.chainid == 31337){\r\n            _dexRouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;\r\n        } else {\r\n            revert(\"Chain not configured\");\r\n        }\r\n\r\n        // initialize router\r\n        dexRouter = IDexRouter(_dexRouter);\r\n        \r\n        // create pair\r\n        lpPair = IDexFactory(dexRouter.factory()).createPair(\r\n            address(this),\r\n            dexRouter.WETH()\r\n        );\r\n\r\n        _excludeFromMaxTransaction(address(lpPair), true);\r\n        _setAutomatedMarketMakerPair(address(lpPair), true);        \r\n\r\n        _excludeFromMaxTransaction(address(dexRouter), true);\r\n        excludeFromFees(address(dexRouter), true);  \r\n\r\n        require(\r\n            address(this).balance > 0,\r\n            \"Must have ETH on contract to launch\"\r\n        );\r\n        require(\r\n            balanceOf(address(this)) > 0,\r\n            \"Must have Tokens on contract to launch\"\r\n        );           \r\n\r\n        _approve(address(this), address(dexRouter), balanceOf(address(this)));\r\n\r\n        dexRouter.addLiquidityETH{value: address(this).balance}(\r\n            address(this),\r\n            balanceOf(address(this)),\r\n            0, // slippage is unavoidable\r\n            0, // slippage is unavoidable\r\n            msg.sender,\r\n            block.timestamp\r\n        ); \r\n    }\r\n\r\n    function enableTrading() external onlyOwner {\r\n        require(!tradingActive, \"Cannot reenable trading\");\r\n        tradingActive = true;\r\n        swapEnabled = true;\r\n        tradingActiveBlock = block.number;\r\n        emit EnabledTrading();\r\n    }      \r\n}"
      }
    },
    "settings": {
      "optimizer": {
        "enabled": false,
        "runs": 200
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      }
    }
  }}