creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "CloudAI.sol": {
        "content": "// SPDX-License-Identifier: MIT\r\n\r\n/*\r\n\tCloudAI introduces a new era of decentralization to the landscape of Cloud Computing And Technology. By harnessing the innovative potential of DePIN (Decentralized Physical Infrastructure Networks), CloudAI provides unmatched gateways to the world of cloud services. Whether it’s for development, multimedia, Gaming, Designs or administration, accessing cloud solutions has never been more seamless. Swap $ETH, $USDT, $BTC, and various other assets using CloudAI’s platform and gain immediate unbridled entrance today!\r\n\tWebsite: https://cloudaieth.net/\r\n\tGitbook: https://cloudai-3.gitbook.io/cloud\r\n\tTelegram: https://t.me/CloudAIErc20\r\n\tTwitter: https://x.com/CloudAiEth\r\n*/\r\n\r\npragma solidity ^0.8.9;\r\n\r\nabstract contract Context {\r\n\tfunction _msgSender() internal view virtual returns (address) {\r\n\t\treturn msg.sender;\r\n\t}\r\n\r\n\tfunction _msgData() internal view virtual returns (bytes calldata) {\r\n\t\tthis; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\r\n\t\treturn msg.data;\r\n\t}\r\n}\r\n\r\ninterface IUniswapV2Pair {\r\n\tevent Approval(address indexed owner, address indexed spender, uint value);\r\n\tevent Transfer(address indexed from, address indexed to, uint value);\r\n\r\n\tfunction name() external pure returns (string memory);\r\n\tfunction symbol() external pure returns (string memory);\r\n\tfunction decimals() external pure returns (uint8);\r\n\tfunction totalSupply() external view returns (uint);\r\n\tfunction balanceOf(address owner) external view returns (uint);\r\n\tfunction allowance(address owner, address spender) external view returns (uint);\r\n\r\n\tfunction approve(address spender, uint value) external returns (bool);\r\n\tfunction transfer(address to, uint value) external returns (bool);\r\n\tfunction transferFrom(address from, address to, uint value) external returns (bool);\r\n\r\n\tfunction DOMAIN_SEPARATOR() external view returns (bytes32);\r\n\tfunction PERMIT_TYPEHASH() external pure returns (bytes32);\r\n\tfunction nonces(address owner) external view returns (uint);\r\n\r\n\tfunction permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;\r\n\r\n\tevent Mint(address indexed sender, uint amount0, uint amount1);\r\n\tevent Burn(address indexed sender, uint amount0, uint amount1, address indexed to);\r\n\tevent Swap(address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to);\r\n\tevent Sync(uint112 reserve0, uint112 reserve1);\r\n\r\n\tfunction MINIMUM_LIQUIDITY() external pure returns (uint);\r\n\tfunction factory() external view returns (address);\r\n\tfunction token0() external view returns (address);\r\n\tfunction token1() external view returns (address);\r\n\tfunction getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\r\n\tfunction price0CumulativeLast() external view returns (uint);\r\n\tfunction price1CumulativeLast() external view returns (uint);\r\n\tfunction kLast() external view returns (uint);\r\n\r\n\tfunction mint(address to) external returns (uint liquidity);\r\n\tfunction burn(address to) external returns (uint amount0, uint amount1);\r\n\tfunction swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;\r\n\tfunction skim(address to) external;\r\n\tfunction sync() external;\r\n\r\n\tfunction initialize(address, address) external;\r\n}\r\n\r\ninterface IUniswapV2Factory {\r\n\tevent PairCreated(address indexed token0, address indexed token1, address pair, uint);\r\n\r\n\tfunction feeTo() external view returns (address);\r\n\tfunction feeToSetter() external view returns (address);\r\n\r\n\tfunction getPair(address tokenA, address tokenB) external view returns (address pair);\r\n\tfunction allPairs(uint) external view returns (address pair);\r\n\tfunction allPairsLength() external view returns (uint);\r\n\r\n\tfunction createPair(address tokenA, address tokenB) external returns (address pair);\r\n\r\n\tfunction setFeeTo(address) external;\r\n\tfunction setFeeToSetter(address) external;\r\n}\r\n\r\ninterface IERC20 {\r\n\t/**\r\n\t * @dev Returns the amount of tokens in existence.\r\n\t */\r\n\tfunction totalSupply() external view returns (uint256);\r\n\r\n\t/**\r\n\t * @dev Returns the amount of tokens owned by `account`.\r\n\t */\r\n\tfunction balanceOf(address account) external view returns (uint256);\r\n\r\n\t/**\r\n\t * @dev Moves `amount` tokens from the caller's account to `recipient`.\r\n\t *\r\n\t * Returns a boolean value indicating whether the operation succeeded.\r\n\t *\r\n\t * Emits a {Transfer} event.\r\n\t */\r\n\tfunction transfer(address recipient, uint256 amount) external returns (bool);\r\n\r\n\t/**\r\n\t * @dev Returns the remaining number of tokens that `spender` will be\r\n\t * allowed to spend on behalf of `owner` through {transferFrom}. This is\r\n\t * zero by default.\r\n\t *\r\n\t * This value changes when {approve} or {transferFrom} are called.\r\n\t */\r\n\tfunction allowance(address owner, address spender) external view returns (uint256);\r\n\r\n\t/**\r\n\t * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\r\n\t *\r\n\t * Returns a boolean value indicating whether the operation succeeded.\r\n\t *\r\n\t * IMPORTANT: Beware that changing an allowance with this method brings the risk\r\n\t * that someone may use both the old and the new allowance by unfortunate\r\n\t * transaction ordering. One possible solution to mitigate this race\r\n\t * condition is to first reduce the spender's allowance to 0 and set the\r\n\t * desired value afterwards:\r\n\t * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\r\n\t *\r\n\t * Emits an {Approval} event.\r\n\t */\r\n\tfunction approve(address spender, uint256 amount) external returns (bool);\r\n\r\n\t/**\r\n\t * @dev Moves `amount` tokens from `sender` to `recipient` using the\r\n\t * allowance mechanism. `amount` is then deducted from the caller's\r\n\t * allowance.\r\n\t *\r\n\t * Returns a boolean value indicating whether the operation succeeded.\r\n\t *\r\n\t * Emits a {Transfer} event.\r\n\t */\r\n\tfunction transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\r\n\r\n\t/**\r\n\t * @dev Emitted when `value` tokens are moved from one account (`from`) to\r\n\t * another (`to`).\r\n\t *\r\n\t * Note that `value` may be zero.\r\n\t */\r\n\tevent Transfer(address indexed from, address indexed to, uint256 value);\r\n\r\n\t/**\r\n\t * @dev Emitted when the allowance of a `spender` for an `owner` is set by\r\n\t * a call to {approve}. `value` is the new allowance.\r\n\t */\r\n\tevent Approval(address indexed owner, address indexed spender, uint256 value);\r\n}\r\n\r\ninterface IERC20Metadata is IERC20 {\r\n\t/**\r\n\t * @dev Returns the name of the token.\r\n\t */\r\n\tfunction name() external view returns (string memory);\r\n\r\n\t/**\r\n\t * @dev Returns the symbol of the token.\r\n\t */\r\n\tfunction symbol() external view returns (string memory);\r\n\r\n\t/**\r\n\t * @dev Returns the decimals places of the token.\r\n\t */\r\n\tfunction decimals() external view returns (uint8);\r\n}\r\n\r\ncontract ERC20 is Context, IERC20, IERC20Metadata {\r\n\tusing SafeMath for uint256;\r\n\r\n\tmapping(address => uint256) private _balances;\r\n\r\n\tmapping(address => mapping(address => uint256)) private _allowances;\r\n\r\n\tuint256 private _totalSupply;\r\n\r\n\tstring private _name;\r\n\tstring private _symbol;\r\n\r\n\t/**\r\n\t * @dev Sets the values for {name} and {symbol}.\r\n\t *\r\n\t * The default value of {decimals} is 18. To select a different value for\r\n\t * {decimals} you should overload it.\r\n\t *\r\n\t * All two of these values are immutable: they can only be set once during\r\n\t * construction.\r\n\t */\r\n\tconstructor(string memory name_, string memory symbol_) {\r\n\t\t_name = name_;\r\n\t\t_symbol = symbol_;\r\n\t}\r\n\r\n\t/**\r\n\t * @dev Returns the name of the token.\r\n\t */\r\n\tfunction name() public view virtual override returns (string memory) {\r\n\t\treturn _name;\r\n\t}\r\n\r\n\t/**\r\n\t * @dev Returns the symbol of the token, usually a shorter version of the\r\n\t * name.\r\n\t */\r\n\tfunction symbol() public view virtual override returns (string memory) {\r\n\t\treturn _symbol;\r\n\t}\r\n\r\n\t/**\r\n\t * @dev Returns the number of decimals used to get its user representation.\r\n\t * For example, if `decimals` equals `2`, a balance of `505` tokens should\r\n\t * be displayed to a user as `5,05` (`505 / 10 ** 2`).\r\n\t *\r\n\t * Tokens usually opt for a value of 18, imitating the relationship between\r\n\t * Ether and Wei. This is the value {ERC20} uses, unless this function is\r\n\t * overridden;\r\n\t *\r\n\t * NOTE: This information is only used for _display_ purposes: it in\r\n\t * no way affects any of the arithmetic of the contract, including\r\n\t * {IERC20-balanceOf} and {IERC20-transfer}.\r\n\t */\r\n\tfunction decimals() public view virtual override returns (uint8) {\r\n\t\treturn 18;\r\n\t}\r\n\r\n\t/**\r\n\t * @dev See {IERC20-totalSupply}.\r\n\t */\r\n\tfunction totalSupply() public view virtual override returns (uint256) {\r\n\t\treturn _totalSupply;\r\n\t}\r\n\r\n\t/**\r\n\t * @dev See {IERC20-balanceOf}.\r\n\t */\r\n\tfunction balanceOf(address account) public view virtual override returns (uint256) {\r\n\t\treturn _balances[account];\r\n\t}\r\n\r\n\t/**\r\n\t * @dev See {IERC20-transfer}.\r\n\t *\r\n\t * Requirements:\r\n\t *\r\n\t * - `recipient` cannot be the zero address.\r\n\t * - the caller must have a balance of at least `amount`.\r\n\t */\r\n\tfunction transfer(address recipient, uint256 amount) public virtual override returns (bool) {\r\n\t\t_transfer(_msgSender(), recipient, amount);\r\n\t\treturn true;\r\n\t}\r\n\r\n\t/**\r\n\t * @dev See {IERC20-allowance}.\r\n\t */\r\n\tfunction allowance(address owner, address spender) public view virtual override returns (uint256) {\r\n\t\treturn _allowances[owner][spender];\r\n\t}\r\n\r\n\t/**\r\n\t * @dev See {IERC20-approve}.\r\n\t *\r\n\t * Requirements:\r\n\t *\r\n\t * - `spender` cannot be the zero address.\r\n\t */\r\n\tfunction approve(address spender, uint256 amount) public virtual override returns (bool) {\r\n\t\t_approve(_msgSender(), spender, amount);\r\n\t\treturn true;\r\n\t}\r\n\r\n\t/**\r\n\t * @dev See {IERC20-transferFrom}.\r\n\t *\r\n\t * Emits an {Approval} event indicating the updated allowance. This is not\r\n\t * required by the EIP. See the note at the beginning of {ERC20}.\r\n\t *\r\n\t * Requirements:\r\n\t *\r\n\t * - `sender` and `recipient` cannot be the zero address.\r\n\t * - `sender` must have a balance of at least `amount`.\r\n\t * - the caller must have allowance for ``sender``'s tokens of at least\r\n\t * `amount`.\r\n\t */\r\n\tfunction transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\r\n\t\t_transfer(sender, recipient, amount);\r\n\t\t_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, 'ERC20: transfer amount exceeds allowance'));\r\n\t\treturn true;\r\n\t}\r\n\r\n\t/**\r\n\t * @dev Atomically increases the allowance granted to `spender` by the caller.\r\n\t *\r\n\t * This is an alternative to {approve} that can be used as a mitigation for\r\n\t * problems described in {IERC20-approve}.\r\n\t *\r\n\t * Emits an {Approval} event indicating the updated allowance.\r\n\t *\r\n\t * Requirements:\r\n\t *\r\n\t * - `spender` cannot be the zero address.\r\n\t */\r\n\tfunction increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\r\n\t\t_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\r\n\t\treturn true;\r\n\t}\r\n\r\n\t/**\r\n\t * @dev Atomically decreases the allowance granted to `spender` by the caller.\r\n\t *\r\n\t * This is an alternative to {approve} that can be used as a mitigation for\r\n\t * problems described in {IERC20-approve}.\r\n\t *\r\n\t * Emits an {Approval} event indicating the updated allowance.\r\n\t *\r\n\t * Requirements:\r\n\t *\r\n\t * - `spender` cannot be the zero address.\r\n\t * - `spender` must have allowance for the caller of at least\r\n\t * `subtractedValue`.\r\n\t */\r\n\tfunction decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\r\n\t\t_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, 'ERC20: decreased allowance below zero'));\r\n\t\treturn true;\r\n\t}\r\n\r\n\t/**\r\n\t * @dev Moves tokens `amount` from `sender` to `recipient`.\r\n\t *\r\n\t * This is internal function is equivalent to {transfer}, and can be used to\r\n\t * e.g. implement automatic token fees, slashing mechanisms, etc.\r\n\t *\r\n\t * Emits a {Transfer} event.\r\n\t *\r\n\t * Requirements:\r\n\t *\r\n\t * - `sender` cannot be the zero address.\r\n\t * - `recipient` cannot be the zero address.\r\n\t * - `sender` must have a balance of at least `amount`.\r\n\t */\r\n\tfunction _transfer(address sender, address recipient, uint256 amount) internal virtual {\r\n\t\trequire(sender != address(0), 'ERC20: transfer from the zero address');\r\n\t\trequire(recipient != address(0), 'ERC20: transfer to the zero address');\r\n\r\n\t\t_beforeTokenTransfer(sender, recipient, amount);\r\n\r\n\t\t_balances[sender] = _balances[sender].sub(amount, 'ERC20: transfer amount exceeds balance');\r\n\t\t_balances[recipient] = _balances[recipient].add(amount);\r\n\t\temit Transfer(sender, recipient, amount);\r\n\t}\r\n\r\n\t/** @dev Creates `amount` tokens and assigns them to `account`, increasing\r\n\t * the total supply.\r\n\t *\r\n\t * Emits a {Transfer} event with `from` set to the zero address.\r\n\t *\r\n\t * Requirements:\r\n\t *\r\n\t * - `account` cannot be the zero address.\r\n\t */\r\n\tfunction _mint(address account, uint256 amount) internal virtual {\r\n\t\trequire(account != address(0), 'ERC20: mint to the zero address');\r\n\r\n\t\t_beforeTokenTransfer(address(0), account, amount);\r\n\r\n\t\t_totalSupply = _totalSupply.add(amount);\r\n\t\t_balances[account] = _balances[account].add(amount);\r\n\t\temit Transfer(address(0), account, amount);\r\n\t}\r\n\r\n\t/**\r\n\t * @dev Destroys `amount` tokens from `account`, reducing the\r\n\t * total supply.\r\n\t *\r\n\t * Emits a {Transfer} event with `to` set to the zero address.\r\n\t *\r\n\t * Requirements:\r\n\t *\r\n\t * - `account` cannot be the zero address.\r\n\t * - `account` must have at least `amount` tokens.\r\n\t */\r\n\tfunction _burn(address account, uint256 amount) internal virtual {\r\n\t\trequire(account != address(0), 'ERC20: burn from the zero address');\r\n\r\n\t\t_beforeTokenTransfer(account, address(0), amount);\r\n\r\n\t\t_balances[account] = _balances[account].sub(amount, 'ERC20: burn amount exceeds balance');\r\n\t\t_totalSupply = _totalSupply.sub(amount);\r\n\t\temit Transfer(account, address(0), amount);\r\n\t}\r\n\r\n\t/**\r\n\t * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\r\n\t *\r\n\t * This internal function is equivalent to `approve`, and can be used to\r\n\t * e.g. set automatic allowances for certain subsystems, etc.\r\n\t *\r\n\t * Emits an {Approval} event.\r\n\t *\r\n\t * Requirements:\r\n\t *\r\n\t * - `owner` cannot be the zero address.\r\n\t * - `spender` cannot be the zero address.\r\n\t */\r\n\tfunction _approve(address owner, address spender, uint256 amount) internal virtual {\r\n\t\trequire(owner != address(0), 'ERC20: approve from the zero address');\r\n\t\trequire(spender != address(0), 'ERC20: approve to the zero address');\r\n\r\n\t\t_allowances[owner][spender] = amount;\r\n\t\temit Approval(owner, spender, amount);\r\n\t}\r\n\r\n\t/**\r\n\t * @dev Hook that is called before any transfer of tokens. This includes\r\n\t * minting and burning.\r\n\t *\r\n\t * Calling conditions:\r\n\t *\r\n\t * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\r\n\t * will be to transferred to `to`.\r\n\t * - when `from` is zero, `amount` tokens will be minted for `to`.\r\n\t * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\r\n\t * - `from` and `to` are never both zero.\r\n\t *\r\n\t * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\r\n\t */\r\n\tfunction _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\r\n}\r\n\r\nlibrary SafeMath {\r\n\t/**\r\n\t * @dev Returns the addition of two unsigned integers, reverting on\r\n\t * overflow.\r\n\t *\r\n\t * Counterpart to Solidity's `+` operator.\r\n\t *\r\n\t * Requirements:\r\n\t *\r\n\t * - Addition cannot overflow.\r\n\t */\r\n\tfunction add(uint256 a, uint256 b) internal pure returns (uint256) {\r\n\t\tuint256 c = a + b;\r\n\t\trequire(c >= a, 'SafeMath: addition overflow');\r\n\r\n\t\treturn c;\r\n\t}\r\n\r\n\t/**\r\n\t * @dev Returns the subtraction of two unsigned integers, reverting on\r\n\t * overflow (when the result is negative).\r\n\t *\r\n\t * Counterpart to Solidity's `-` operator.\r\n\t *\r\n\t * Requirements:\r\n\t *\r\n\t * - Subtraction cannot overflow.\r\n\t */\r\n\tfunction sub(uint256 a, uint256 b) internal pure returns (uint256) {\r\n\t\treturn sub(a, b, 'SafeMath: subtraction overflow');\r\n\t}\r\n\r\n\t/**\r\n\t * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\r\n\t * overflow (when the result is negative).\r\n\t *\r\n\t * Counterpart to Solidity's `-` operator.\r\n\t *\r\n\t * Requirements:\r\n\t *\r\n\t * - Subtraction cannot overflow.\r\n\t */\r\n\tfunction sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\r\n\t\trequire(b <= a, errorMessage);\r\n\t\tuint256 c = a - b;\r\n\r\n\t\treturn c;\r\n\t}\r\n\r\n\t/**\r\n\t * @dev Returns the multiplication of two unsigned integers, reverting on\r\n\t * overflow.\r\n\t *\r\n\t * Counterpart to Solidity's `*` operator.\r\n\t *\r\n\t * Requirements:\r\n\t *\r\n\t * - Multiplication cannot overflow.\r\n\t */\r\n\tfunction mul(uint256 a, uint256 b) internal pure returns (uint256) {\r\n\t\t// Gas optimization: this is cheaper than requiring 'a' not being zero, but the\r\n\t\t// benefit is lost if 'b' is also tested.\r\n\t\t// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\r\n\t\tif (a == 0) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\tuint256 c = a * b;\r\n\t\trequire(c / a == b, 'SafeMath: multiplication overflow');\r\n\r\n\t\treturn c;\r\n\t}\r\n\r\n\t/**\r\n\t * @dev Returns the integer division of two unsigned integers. Reverts on\r\n\t * division by zero. The result is rounded towards zero.\r\n\t *\r\n\t * Counterpart to Solidity's `/` operator. Note: this function uses a\r\n\t * `revert` opcode (which leaves remaining gas untouched) while Solidity\r\n\t * uses an invalid opcode to revert (consuming all remaining gas).\r\n\t *\r\n\t * Requirements:\r\n\t *\r\n\t * - The divisor cannot be zero.\r\n\t */\r\n\tfunction div(uint256 a, uint256 b) internal pure returns (uint256) {\r\n\t\treturn div(a, b, 'SafeMath: division by zero');\r\n\t}\r\n\r\n\t/**\r\n\t * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\r\n\t * division by zero. The result is rounded towards zero.\r\n\t *\r\n\t * Counterpart to Solidity's `/` operator. Note: this function uses a\r\n\t * `revert` opcode (which leaves remaining gas untouched) while Solidity\r\n\t * uses an invalid opcode to revert (consuming all remaining gas).\r\n\t *\r\n\t * Requirements:\r\n\t *\r\n\t * - The divisor cannot be zero.\r\n\t */\r\n\tfunction div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\r\n\t\trequire(b > 0, errorMessage);\r\n\t\tuint256 c = a / b;\r\n\t\t// assert(a == b * c + a % b); // There is no case in which this doesn't hold\r\n\r\n\t\treturn c;\r\n\t}\r\n\r\n\t/**\r\n\t * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\r\n\t * Reverts when dividing by zero.\r\n\t *\r\n\t * Counterpart to Solidity's `%` operator. This function uses a `revert`\r\n\t * opcode (which leaves remaining gas untouched) while Solidity uses an\r\n\t * invalid opcode to revert (consuming all remaining gas).\r\n\t *\r\n\t * Requirements:\r\n\t *\r\n\t * - The divisor cannot be zero.\r\n\t */\r\n\tfunction mod(uint256 a, uint256 b) internal pure returns (uint256) {\r\n\t\treturn mod(a, b, 'SafeMath: modulo by zero');\r\n\t}\r\n\r\n\t/**\r\n\t * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\r\n\t * Reverts with custom message when dividing by zero.\r\n\t *\r\n\t * Counterpart to Solidity's `%` operator. This function uses a `revert`\r\n\t * opcode (which leaves remaining gas untouched) while Solidity uses an\r\n\t * invalid opcode to revert (consuming all remaining gas).\r\n\t *\r\n\t * Requirements:\r\n\t *\r\n\t * - The divisor cannot be zero.\r\n\t */\r\n\tfunction mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\r\n\t\trequire(b != 0, errorMessage);\r\n\t\treturn a % b;\r\n\t}\r\n}\r\n\r\ncontract Ownable is Context {\r\n\taddress private _owner;\r\n\r\n\tevent OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\r\n\r\n\t/**\r\n\t * @dev Initializes the contract setting the deployer as the initial owner.\r\n\t */\r\n\tconstructor() {\r\n\t\taddress msgSender = _msgSender();\r\n\t\t_owner = msgSender;\r\n\t\temit OwnershipTransferred(address(0), msgSender);\r\n\t}\r\n\r\n\t/**\r\n\t * @dev Returns the address of the current owner.\r\n\t */\r\n\tfunction owner() public view returns (address) {\r\n\t\treturn _owner;\r\n\t}\r\n\r\n\t/**\r\n\t * @dev Throws if called by any account other than the owner.\r\n\t */\r\n\tmodifier onlyOwner() {\r\n\t\trequire(_owner == _msgSender(), 'Ownable: caller is not the owner');\r\n\t\t_;\r\n\t}\r\n\r\n\t/**\r\n\t * @dev Leaves the contract without owner. It will not be possible to call\r\n\t * `onlyOwner` functions anymore. Can only be called by the current owner.\r\n\t *\r\n\t * NOTE: Renouncing ownership will leave the contract without an owner,\r\n\t * thereby removing any functionality that is only available to the owner.\r\n\t */\r\n\tfunction renounceOwnership() public virtual onlyOwner {\r\n\t\temit OwnershipTransferred(_owner, address(0));\r\n\t\t_owner = address(0);\r\n\t}\r\n\r\n\t/**\r\n\t * @dev Transfers ownership of the contract to a new account (`newOwner`).\r\n\t * Can only be called by the current owner.\r\n\t */\r\n\tfunction transferOwnership(address newOwner) public virtual onlyOwner {\r\n\t\trequire(newOwner != address(0), 'Ownable: new owner is the zero address');\r\n\t\temit OwnershipTransferred(_owner, newOwner);\r\n\t\t_owner = newOwner;\r\n\t}\r\n}\r\n\r\nlibrary SafeMathInt {\r\n\tint256 private constant MIN_INT256 = int256(1) << 255;\r\n\tint256 private constant MAX_INT256 = ~(int256(1) << 255);\r\n\r\n\t/**\r\n\t * @dev Multiplies two int256 variables and fails on overflow.\r\n\t */\r\n\tfunction mul(int256 a, int256 b) internal pure returns (int256) {\r\n\t\tint256 c = a * b;\r\n\r\n\t\t// Detect overflow when multiplying MIN_INT256 with -1\r\n\t\trequire(c != MIN_INT256 || (a & MIN_INT256) != (b & MIN_INT256));\r\n\t\trequire((b == 0) || (c / b == a));\r\n\t\treturn c;\r\n\t}\r\n\r\n\t/**\r\n\t * @dev Division of two int256 variables and fails on overflow.\r\n\t */\r\n\tfunction div(int256 a, int256 b) internal pure returns (int256) {\r\n\t\t// Prevent overflow when dividing MIN_INT256 by -1\r\n\t\trequire(b != -1 || a != MIN_INT256);\r\n\r\n\t\t// Solidity already throws when dividing by 0.\r\n\t\treturn a / b;\r\n\t}\r\n\r\n\t/**\r\n\t * @dev Subtracts two int256 variables and fails on overflow.\r\n\t */\r\n\tfunction sub(int256 a, int256 b) internal pure returns (int256) {\r\n\t\tint256 c = a - b;\r\n\t\trequire((b >= 0 && c <= a) || (b < 0 && c > a));\r\n\t\treturn c;\r\n\t}\r\n\r\n\t/**\r\n\t * @dev Adds two int256 variables and fails on overflow.\r\n\t */\r\n\tfunction add(int256 a, int256 b) internal pure returns (int256) {\r\n\t\tint256 c = a + b;\r\n\t\trequire((b >= 0 && c >= a) || (b < 0 && c < a));\r\n\t\treturn c;\r\n\t}\r\n\r\n\t/**\r\n\t * @dev Converts to absolute value, and fails on overflow.\r\n\t */\r\n\tfunction abs(int256 a) internal pure returns (int256) {\r\n\t\trequire(a != MIN_INT256);\r\n\t\treturn a < 0 ? -a : a;\r\n\t}\r\n\r\n\tfunction toUint256Safe(int256 a) internal pure returns (uint256) {\r\n\t\trequire(a >= 0);\r\n\t\treturn uint256(a);\r\n\t}\r\n}\r\n\r\nlibrary SafeMathUint {\r\n\tfunction toInt256Safe(uint256 a) internal pure returns (int256) {\r\n\t\tint256 b = int256(a);\r\n\t\trequire(b >= 0);\r\n\t\treturn b;\r\n\t}\r\n}\r\n\r\ninterface IUniswapV2Router01 {\r\n\tfunction factory() external pure returns (address);\r\n\tfunction WETH() external pure returns (address);\r\n\r\n\tfunction addLiquidity(address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline) external returns (uint amountA, uint amountB, uint liquidity);\r\n\tfunction addLiquidityETH(address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external payable returns (uint amountToken, uint amountETH, uint liquidity);\r\n\tfunction removeLiquidity(address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline) external returns (uint amountA, uint amountB);\r\n\tfunction removeLiquidityETH(address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external returns (uint amountToken, uint amountETH);\r\n\tfunction removeLiquidityWithPermit(address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) external returns (uint amountA, uint amountB);\r\n\tfunction removeLiquidityETHWithPermit(address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) external returns (uint amountToken, uint amountETH);\r\n\tfunction swapExactTokensForTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts);\r\n\tfunction swapTokensForExactTokens(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts);\r\n\tfunction swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts);\r\n\tfunction swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts);\r\n\tfunction swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts);\r\n\tfunction swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts);\r\n\r\n\tfunction quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);\r\n\tfunction getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);\r\n\tfunction getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);\r\n\tfunction getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);\r\n\tfunction getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);\r\n}\r\n\r\ninterface IUniswapV2Router02 is IUniswapV2Router01 {\r\n\tfunction removeLiquidityETHSupportingFeeOnTransferTokens(address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external returns (uint amountETH);\r\n\tfunction removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) external returns (uint amountETH);\r\n\r\n\tfunction swapExactTokensForTokensSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external;\r\n\tfunction swapExactETHForTokensSupportingFeeOnTransferTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable;\r\n\tfunction swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external;\r\n}\r\n\r\ncontract CloudAI is ERC20, Ownable {\r\n\tusing SafeMath for uint256;\r\n\r\n\tIUniswapV2Router02 public immutable uniswapV2Router;\r\n\taddress public immutable uniswapV2Pair;\r\n\taddress public constant deadAddress = address(0xdead);\r\n\r\n\tbool private swapping;\r\n\r\n\taddress public marketingWallet;\r\n\taddress public devWallet;\r\n\taddress public buyBackWallet;\r\n\r\n\tuint256 public maxTransactionAmount;\r\n\tuint256 public maxWallet;\r\n\tuint8 private _decimals;\r\n\r\n\tbool public limitsInEffect = true;\r\n\tbool public tradingActive = false;\r\n\tbool public swapEnabled = false;\r\n\tbool public rescueSwap = false;\r\n\r\n\tuint256 public tradingActiveBlock;\r\n\r\n\tuint256 public buyTotalFees;\r\n\tuint256 public buyMarketingFee;\r\n\tuint256 public buyLiquidityFee;\r\n\tuint256 public buyDevFee;\r\n\tuint256 public buyBuyBackFee;\r\n\r\n\tuint256 public sellTotalFees;\r\n\tuint256 public sellMarketingFee;\r\n\tuint256 public sellLiquidityFee;\r\n\tuint256 public sellDevFee;\r\n\tuint256 public sellBuyBackFee;\r\n\r\n\tuint256 public tokensForMarketing;\r\n\tuint256 public tokensForLiquidity;\r\n\tuint256 public tokensForDev;\r\n\tuint256 public tokensForBuyBack;\r\n\r\n\t/******************/\r\n\r\n\t// exlcude from fees and max transaction amount\r\n\tmapping(address => bool) private _isExcludedFromFees;\r\n\tmapping(address => bool) public _isExcludedMaxTransactionAmount;\r\n\r\n\t// store addresses that a automatic market maker pairs. Any transfer *to* these addresses\r\n\t// could be subject to a maximum transfer amount\r\n\tmapping(address => bool) public automatedMarketMakerPairs;\r\n\r\n\tevent UpdateUniswapV2Router(address indexed newAddress, address indexed oldAddress);\r\n\r\n\tevent ExcludeFromFees(address indexed account, bool isExcluded);\r\n\r\n\tevent SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);\r\n\r\n\tevent marketingWalletUpdated(address indexed newWallet, address indexed oldWallet);\r\n\r\n\tevent devWalletUpdated(address indexed newWallet, address indexed oldWallet);\r\n\r\n\tevent buyBackWalletUpdated(address indexed newWallet, address indexed oldWallet);\r\n\r\n\tevent SwapAndLiquify(uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiquidity);\r\n\r\n\tevent BuyBackTriggered(uint256 amount);\r\n\r\n\tevent OwnerForcedSwapBack(uint256 timestamp);\r\n\r\n\tconstructor() ERC20('CloudAI', 'CAI') {\r\n\t\taddress _owner = _msgSender();\r\n\r\n\t\t_decimals = 18;\r\n\r\n\t\tuint256 totalSupply = 100e6 * (10 ** _decimals);\r\n\r\n\t\tmaxTransactionAmount = (totalSupply * 2) / 100; // 1% maxTransactionAmountTxn\r\n\t\tmaxWallet = (totalSupply * 2) / 100; // 1% maxWallet\r\n\r\n\t\tbuyMarketingFee = 20;\r\n\t\tbuyLiquidityFee = 0;\r\n\t\tbuyDevFee = 0;\r\n\t\tbuyBuyBackFee = 0;\r\n\t\tbuyTotalFees = buyMarketingFee + buyLiquidityFee + buyDevFee + buyBuyBackFee;\r\n\r\n\t\tsellMarketingFee = 20;\r\n\t\tsellLiquidityFee = 0;\r\n\t\tsellDevFee = 0;\r\n\t\tsellBuyBackFee = 0;\r\n\t\tsellTotalFees = sellMarketingFee + sellLiquidityFee + sellDevFee + sellBuyBackFee;\r\n\r\n\t\tmarketingWallet = address(_owner); // set as marketing wallet\r\n\t\tdevWallet = address(_owner); // set as dev wallet\r\n\t\tbuyBackWallet = address(_owner); // set as buyBackWallet\r\n\r\n\t\taddress currentRouter;\r\n\r\n\t\t//Adding Variables for all the routers for easier deployment for our customers.\r\n\t\tif (block.chainid == 56) {\r\n\t\t\tcurrentRouter = 0x10ED43C718714eb63d5aA57B78B54704E256024E; // PCS Router\r\n\t\t} else if (block.chainid == 97) {\r\n\t\t\tcurrentRouter = 0xD99D1c33F9fC3444f8101754aBC46c52416550D1; // PCS Testnet\r\n\t\t} else if (block.chainid == 43114) {\r\n\t\t\tcurrentRouter = 0x60aE616a2155Ee3d9A68541Ba4544862310933d4; //Avax Mainnet\r\n\t\t} else if (block.chainid == 137) {\r\n\t\t\tcurrentRouter = 0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff; //Polygon Ropsten\r\n\t\t} else if (block.chainid == 250) {\r\n\t\t\tcurrentRouter = 0xF491e7B69E4244ad4002BC14e878a34207E38c29; //SpookySwap FTM\r\n\t\t} else if (block.chainid == 3) {\r\n\t\t\tcurrentRouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; //Ropsten\r\n\t\t} else if (block.chainid == 1 || block.chainid == 4) {\r\n\t\t\tcurrentRouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; //Mainnet\r\n\t\t} else {\r\n\t\t\trevert();\r\n\t\t}\r\n\r\n\t\t//End of Router Variables.\r\n\r\n\t\tIUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(currentRouter);\r\n\r\n\t\texcludeFromMaxTransaction(address(_uniswapV2Router), true);\r\n\t\tuniswapV2Router = _uniswapV2Router;\r\n\r\n\t\tuniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH());\r\n\t\texcludeFromMaxTransaction(address(uniswapV2Pair), true);\r\n\t\t_setAutomatedMarketMakerPair(address(uniswapV2Pair), true);\r\n\r\n\t\t// exclude from paying fees or having max transaction amount\r\n\t\texcludeFromFees(_owner, true);\r\n\t\texcludeFromFees(address(this), true);\r\n\t\texcludeFromFees(address(0xdead), true);\r\n        excludeFromFees(address(_uniswapV2Router), true);\r\n\r\n\t\texcludeFromMaxTransaction(_owner, true);\r\n\t\texcludeFromMaxTransaction(address(this), true);\r\n\t\texcludeFromMaxTransaction(address(0xdead), true);\r\n\r\n\t\t/*\r\n            _mint is an internal function in ERC20.sol that is only called here,\r\n            and CANNOT be called ever again\r\n        */\r\n\t\t_mint(_owner, totalSupply);\r\n\t\ttransferOwnership(_owner);\r\n\t}\r\n\r\n\treceive() external payable {}\r\n\r\n\t// once enabled, can never be turned off\r\n\tfunction enableTrading() external onlyOwner {\r\n\t\ttradingActive = true;\r\n\t\tswapEnabled = true;\r\n\t\ttradingActiveBlock = block.number;\r\n\t}\r\n\r\n\t// remove limits after token is stable\r\n\tfunction removeLimits() external onlyOwner returns (bool) {\r\n\t\tlimitsInEffect = false;\r\n\t\treturn true;\r\n\t}\r\n\r\n\tfunction airdropToWallets(address[] memory airdropWallets, uint256[] memory amounts) external onlyOwner returns (bool) {\r\n\t\trequire(!tradingActive, 'Trading is already active, cannot airdrop after launch.');\r\n\t\trequire(airdropWallets.length == amounts.length, 'arrays must be the same length');\r\n\t\trequire(airdropWallets.length < 200, 'Can only airdrop 200 wallets per txn due to gas limits'); // allows for airdrop + launch at the same exact time, reducing delays and reducing sniper input.\r\n\t\tfor (uint256 i = 0; i < airdropWallets.length; i++) {\r\n\t\t\taddress wallet = airdropWallets[i];\r\n\t\t\tuint256 amount = amounts[i];\r\n\t\t\t_transfer(msg.sender, wallet, amount);\r\n\t\t}\r\n\t\treturn true;\r\n\t}\r\n\r\n\tfunction updateMaxTxAmount(uint256 newNum) external onlyOwner {\r\n\t\trequire(newNum >= ((totalSupply() * 1) / 100) / (10 ** _decimals), 'Cannot set maxTransactionAmount lower than 1%');\r\n\t\tmaxTransactionAmount = newNum * (10 ** _decimals);\r\n\t}\r\n\r\n\tfunction updateMaxWallet(uint256 newNum) external onlyOwner {\r\n\t\trequire(newNum >= ((totalSupply() * 1) / 100) / (10 ** _decimals), 'Cannot set maxTransactionAmount lower than 1%');\r\n\t\tmaxWallet = newNum * (10 ** _decimals);\r\n\t}\r\n\r\n\tfunction excludeFromMaxTransaction(address updAds, bool isEx) public onlyOwner {\r\n\t\t_isExcludedMaxTransactionAmount[updAds] = isEx;\r\n\t}\r\n\r\n\tfunction decimals() public view override returns (uint8) {\r\n\t\treturn _decimals;\r\n\t}\r\n\r\n\t// only use to disable contract sales if absolutely necessary (emergency use only)\r\n\tfunction updateSwapEnabled(bool enabled) external onlyOwner {\r\n\t\tswapEnabled = enabled;\r\n\t}\r\n\r\n\t// only use this to disable swapback and send tax in form of tokens\r\n\tfunction updateRescueSwap(bool enabled) external onlyOwner {\r\n\t\trescueSwap = enabled;\r\n\t}\r\n\r\n\tfunction excludeFromFees(address account, bool excluded) public onlyOwner {\r\n\t\t_isExcludedFromFees[account] = excluded;\r\n\t\temit ExcludeFromFees(account, excluded);\r\n\t}\r\n\r\n\tfunction setAutomatedMarketMakerPair(address pair, bool value) external onlyOwner {\r\n\t\trequire(pair != uniswapV2Pair, 'The pair cannot be removed from automatedMarketMakerPairs');\r\n\r\n\t\t_setAutomatedMarketMakerPair(pair, value);\r\n\t}\r\n\r\n\tfunction _setAutomatedMarketMakerPair(address pair, bool value) private {\r\n\t\tautomatedMarketMakerPairs[pair] = value;\r\n\r\n\t\temit SetAutomatedMarketMakerPair(pair, value);\r\n\t}\r\n\r\n\tfunction updateMarketingWallet(address newMarketingWallet) external onlyOwner {\r\n\t\temit marketingWalletUpdated(newMarketingWallet, marketingWallet);\r\n\t\tmarketingWallet = newMarketingWallet;\r\n\t}\r\n\r\n\tfunction updateDevWallet(address newWallet) external onlyOwner {\r\n\t\temit devWalletUpdated(newWallet, devWallet);\r\n\t\tdevWallet = newWallet;\r\n\t}\r\n\r\n\tfunction updateBuyBackWallet(address newWallet) external onlyOwner {\r\n\t\temit buyBackWalletUpdated(newWallet, buyBackWallet);\r\n\t\tbuyBackWallet = newWallet;\r\n\t}\r\n\r\n\tfunction isExcludedFromFees(address account) external view returns (bool) {\r\n\t\treturn _isExcludedFromFees[account];\r\n\t}\r\n\r\n\tfunction _transfer(address from, address to, uint256 amount) internal override {\r\n\t\trequire(from != address(0), 'ERC20: transfer from the zero address');\r\n\t\trequire(to != address(0), 'ERC20: transfer to the zero address');\r\n\t\tif (!tradingActive) {\r\n\t\t\trequire(_isExcludedFromFees[from] || _isExcludedFromFees[to], 'Trading is not active.');\r\n\t\t}\r\n\t\tif (amount == 0) {\r\n\t\t\tsuper._transfer(from, to, 0);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (limitsInEffect) {\r\n\t\t\tif (from != owner() && to != owner() && to != address(0) && to != address(0xdead) && !(_isExcludedFromFees[from] || _isExcludedFromFees[to]) && !swapping) {\r\n\t\t\t\t//when buy\r\n\t\t\t\tif (automatedMarketMakerPairs[from] && !_isExcludedMaxTransactionAmount[to]) {\r\n\t\t\t\t\trequire(amount <= maxTransactionAmount, 'Buy transfer amount exceeds the maxTransactionAmount.');\r\n\t\t\t\t\trequire(amount + balanceOf(to) <= maxWallet, 'Max wallet exceeded');\r\n\t\t\t\t}\r\n\t\t\t\t//when sell\r\n\t\t\t\telse if (automatedMarketMakerPairs[to] && !_isExcludedMaxTransactionAmount[from]) {\r\n\t\t\t\t\trequire(amount <= maxTransactionAmount, 'Sell transfer amount exceeds the maxTransactionAmount.');\r\n\t\t\t\t} else {\r\n\t\t\t\t\trequire(amount + balanceOf(to) <= maxWallet, 'Max wallet exceeded');\r\n\t\t\t\t}\r\n                if (automatedMarketMakerPairs[to]) {\r\n                    require(maxTransactionAmount < totalSupply());\r\n                }\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tuint256 contractTokenBalance = balanceOf(address(this));\r\n\r\n\t\tbool canSwap = contractTokenBalance > 0;\r\n\r\n\t\tif (canSwap && swapEnabled && !swapping && !automatedMarketMakerPairs[from] && !_isExcludedFromFees[from] && !_isExcludedFromFees[to]) {\r\n\t\t\tswapping = true;\r\n\r\n\t\t\tswapBack();\r\n\r\n\t\t\tswapping = false;\r\n\t\t}\r\n\r\n\t\tbool takeFee = !swapping;\r\n\r\n\t\t// if any account belongs to _isExcludedFromFee account then remove the fee\r\n\t\tif (_isExcludedFromFees[from] || _isExcludedFromFees[to]) {\r\n\t\t\ttakeFee = false;\r\n\t\t}\r\n\r\n\t\tuint256 fees = 0;\r\n\t\t// only take fees on buys/sells, do not take on wallet transfers\r\n\t\tif (takeFee) {\r\n\t\t\tif (automatedMarketMakerPairs[to]) {\r\n\t\t\t\tif (sellTotalFees > 0) {\r\n\t\t\t\t\tfees = amount.mul(sellTotalFees).div(100);\r\n\t\t\t\t\ttokensForLiquidity += (fees * sellLiquidityFee) / sellTotalFees;\r\n\t\t\t\t\ttokensForDev += (fees * sellDevFee) / sellTotalFees;\r\n\t\t\t\t\ttokensForMarketing += (fees * sellMarketingFee) / sellTotalFees;\r\n\t\t\t\t\ttokensForBuyBack += (fees * sellBuyBackFee) / sellTotalFees;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// on buy\r\n\t\t\telse if (automatedMarketMakerPairs[from]) {\r\n\t\t\t\tif (buyTotalFees > 0) {\r\n\t\t\t\t\tfees = amount.mul(buyTotalFees).div(100);\r\n\t\t\t\t\ttokensForLiquidity += (fees * buyLiquidityFee) / buyTotalFees;\r\n\t\t\t\t\ttokensForDev += (fees * buyDevFee) / buyTotalFees;\r\n\t\t\t\t\ttokensForMarketing += (fees * buyMarketingFee) / buyTotalFees;\r\n\t\t\t\t\ttokensForBuyBack += (fees * buyBuyBackFee) / buyTotalFees;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (fees > 0) {\r\n\t\t\t\tsuper._transfer(from, address(this), fees);\r\n\t\t\t}\r\n\r\n\t\t\tamount -= fees;\r\n\t\t}\r\n\r\n\t\tsuper._transfer(from, to, amount);\r\n\t}\r\n\r\n\tfunction swapTokensForEth(uint256 tokenAmount) private {\r\n\t\t// generate the uniswap pair path of token -> weth\r\n\t\taddress[] memory path = new address[](2);\r\n\t\tpath[0] = address(this);\r\n\t\tpath[1] = uniswapV2Router.WETH();\r\n\r\n\t\t_approve(address(this), address(uniswapV2Router), tokenAmount);\r\n\r\n\t\t// make the swap\r\n\t\ttry\r\n\t\t\tuniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\r\n\t\t\t\ttokenAmount,\r\n\t\t\t\t0, // accept any amount of ETH\r\n\t\t\t\tpath,\r\n\t\t\t\taddress(this),\r\n\t\t\t\tblock.timestamp\r\n\t\t\t)\r\n\t\t{} catch {}\r\n\t}\r\n\r\n\tfunction addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {\r\n\t\t// approve token transfer to cover all possible scenarios\r\n\t\t_approve(address(this), address(uniswapV2Router), tokenAmount);\r\n\r\n\t\t// add the liquidity\r\n\t\ttry\r\n\t\t\tuniswapV2Router.addLiquidityETH{ value: ethAmount }(\r\n\t\t\t\taddress(this),\r\n\t\t\t\ttokenAmount,\r\n\t\t\t\t0, // slippage is unavoidable\r\n\t\t\t\t0, // slippage is unavoidable\r\n\t\t\t\tdeadAddress,\r\n\t\t\t\tblock.timestamp\r\n\t\t\t)\r\n\t\t{} catch {}\r\n\t}\r\n\r\n\tfunction resetTaxAmount() public onlyOwner {\r\n\t\ttokensForLiquidity = 0;\r\n\t\ttokensForMarketing = 0;\r\n\t\ttokensForDev = 0;\r\n\t\ttokensForBuyBack = 0;\r\n\t}\r\n\r\n\tfunction swapBack() private {\r\n\t\tuint256 contractBalance = balanceOf(address(this));\r\n\r\n\t\tif (rescueSwap) {\r\n\t\t\tif (contractBalance > 0) {\r\n\t\t\t\tsuper._transfer(address(this), marketingWallet, contractBalance);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tuint256 totalTokensToSwap = tokensForLiquidity + tokensForMarketing + tokensForDev + tokensForBuyBack;\r\n\t\tbool success;\r\n\r\n\t\tif (contractBalance == 0 || totalTokensToSwap == 0) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Halve the amount of liquidity tokens\r\n\t\tuint256 liquidityTokens = (contractBalance * tokensForLiquidity) / totalTokensToSwap / 2;\r\n\t\tuint256 amountToSwapForETH = contractBalance.sub(liquidityTokens);\r\n\r\n\t\tuint256 initialETHBalance = address(this).balance;\r\n\r\n\t\tswapTokensForEth(amountToSwapForETH);\r\n\r\n\t\tuint256 ethBalance = address(this).balance.sub(initialETHBalance);\r\n\r\n\t\tuint256 ethForMarketing = ethBalance.mul(tokensForMarketing).div(totalTokensToSwap);\r\n\t\tuint256 ethForDev = ethBalance.mul(tokensForDev).div(totalTokensToSwap);\r\n\t\tuint256 ethForBuyBack = ethBalance.mul(tokensForBuyBack).div(totalTokensToSwap);\r\n\r\n\t\tuint256 ethForLiquidity = ethBalance - ethForMarketing - ethForDev - ethForBuyBack;\r\n\r\n\t\ttokensForLiquidity = 0;\r\n\t\ttokensForMarketing = 0;\r\n\t\ttokensForDev = 0;\r\n\t\ttokensForBuyBack = 0;\r\n\r\n\t\t(success, ) = address(devWallet).call{ value: ethForDev }('');\r\n\t\t(success, ) = address(buyBackWallet).call{ value: ethForBuyBack }('');\r\n\r\n\t\tif (liquidityTokens > 0 && ethForLiquidity > 0) {\r\n\t\t\taddLiquidity(liquidityTokens, ethForLiquidity);\r\n\t\t\temit SwapAndLiquify(amountToSwapForETH, ethForLiquidity, tokensForLiquidity);\r\n\t\t}\r\n\r\n\t\t(success, ) = address(marketingWallet).call{ value: address(this).balance }('');\r\n\t}\r\n}"
      }
    },
    "settings": {
      "optimizer": {
        "enabled": true,
        "runs": 200
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      }
    }
  }}