Transaction Hash:
Block:
12835355 at Jul-16-2021 02:48:06 AM +UTC
Transaction Fee:
0.227783104 ETH
$426.52
Gas Used:
7,118,222 Gas / 32 Gwei
Emitted Events:
24 |
Token.OwnershipTransferred( previousOwner=0x0000000000000000000000000000000000000000, newOwner=[Sender] 0xef7287cad00c11b65dfb69be1f63385597144104 )
|
25 |
UniswapV2Factory.PairCreated( token0=Token, token1=0xC02aaA39...83C756Cc2, pair=UniswapV2Pair, 48492 )
|
26 |
Token.Transfer( from=0x0000000000000000000000000000000000000000, to=[Sender] 0xef7287cad00c11b65dfb69be1f63385597144104, value=1000000000000000000 )
|
Account State Difference:
Address | Before | After | State Difference | ||
---|---|---|---|---|---|
0x48Df9e37...b119Dd084 |
0 Eth
Nonce: 0
|
0 Eth
Nonce: 1
| |||
0x5C69bEe7...B9cc5aA6f | (Uniswap V2: Factory Contract) | ||||
0xbDAEba60...D0159C835 |
0 Eth
Nonce: 0
|
0 Eth
Nonce: 1
| |||
0xEA674fdD...16B898ec8
Miner
| (Ethermine) | 2,107.798151938288323063 Eth | 2,108.025935042288323063 Eth | 0.227783104 | |
0xef7287ca...597144104 | (Art Inu: Deployer) |
0.3 Eth
Nonce: 0
|
0.072216896 Eth
Nonce: 1
| 0.227783104 |
Execution Trace
Token.60c06040( )

-
UniswapV2Router02.STATICCALL( )
-
UniswapV2Router02.STATICCALL( )
UniswapV2Factory.createPair( tokenA=0x48Df9e374600b6966c5A290350Be4F9b119Dd084, tokenB=0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 ) => ( pair=0xbDAEba60d7Bb3eccE97f8Ff22EAB3e6D0159C835 )
-
UniswapV2Pair.60806040( )
-
UniswapV2Pair.initialize( _token0=0x48Df9e374600b6966c5A290350Be4F9b119Dd084, _token1=0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 )
-
File 1 of 4: Token
File 2 of 4: UniswapV2Factory
File 3 of 4: UniswapV2Router02
File 4 of 4: UniswapV2Pair
1{"Context.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/*\n * @dev Provides information about the current executioncontext, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they shouldnot be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not bethe 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\nfunction _msgData() internal view virtual returns (bytes calldata) {\n this; // silence state mutability warning without generating bytecode- see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n"},"Crowdsale.sol":{"content":"import \"Ownable.sol\";\nimport \"Token.sol\";\npragma solidity 0.8.0;\n\ncontract CrowdSale is Ownable {\n Token public tokenSold;\n uint256 public rateInTokens;\n uint256 public minimumBuyBNB = 660000000000000000;\n bool public onlyWhitelisted = true;\n\n mapping(address =\u003e bool) publicwhitelistedAddress;\n mapping(address =\u003e uint256) public whitelistedAmount;\n\n constructor(Token TokenAdr, uint256 rate) {\ntokenSold = TokenAdr;\n rateInTokens = rate;\n }\n\n event TokensSold(address tokenBuyer, uint256 amountBought);\n\n functionwhiteListAddresses(address[] memory _whitelist, uint256 _amount)\n public\n onlyOwner\n {\n for (uint256 j = 0; j \u003c_whitelist.length; j++) {\n whitelistedAmount[_whitelist[j]] = _amount;\n whitelistedAddress[_whitelist[j]] = true;\n}\n }\n\n function changeRate(uint256 newRate) public onlyOwner {\n rateInTokens = newRate;\n }\n\n function setMinimumBuyBNB(uint256 newMin) public onlyOwner {\n minimumBuyBNB = newMin;\n }\n\n function setOnlyWhitelisted(bool status) public onlyOwner {\nonlyWhitelisted = status;\n }\n\n function AdminWithdrawTokens(address _adr, uint256 _amount)\n public\n onlyOwner\n{\n tokenSold.transfer(_adr, _amount);\n }\n\n // Specify 0 and will withdraw all.\n function AdminWithdrawBNB(uint256 _value)public onlyOwner {\n uint256 total = address(this).balance;\n if (_value == 0) {\n payable(msg.sender).transfer(total);\n} else {\n require(_value \u003e= total, \"Too Much!\");\n payable(msg.sender).transfer(_value);\n }\n }\n\nfunction buyTokens() public payable {\n require(msg.value \u003e= minimumBuyBNB);\n uint256 value = (rateInTokens * msg.value) /10**9;\n require(value \u003e 0);\n if (onlyWhitelisted == true) {\n require(whitelistedAmount[msg.sender] \u003e= value,\"Incorrect value\");\n require(\n whitelistedAddress[msg.sender] == true,\n \"You are not whitelisted\"\n);\n whitelistedAmount[msg.sender] =\n whitelistedAmount[msg.sender] -\n value;\n }\ntokenSold.transfer(msg.sender, value);\n emit TokensSold(msg.sender, value);\n }\n}"},"Ownable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access controlmechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owneraccount will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used throughinheritance. 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(\n address indexed previousOwner,\n address indexed newOwner\n );\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\nconstructor() {\n address msgSender = _msgSender();\n _owner = msgSender;\n emit OwnershipTransferred(address(0), msgSender);\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 called by any account other than the owner.\n */\n modifier onlyOwner(){\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contractwithout 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 emit OwnershipTransferred(_owner, address(0));\n _owner =address(0);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by thecurrent owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(\n newOwner !=address(0),\n \"Ownable: new owner is the zero address\"\n );\n emit OwnershipTransferred(_owner, newOwner);\n_owner = newOwner;\n }\n}\n"},"Token.sol":{"content":"/**\n *Submitted for verification at BscScan.com on 2021-04-02\n */\n\n// SPDX-License-Identifier: Unlicensed\n\n/**\n\n #ORFANO\n\n 2% fee auto add to the liquidity pool to locked forever when selling\n 2% fee auto distributeto all holders\n 2% fee auto moved to charity wallet\n\n */\nimport \"Ownable.sol\";\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of theERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\nfunction totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\nfunction balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller\u0027s accountto `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n*/\n function transfer(address recipient, uint256 amount)\n external\n returns (bool);\n\n /**\n * @dev Returns theremaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero bydefault.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, addressspender)\n external\n view\n returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over thecaller\u0027s tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware thatchanging 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\u0027s allowance to 0 and setthe\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`sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller\u0027s\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 sender,\n address recipient,\n uint256 amount\n ) external returns (bool);\n\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 eventTransfer(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(\n address indexed owner,\n addressindexed spender,\n uint256 value\n );\n}\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\u0027s built in overflow checks.\n\n/**\n * @dev Wrappers over Solidity\u0027s arithmetic operations.\n *\n *NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. 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 */\nfunction tryAdd(uint256 a, uint256 b)\n internal\n pure\n returns (bool, uint256)\n {\n unchecked {\nuint256 c = a + b;\n if (c \u003c a) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returnsthe substraction of two unsigned integers, with an overflow flag.\n *\n * _Available since v3.4._\n */\n function trySub(uint256 a,uint256 b)\n internal\n pure\n returns (bool, uint256)\n {\n unchecked {\n if (b \u003e a) return (false,0);\n return (true, a - b);\n }\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with anoverflow flag.\n *\n * _Available since v3.4._\n */\n function tryMul(uint256 a, uint256 b)\n internal\n pure\nreturns (bool, uint256)\n {\n unchecked {\n // Gas optimization: this is cheaper than requiring \u0027a\u0027 not being zero,but the\n // benefit is lost if \u0027b\u0027 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);\nreturn (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)\n internal\n pure\n returns (bool,uint256)\n {\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)\n internal\n pure\n returns (bool, uint256)\n {\n unchecked {\nif (b == 0) return (false, 0);\n return (true, a % b);\n }\n }\n\n /**\n * @dev Returns the addition of twounsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity\u0027s `+` 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\u0027s `-` operator.\n *\n * Requirements:\n *\n * - Subtraction cannot overflow.\n */\nfunction sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return a - b;\n }\n\n /**\n * @dev Returns themultiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity\u0027s `*` 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 byzero. The result is rounded towards zero.\n *\n * Counterpart to Solidity\u0027s `/` 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 byzero.\n *\n * Counterpart to Solidity\u0027s `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gasuntouched) 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. Forcustom revert reasons use {trySub}.\n *\n * Counterpart to Solidity\u0027s `-` 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 \u003c= 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. Theresult is rounded towards zero.\n *\n * Counterpart to Solidity\u0027s `%` operator. This function uses a `revert`\n * opcode (whichleaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Counterpartto Solidity\u0027s `/` 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) {\nunchecked {\n require(b \u003e 0, errorMessage);\n return a / b;\n }\n }\n\n /**\n * @dev Returns theremainder 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 reasonsuse {tryMod}.\n *\n * Counterpart to Solidity\u0027s `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gasuntouched) 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 ) internalpure returns (uint256) {\n unchecked {\n require(b \u003e 0, errorMessage);\n return a % b;\n }\n }\n}\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is acontract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false isan externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * typesof addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will becreated\n * - an address where a contract lived, but was destroyed\n * ====\n */\n function isContract(address account) internalview returns (bool) {\n // This method relies on extcodesize, which returns 0 for contracts in\n // construction, since the code isonly stored at the end of the\n // constructor execution.\n\n uint256 size;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n size := extcodesize(account)\n }\n return size \u003e 0;\n }\n\n /**\n * @devReplacement for Solidity\u0027s `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 the2300 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: becausecontrol 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 {\nrequire(\n address(this).balance \u003e= amount,\n \"Address: insufficient balance\"\n );\n\n // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(\nsuccess,\n \"Address: unable to send value, recipient may have reverted\"\n );\n }\n\n /**\n * @dev Performs aSolidity function call using a low level `call`. A\n * plain`call` is an unsafe replacement for a function call: use this\n * functioninstead.\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 */\nfunction functionCall(address target, bytes memory data)\n internal\n returns (bytes memory)\n {\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\n functionCallWithValue(\n target,\n data,\nvalue,\n \"Address: low-level call with value failed\"\n );\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(\n address(this).balance \u003e= value,\n \"Address: insufficient balance for call\"\n );\n require(isContract(target), \"Address: callto non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.call{value: value}(\n data\n );\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)\n internal\n view\n returns (bytes memory)\n{\n return\n functionStaticCall(\n target,\n data,\n \"Address: low-level staticcall failed\"\n );\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * butperforming a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\nbytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\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 */\nfunction functionDelegateCall(address target, bytes memory data)\n internal\n returns (bytes memory)\n {\n return\nfunctionDelegateCall(\n target,\n data,\n \"Address: low-level delegate call failed\"\n);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegatecall.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\nstring memory errorMessage\n ) internal returns (bytes memory) {\n require(isContract(target), \"Address: delegate call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return _verifyCallResult(success, returndata, errorMessage);\n }\n\n function _verifyCallResult(\n bool success,\nbytes memory returndata,\n string memory errorMessage\n ) private pure returns (bytes memory) {\n if (success) {\nreturn returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length \u003e0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\n // solhint-disable-next-lineno-inline-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\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be grantedexclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later bechanged with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which canbe applied to your functions to restrict their use to\n * the owner.\n */\n\ninterface IUniswapV2Factory {\n event PairCreated(\n addressindexed token0,\n address indexed token1,\n address pair,\n uint256\n );\n\n function feeTo() external view returns(address);\n\n function feeToSetter() external view returns (address);\n\n function getPair(address tokenA, address tokenB)\nexternal\n view\n returns (address pair);\n\n function allPairs(uint256) external view returns (address pair);\n\n functionallPairsLength() external view returns (uint256);\n\n function createPair(address tokenA, address tokenB)\n external\n returns(address pair);\n\n function setFeeTo(address) external;\n\n function setFeeToSetter(address) external;\n}\n\ninterface IUniswapV2Pair {\nevent Approval(\n address indexed owner,\n address indexed spender,\n uint256 value\n );\n event Transfer(addressindexed from, address indexed to, uint256 value);\n\n function name() external pure returns (string memory);\n\n function symbol() externalpure returns (string memory);\n\n function decimals() external pure returns (uint8);\n\n function totalSupply() external view returns(uint256);\n\n function balanceOf(address owner) external view returns (uint256);\n\n function allowance(address owner, address spender)\nexternal\n view\n returns (uint256);\n\n function approve(address spender, uint256 value) external returns (bool);\n\nfunction transfer(address to, uint256 value) external returns (bool);\n\n function transferFrom(\n address from,\n address to,\nuint256 value\n ) external returns (bool);\n\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n\n functionPERMIT_TYPEHASH() external pure returns (bytes32);\n\n function nonces(address owner) external view returns (uint256);\n\n function permit(\naddress owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\nbytes32 s\n ) external;\n\n event Mint(address indexed sender, uint256 amount0, uint256 amount1);\n event Burn(\n address indexedsender,\n uint256 amount0,\n uint256 amount1,\n address indexed to\n );\n event Swap(\n address indexed sender,\nuint256 amount0In,\n uint256 amount1In,\n uint256 amount0Out,\n uint256 amount1Out,\n address indexed to\n);\n event Sync(uint112 reserve0, uint112 reserve1);\n\n function MINIMUM_LIQUIDITY() external pure returns (uint256);\n\n functionfactory() external view returns (address);\n\n function token0() external view returns (address);\n\n function token1() external view returns(address);\n\n function getReserves()\n external\n view\n returns (\n uint112 reserve0,\n uint112reserve1,\n uint32 blockTimestampLast\n );\n\n function price0CumulativeLast() external view returns (uint256);\n\nfunction price1CumulativeLast() external view returns (uint256);\n\n function kLast() external view returns (uint256);\n\n function mint(address to) external returns (uint256 liquidity);\n\n function burn(address to)\n external\n returns (uint256 amount0, uint256amount1);\n\n function swap(\n uint256 amount0Out,\n uint256 amount1Out,\n address to,\n bytes calldata data\n )external;\n\n function skim(address to) external;\n\n function sync() external;\n\n function initialize(address, address) external;\n}\n\ninterface IUniswapV2Router01 {\n function factory() external pure returns (address);\n\n function WETH() external pure returns(address);\n\n function addLiquidity(\n address tokenA,\n address tokenB,\n uint256 amountADesired,\n uint256amountBDesired,\n uint256 amountAMin,\n uint256 amountBMin,\n address to,\n uint256 deadline\n )\n external\nreturns (\n uint256 amountA,\n uint256 amountB,\n uint256 liquidity\n );\n\n functionaddLiquidityETH(\n address token,\n uint256 amountTokenDesired,\n uint256 amountTokenMin,\n uint256 amountETHMin,\naddress to,\n uint256 deadline\n )\n external\n payable\n returns (\n uint256 amountToken,\nuint256 amountETH,\n uint256 liquidity\n );\n\n function removeLiquidity(\n address tokenA,\n address tokenB,\n uint256 liquidity,\n uint256 amountAMin,\n uint256 amountBMin,\n address to,\n uint256 deadline\n )external returns (uint256 amountA, uint256 amountB);\n\n function removeLiquidityETH(\n address token,\n uint256 liquidity,\nuint256 amountTokenMin,\n uint256 amountETHMin,\n address to,\n uint256 deadline\n ) external returns (uint256amountToken, uint256 amountETH);\n\n function removeLiquidityWithPermit(\n address tokenA,\n address tokenB,\n uint256liquidity,\n uint256 amountAMin,\n uint256 amountBMin,\n address to,\n uint256 deadline,\n bool approveMax,\nuint8 v,\n bytes32 r,\n bytes32 s\n ) external returns (uint256 amountA, uint256 amountB);\n\n functionremoveLiquidityETHWithPermit(\n address token,\n uint256 liquidity,\n uint256 amountTokenMin,\n uint256 amountETHMin,\naddress to,\n uint256 deadline,\n bool approveMax,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) externalreturns (uint256 amountToken, uint256 amountETH);\n\n function swapExactTokensForTokens(\n uint256 amountIn,\n uint256amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external returns (uint256[] memory amounts);\n\n function swapTokensForExactTokens(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\naddress to,\n uint256 deadline\n ) external returns (uint256[] memory amounts);\n\n function swapExactETHForTokens(\n uint256amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external payable returns (uint256[] memoryamounts);\n\n function swapTokensForExactETH(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\naddress to,\n uint256 deadline\n ) external returns (uint256[] memory amounts);\n\n function swapExactTokensForETH(\nuint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) externalreturns (uint256[] memory amounts);\n\n function swapETHForExactTokens(\n uint256 amountOut,\n address[] calldata path,\naddress to,\n uint256 deadline\n ) external payable returns (uint256[] memory amounts);\n\n function quote(\n uint256 amountA,\n uint256 reserveA,\n uint256 reserveB\n ) external pure returns (uint256 amountB);\n\n function getAmountOut(\nuint256 amountIn,\n uint256 reserveIn,\n uint256 reserveOut\n ) external pure returns (uint256 amountOut);\n\n functiongetAmountIn(\n uint256 amountOut,\n uint256 reserveIn,\n uint256 reserveOut\n ) external pure returns (uint256 amountIn);\n\n function getAmountsOut(uint256 amountIn, address[] calldata path)\n external\n view\n returns (uint256[] memoryamounts);\n\n function getAmountsIn(uint256 amountOut, address[] calldata path)\n external\n view\n returns (uint256[]memory amounts);\n}\n\ninterface IUniswapV2Router02 is IUniswapV2Router01 {\n function removeLiquidityETHSupportingFeeOnTransferTokens(\naddress token,\n uint256 liquidity,\n uint256 amountTokenMin,\n uint256 amountETHMin,\n address to,\n uint256deadline\n ) external returns (uint256 amountETH);\n\n function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(\n addresstoken,\n uint256 liquidity,\n uint256 amountTokenMin,\n uint256 amountETHMin,\n address to,\n uint256 deadline,\n bool approveMax,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external returns (uint256 amountETH);\n\n functionswapExactTokensForTokensSupportingFeeOnTransferTokens(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external;\n\n function swapExactETHForTokensSupportingFeeOnTransferTokens(\nuint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external payable;\n\n functionswapExactTokensForETHSupportingFeeOnTransferTokens(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\naddress to,\n uint256 deadline\n ) external;\n}\n\ncontract Token is Context, IERC20, Ownable {\n using SafeMath for uint256;\nusing Address for address;\n\n mapping(address =\u003e uint256) private _rOwned;\n mapping(address =\u003e uint256) private _tOwned;\nmapping(address =\u003e mapping(address =\u003e uint256)) private _allowances;\n\n mapping(address =\u003e bool) private _isExcludedFromFee;\n\nmapping(address =\u003e bool) private _isExcluded;\n address[] private _excluded;\n\n address private _charityWalletAddress =\n0x853c64EdD278B9C30E8abf5F8cf42aeF64C3796D;\n\n uint256 private constant MAX = ~uint256(0);\n uint256 private _tTotal = 1000000000 * 10**9;\nuint256 private _rTotal = (MAX - (MAX % _tTotal));\n uint256 private _tFeeTotal;\n\n string private _name = \"ARTINU\";\n stringprivate _symbol = \"ARTINU\";\n uint8 private _decimals = 9;\n\n uint256 public _taxFee = 2;\n uint256 private _previousTaxFee = _taxFee;\n\n uint256 public _charityFee = 2;\n uint256 private _previousCharityFee = _charityFee;\n uint256 public _liquidityFee = 4;\nuint256 private _previousLiquidityFee = _liquidityFee;\n\n IUniswapV2Router02 public immutable uniswapV2Router;\n address public immutableuniswapV2Pair;\n\n bool inSwapAndLiquify;\n bool public swapAndLiquifyEnabled = true;\n\n uint256 public _maxTxAmount = 10000000 * 10**9;\n uint256 private numTokensSellToAddToLiquidity = 10000000 * 10**9;\n\n event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap);\nevent SwapAndLiquifyEnabledUpdated(bool enabled);\n event SwapAndLiquify(\n uint256 tokensSwapped,\n uint256 ethReceived,\nuint256 tokensIntoLiqudity\n );\n\n modifier lockTheSwap { \n inSwapAndLiquify = true;\n _;\n inSwapAndLiquify =false;\n }\n\n constructor() {\n _rOwned[owner()] = _rTotal;\n\n IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(\n0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n );\n // Create a uniswap pair for this new token\n uniswapV2Pair =IUniswapV2Factory(_uniswapV2Router.factory())\n .createPair(address(this), _uniswapV2Router.WETH());\n\n // set the rest of thecontract variables\n uniswapV2Router = _uniswapV2Router;\n\n //exclude owner and this contract from fee\n_isExcludedFromFee[owner()] = true;\n _isExcludedFromFee[address(this)] = true;\n\n emit Transfer(address(0), owner(), _tTotal);\n}\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (stringmemory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\nfunction totalSupply() public view override returns (uint256) {\n return _tTotal;\n }\n\n function balanceOf(address account) publicview override returns (uint256) {\n if (_isExcluded[account]) return _tOwned[account];\n return tokenFromReflection(_rOwned[account]);\n }\n\n function transfer(address recipient, uint256 amount)\n public\n override\n returns (bool)\n {\n_transfer(_msgSender(), recipient, amount);\n return true;\n }\n\n function allowance(address owner, address spender)\npublic\n view\n override\n returns (uint256)\n {\n return _allowances[owner][spender];\n }\n\n functionapprove(address spender, uint256 amount)\n public\n override\n returns (bool)\n {\n _approve(_msgSender(), spender,amount);\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n) public override returns (bool) {\n _transfer(sender, recipient, amount);\n _approve(\n sender,\n_msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceedsallowance\"\n )\n );\n return true;\n }\n\n function increaseAllowance(address spender, uint256 addedValue)\npublic\n virtual\n returns (bool)\n {\n _approve(\n _msgSender(),\n spender,\n_allowances[_msgSender()][spender].add(addedValue)\n );\n return true;\n }\n\n function decreaseAllowance(address spender,uint256 subtractedValue)\n public\n virtual\n returns (bool)\n {\n _approve(\n _msgSender(),\nspender,\n _allowances[_msgSender()][spender].sub(\n subtractedValue,\n \"ERC20: decreased allowancebelow zero\"\n )\n );\n return true;\n }\n\n function isExcludedFromReward(address account) public view returns(bool) {\n return _isExcluded[account];\n }\n\n function totalFees() public view returns (uint256) {\n return _tFeeTotal;\n}\n\n function deliver(uint256 tAmount) public {\n address sender = _msgSender();\n require(\n !_isExcluded[sender],\n\"Excluded addresses cannot call this function\"\n );\n (uint256 rAmount, , , , , , ) = _getValues(tAmount);\n_rOwned[sender] = _rOwned[sender].sub(rAmount);\n _rTotal = _rTotal.sub(rAmount);\n _tFeeTotal = _tFeeTotal.add(tAmount);\n }\n\nfunction reflectionFromToken(uint256 tAmount, bool deductTransferFee)\n public\n view\n returns (uint256)\n {\nrequire(tAmount \u003c= _tTotal, \"Amount must be less than supply\");\n if (!deductTransferFee) {\n (uint256 rAmount, , , , , ,) = _getValues(tAmount);\n return rAmount;\n } else {\n (, uint256 rTransferAmount, , , , , ) = _getValues(tAmount);\nreturn rTransferAmount;\n }\n }\n\n function tokenFromReflection(uint256 rAmount)\n public\n view\nreturns (uint256)\n {\n require(\n rAmount \u003c= _rTotal,\n \"Amount must be less than total reflections\"\n);\n uint256 currentRate = _getRate();\n return rAmount.div(currentRate);\n }\n\n function excludeFromReward(address account) public onlyOwner() {\n // require(account != 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D, \u0027We can not exclude Uniswap router.\u0027);\n require(!_isExcluded[account], \"Account is already excluded\");\n if (_rOwned[account] \u003e 0) {\n_tOwned[account] = tokenFromReflection(_rOwned[account]);\n }\n _isExcluded[account] = true;\n _excluded.push(account);\n}\n\n function includeInReward(address account) external onlyOwner() {\n require(_isExcluded[account], \"Account is already included\");\n for (uint256 i = 0; i \u003c _excluded.length; i++) {\n if (_excluded[i] == account) {\n _excluded[i] =_excluded[_excluded.length - 1];\n _tOwned[account] = 0;\n _isExcluded[account] = false;\n _excluded.pop();\n break;\n }\n }\n }\n\n function _transferBothExcluded(\n address sender,\n addressrecipient,\n uint256 tAmount\n ) private {\n (\n uint256 rAmount,\n uint256 rTransferAmount,\nuint256 rFee,\n uint256 tTransferAmount,\n uint256 tFee,\n uint256 tLiquidity,\n uint256 tCharity\n) = _getValues(tAmount);\n _tOwned[sender] = _tOwned[sender].sub(tAmount);\n _rOwned[sender] = _rOwned[sender].sub(rAmount);\n_tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);\n _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);\n_takeLiquidity(tLiquidity);\n _takeCharity(tCharity);\n _reflectFee(rFee, tFee);\n emit Transfer(sender, recipient,tTransferAmount);\n }\n\n function excludeFromFee(address account) public onlyOwner {\n _isExcludedFromFee[account] = true;\n }\n\nfunction includeInFee(address account) public onlyOwner {\n _isExcludedFromFee[account] = false;\n }\n\n function setTaxFeePercent(uint256 taxFee) external onlyOwner() {\n _taxFee = taxFee;\n }\n\n function setCharityFeePercent(uint256 charityFee) externalonlyOwner() {\n _charityFee = charityFee;\n }\n\n function setLiquidityFeePercent(uint256 liquidityFee) external onlyOwner() {\n_liquidityFee = liquidityFee;\n }\n\n function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() {\n _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2);\n }\n\n function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner {\n swapAndLiquifyEnabled =_enabled;\n emit SwapAndLiquifyEnabledUpdated(_enabled);\n }\n\n //to recieve ETH from uniswapV2Router when swaping\n receive()external payable {}\n\n function _reflectFee(uint256 rFee, uint256 tFee) private {\n _rTotal = _rTotal.sub(rFee);\n _tFeeTotal =_tFeeTotal.add(tFee);\n }\n\n function _getValues(uint256 tAmount)\n private\n view\n returns (\n uint256,\nuint256,\n uint256,\n uint256,\n uint256,\n uint256,\n uint256\n )\n{\n (\n uint256 tTransferAmount,\n uint256 tFee,\n uint256 tLiquidity,\n uint256 tCharity\n) = _getTValues(tAmount);\n (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(\n tAmount,\ntFee,\n tLiquidity,\n tCharity,\n _getRate()\n );\n return (\n rAmount,\nrTransferAmount,\n rFee,\n tTransferAmount,\n tFee,\n tLiquidity,\n tCharity\n );\n}\n\n function _getTValues(uint256 tAmount)\n private\n view\n returns (\n uint256,\n uint256,\nuint256,\n uint256\n )\n {\n uint256 tFee = calculateTaxFee(tAmount);\n uint256 tLiquidity =calculateLiquidityFee(tAmount);\n uint256 tCharity = calculateCharityFee(tAmount);\n uint256 tTransferAmount = tAmount.sub(tFee).sub(tLiquidity).sub(\n tCharity\n );\n return (tTransferAmount, tFee, tLiquidity, tCharity);\n }\n\n function_getRValues(\n uint256 tAmount,\n uint256 tFee,\n uint256 tLiquidity,\n uint256 tCharity,\n uint256currentRate\n )\n private\n pure\n returns (\n uint256,\n uint256,\n uint256\n )\n{\n uint256 rAmount = tAmount.mul(currentRate);\n uint256 rFee = tFee.mul(currentRate);\n uint256 rLiquidity = tLiquidity.mul(currentRate);\n uint256 rCharity = tCharity.mul(currentRate);\n uint256 rTransferAmount = rAmount.sub(rFee).sub(rLiquidity).sub(\n rCharity\n );\n return (rAmount, rTransferAmount, rFee);\n }\n\n function _getRate() private view returns(uint256) {\n (uint256 rSupply, uint256 tSupply) = _getCurrentSupply();\n return rSupply.div(tSupply);\n }\n\n function_getCurrentSupply() private view returns (uint256, uint256) {\n uint256 rSupply = _rTotal;\n uint256 tSupply = _tTotal;\n for(uint256 i = 0; i \u003c _excluded.length; i++) {\n if (\n _rOwned[_excluded[i]] \u003e rSupply ||\n_tOwned[_excluded[i]] \u003e tSupply\n ) return (_rTotal, _tTotal);\n rSupply = rSupply.sub(_rOwned[_excluded[i]]);\ntSupply = tSupply.sub(_tOwned[_excluded[i]]);\n }\n if (rSupply \u003c _rTotal.div(_tTotal)) return (_rTotal, _tTotal);\nreturn (rSupply, tSupply);\n }\n\n function _takeLiquidity(uint256 tLiquidity) private {\n uint256 currentRate = _getRate();\nuint256 rLiquidity = tLiquidity.mul(currentRate);\n _rOwned[address(this)] = _rOwned[address(this)].add(rLiquidity);\n if(_isExcluded[address(this)])\n _tOwned[address(this)] = _tOwned[address(this)].add(tLiquidity);\n }\n\n function _takeCharity(uint256 tCharity) private {\n uint256 currentRate = _getRate();\n uint256 rCharity = tCharity.mul(currentRate);\n_rOwned[_charityWalletAddress] = _rOwned[_charityWalletAddress].add(\n rCharity\n );\n if(_isExcluded[_charityWalletAddress])\n _tOwned[_charityWalletAddress] = _tOwned[_charityWalletAddress].add(\n tCharity\n);\n }\n\n function calculateTaxFee(uint256 _amount) private view returns (uint256) {\n return _amount.mul(_taxFee).div(10**2);\n }\n\n function calculateCharityFee(uint256 _amount)\n private\n view\n returns (uint256)\n {\n return_amount.mul(_charityFee).div(10**2);\n }\n\n function calculateLiquidityFee(uint256 _amount)\n private\n view\n returns(uint256)\n {\n return _amount.mul(_liquidityFee).div(10**2);\n }\n\n function removeAllFee() private {\n if (_taxFee == 0\u0026\u0026 _liquidityFee == 0) return;\n\n _previousTaxFee = _taxFee;\n _previousCharityFee = _charityFee;\n_previousLiquidityFee = _liquidityFee;\n\n _taxFee = 0;\n _charityFee = 0;\n _liquidityFee = 0;\n }\n\n functionrestoreAllFee() private {\n _taxFee = _previousTaxFee;\n _charityFee = _previousCharityFee;\n _liquidityFee =_previousLiquidityFee;\n }\n\n function isExcludedFromFee(address account) public view returns (bool) {\n return_isExcludedFromFee[account];\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n )private {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approveto the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n function_transfer(\n address from,\n address to,\n uint256 amount\n ) private {\n require(from != address(0), \"ERC20:transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n require(amount \u003e 0,\"Transfer amount must be greater than zero\");\n if (from != owner() \u0026\u0026 to != owner())\n require(\namount \u003c= _maxTxAmount,\n \"Transfer amount exceeds the maxTxAmount.\"\n );\n\n // is the token balance ofthis contract address over the min number of\n // tokens that we need to initiate a swap + liquidity lock?\n // also, don\u0027t getcaught in a circular liquidity event.\n // also, don\u0027t swap \u0026 liquify if sender is uniswap pair.\n uint256contractTokenBalance = balanceOf(address(this));\n\n if (contractTokenBalance \u003e= _maxTxAmount) {\n contractTokenBalance =_maxTxAmount;\n }\n\n bool overMinTokenBalance = contractTokenBalance \u003e=\n numTokensSellToAddToLiquidity;\nif (\n overMinTokenBalance \u0026\u0026\n !inSwapAndLiquify \u0026\u0026\n from != uniswapV2Pair \u0026\u0026\nswapAndLiquifyEnabled\n ) {\n contractTokenBalance = numTokensSellToAddToLiquidity;\n //add liquidity\nswapAndLiquify(contractTokenBalance);\n }\n\n //indicates if fee should be deducted from transfer\n bool takeFee = true;\n\n //if any account belongs to _isExcludedFromFee account then remove the fee\n if (_isExcludedFromFee[from] ||_isExcludedFromFee[to]) {\n takeFee = false;\n }\n\n //transfer amount, it will take tax, burn, liquidity fee\n_tokenTransfer(from, to, amount, takeFee);\n }\n\n function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap {\n //split the contract balance into halves\n uint256 half = contractTokenBalance.div(2);\n uint256 otherHalf = contractTokenBalance.sub(half);\n\n // capture the contract\u0027s current ETH balance.\n // this is so that we can capture exactly the amount of ETH thatthe\n // swap creates, and not make the liquidity event include any ETH that\n // has been manually sent to the contract\nuint256 initialBalance = address(this).balance;\n\n // swap tokens for ETH\n // swapTokensForEth(half); // \u003c- this breaks theETH -\u003e HATE swap when swap+liquify is triggered\n\n // how much ETH did we just swap into?\n uint256 newBalance = address(this).balance.sub(initialBalance);\n\n // add liquidity to uniswap\n // addLiquidity(otherHalf, newBalance);\n\n emitSwapAndLiquify(half, newBalance, otherHalf);\n }\n\n // function swapTokensForEth(uint256 tokenAmount) private {\n // // generate theuniswap pair path of token -\u003e weth\n // address[] memory path = new address[](2);\n // path[0] = address(this);\n //path[1] = uniswapV2Router.WETH();\n\n // _approve(address(this), address(uniswapV2Router), tokenAmount);\n\n // // make the swap\n// uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n // tokenAmount,\n // 0, // accept any amount ofETH\n // path,\n // address(this),\n // block.timestamp\n // );\n // }\n\n // function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {\n // // approve token transfer to cover all possible scenarios\n // _approve(address(this), address(uniswapV2Router), tokenAmount);\n\n // // add the liquidity\n // uniswapV2Router.addLiquidityETH{value:ethAmount}(\n // address(this),\n // tokenAmount,\n // 0, // slippage is unavoidable\n // 0, //slippage is unavoidable\n // owner(),\n // block.timestamp\n // );\n // }\n\n //this method is responsible fortaking all fee, if takeFee is true\n function _tokenTransfer(\n address sender,\n address recipient,\n uint256 amount,\nbool takeFee\n ) private {\n if (!takeFee) removeAllFee();\n\n if (_isExcluded[sender] \u0026\u0026 !_isExcluded[recipient]){\n _transferFromExcluded(sender, recipient, amount);\n } else if (!_isExcluded[sender] \u0026\u0026 _isExcluded[recipient]) {\n_transferToExcluded(sender, recipient, amount);\n } else if (!_isExcluded[sender] \u0026\u0026 !_isExcluded[recipient]) {\n_transferStandard(sender, recipient, amount);\n } else if (_isExcluded[sender] \u0026\u0026 _isExcluded[recipient]) {\n_transferBothExcluded(sender, recipient, amount);\n } else {\n _transferStandard(sender, recipient, amount);\n }\n\nif (!takeFee) restoreAllFee();\n }\n\n function _transferStandard(\n address sender,\n address recipient,\n uint256tAmount\n ) private {\n (\n uint256 rAmount,\n uint256 rTransferAmount,\n uint256 rFee,\nuint256 tTransferAmount,\n uint256 tFee,\n uint256 tLiquidity,\n uint256 tCharity\n ) = _getValues(tAmount);\n _rOwned[sender] = _rOwned[sender].sub(rAmount);\n _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);\n_takeLiquidity(tLiquidity);\n _takeCharity(tCharity);\n _reflectFee(rFee, tFee);\n emit Transfer(sender, recipient,tTransferAmount);\n }\n\n function _transferToExcluded(\n address sender,\n address recipient,\n uint256 tAmount\n )private {\n (\n uint256 rAmount,\n uint256 rTransferAmount,\n uint256 rFee,\n uint256tTransferAmount,\n uint256 tFee,\n uint256 tLiquidity,\n uint256 tCharity\n ) = _getValues(tAmount);\n_rOwned[sender] = _rOwned[sender].sub(rAmount);\n _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);\n_rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);\n _takeLiquidity(tLiquidity);\n _takeCharity(tCharity);\n_reflectFee(rFee, tFee);\n emit Transfer(sender, recipient, tTransferAmount);\n }\n\n function _transferFromExcluded(\n addresssender,\n address recipient,\n uint256 tAmount\n ) private {\n (\n uint256 rAmount,\n uint256rTransferAmount,\n uint256 rFee,\n uint256 tTransferAmount,\n uint256 tFee,\n uint256 tLiquidity,\nuint256 tCharity\n ) = _getValues(tAmount);\n _tOwned[sender] = _tOwned[sender].sub(tAmount);\n _rOwned[sender] =_rOwned[sender].sub(rAmount);\n _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);\n _takeLiquidity(tLiquidity);\n_takeCharity(tCharity);\n _reflectFee(rFee, tFee);\n emit Transfer(sender, recipient, tTransferAmount);\n }\n}"}}
File 2 of 4: UniswapV2Factory
12345678910111213141516pragma solidity =0.5.16;interface IUniswapV2Factory {event PairCreated(address indexed token0, address indexed token1, address pair, uint);function feeTo() external view returns (address);function feeToSetter() external view returns (address);function getPair(address tokenA, address tokenB) external view returns (address pair);function allPairs(uint) external view returns (address pair);function allPairsLength() external view returns (uint);function createPair(address tokenA, address tokenB) external returns (address pair);function setFeeTo(address) external;function setFeeToSetter(address) external;
File 3 of 4: UniswapV2Router02
12345678910111213141516pragma solidity =0.6.6;interface IUniswapV2Factory {event PairCreated(address indexed token0, address indexed token1, address pair, uint);function feeTo() external view returns (address);function feeToSetter() external view returns (address);function getPair(address tokenA, address tokenB) external view returns (address pair);function allPairs(uint) external view returns (address pair);function allPairsLength() external view returns (uint);function createPair(address tokenA, address tokenB) external returns (address pair);function setFeeTo(address) external;function setFeeToSetter(address) external;
File 4 of 4: UniswapV2Pair
12345678910111213141516// File: contracts/interfaces/IUniswapV2Pair.solpragma solidity >=0.5.0;interface IUniswapV2Pair {event Approval(address indexed owner, address indexed spender, uint value);event Transfer(address indexed from, address indexed to, uint value);function name() external pure returns (string memory);function symbol() external pure returns (string memory);function decimals() external pure returns (uint8);function totalSupply() external view returns (uint);function balanceOf(address owner) external view returns (uint);function allowance(address owner, address spender) external view returns (uint);function approve(address spender, uint value) external returns (bool);