Token 10X: Africa's First Cryptocurrency Hub
seal exploder Token
SEAL EXPLODER (SLEX)
The second token in the WHEXcosystem is SLEX, or Seal Exploder. SLEX has an initial supply of 500 Quintillion tokens This token has tokenomics, divided as follows:
Transaction fee into or out of WHEXcosystem: 24%
8% of every transaction is sent to a charity/burn wallet....
About seal exploder
SEAL EXPLODER (SLEX)
The second token in the WHEXcosystem is SLEX, or Seal Exploder. SLEX has an initial supply of 500 Quintillion tokens This token has tokenomics, divided as follows:
Transaction fee into or out of WHEXcosystem: 24%
8% of every transaction is sent to a charity/burn wallet. Of that 8%, 58% is sold every two weeks and donated to a whale conservation charity. This sale is capped at 4.2% of liquidity in the SLEX/BNB pool. The remainder is sent to a burn wallet.
8% of every transaction is redistributed to the holders in the form of real-time reflections. The remaining 8% goes into SLEX/BNB liquidity to stabilize the price impact of transfers.
The second token in the WHEXcosystem is SLEX, or Seal Exploder. SLEX has an initial supply of 500 Quintillion tokens This token has tokenomics, divided as follows:
Transaction fee into or out of WHEXcosystem: 24%
8% of every transaction is sent to a charity/burn wallet. Of that 8%, 58% is sold every two weeks and donated to a whale conservation charity. This sale is capped at 4.2% of liquidity in the SLEX/BNB pool. The remainder is sent to a burn wallet.
8% of every transaction is redistributed to the holders in the form of real-time reflections. The remaining 8% goes into SLEX/BNB liquidity to stabilize the price impact of transfers.
101 total visits
Token information and links
Circulating Supply
500000000000000000000000000000
Token Contract (BSC Chain)
0X96ED9109B8E358BD2F9D75E7D14887CBC503BA39
Contract license: None
Launch Date
09/10/2021
KYC Information
No
Audit Information
None
Team Information
Team leader: None
Team leader contact: None
Contract source code
{"Address.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n */\n function isContract(address account) internal view returns(bool)\n {\n // This method relies on extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n \n uint256 size;\n assembly\n {\n size := extcodesize(account)\n }\n return size \u003e 0;\n }\n\n /**\n * @dev Replacement 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 the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal\n {\n require(address(this).balance \u003e= amount, \"Address: insufficient balance\");\n (bool success, ) = recipient.call\n {\n value: amount\n }(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns(bytes memory)\n {\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(address target, bytes memory data, string memory errorMessage) internal returns(bytes memory)\n {\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(address target, bytes memory data, uint256 value) internal returns(bytes memory)\n {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns(bytes memory)\n {\n require(address(this).balance \u003e= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n (bool success, bytes memory returndata) = target.call\n {\n value: value\n }(data);\n return _verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns(bytes memory)\n {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns(bytes memory)\n {\n require(isContract(target), \"Address: static call to non-contract\");\n (bool success, bytes memory returndata) = target.staticcall(data);\n return _verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns(bytes memory)\n {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns(bytes memory)\n {\n require(isContract(target), \"Address: delegate call to non-contract\");\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return _verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn\u0027t, either by bubbling the\n * revert reason using the provided one.\n *\n * _Available since v4.3._\n */\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory)\n {\n if (success)\n {\n return returndata;\n }\n else\n {\n // Look for revert reason and bubble it up if present\n if (returndata.length \u003e 0)\n {\n // The easiest way to bubble the revert reason is using memory via assembly\n assembly\n {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n }\n else\n {\n revert(errorMessage);\n }\n }\n }\n}\n"},"Context.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context\n{\n function _msgSender() internal view virtual returns (address)\n {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata)\n {\n return msg.data;\n }\n}\n"},"IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20\n{\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller\u0027s account to `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) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller\u0027s tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender\u0027s allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `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 event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n"},"IUniswapV2Factory.sol":{"content":"// SPDX-License-Identifier: GPL-3.0\n\npragma solidity \u003e=0.5.0;\n\ninterface IUniswapV2Factory\n{\n event PairCreated(address indexed token0, address indexed token1, address pair, uint);\n\n function feeTo() external view returns (address);\n function feeToSetter() external view returns (address);\n\n function getPair(address tokenA, address tokenB) external view returns (address pair);\n function allPairs(uint) external view returns (address pair);\n function allPairsLength() external view returns (uint);\n\n function createPair(address tokenA, address tokenB) external returns (address pair);\n\n function setFeeTo(address) external;\n function setFeeToSetter(address) external;\n}\n"},"IUniswapV2Pair.sol":{"content":"// SPDX-License-Identifier: GPL-3.0\n\npragma solidity \u003e=0.5.0;\n\ninterface IUniswapV2Pair\n{\n event Approval(address indexed owner, address indexed spender, uint value);\n event Transfer(address indexed from, address indexed to, uint value);\n\n function name() external pure returns (string memory);\n function symbol() external pure returns (string memory);\n function decimals() external pure returns (uint8);\n function totalSupply() external view returns (uint);\n function balanceOf(address owner) external view returns (uint);\n function allowance(address owner, address spender) external view returns (uint);\n\n function approve(address spender, uint value) external returns (bool);\n function transfer(address to, uint value) external returns (bool);\n function transferFrom(address from, address to, uint value) external returns (bool);\n\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n function PERMIT_TYPEHASH() external pure returns (bytes32);\n function nonces(address owner) external view returns (uint);\n\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;\n\n event Mint(address indexed sender, uint amount0, uint amount1);\n event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);\n event Swap(\n address indexed sender,\n uint amount0In,\n uint amount1In,\n uint amount0Out,\n uint amount1Out,\n address indexed to\n );\n event Sync(uint112 reserve0, uint112 reserve1);\n\n function MINIMUM_LIQUIDITY() external pure returns (uint);\n function factory() external view returns (address);\n function token0() external view returns (address);\n function token1() external view returns (address);\n function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\n function price0CumulativeLast() external view returns (uint);\n function price1CumulativeLast() external view returns (uint);\n function kLast() external view returns (uint);\n\n function mint(address to) external returns (uint liquidity);\n function burn(address to) external returns (uint amount0, uint amount1);\n function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;\n function skim(address to) external;\n function sync() external;\n\n function initialize(address, address) external;\n}\n"},"IUniswapV2Router01.sol":{"content":"// SPDX-License-Identifier: GPL-3.0\n\npragma solidity \u003e=0.6.2;\n\ninterface IUniswapV2Router01\n{\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 uint amountADesired,\n uint amountBDesired,\n uint amountAMin,\n uint amountBMin,\n address to,\n uint deadline\n ) external returns(uint amountA, uint amountB, uint liquidity);\n\n function addLiquidityETH(\n address token,\n uint amountTokenDesired,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline\n ) external payable returns(uint amountToken, uint amountETH, uint liquidity);\n\n function removeLiquidity(\n address tokenA,\n address tokenB,\n uint liquidity,\n uint amountAMin,\n uint amountBMin,\n address to,\n uint deadline\n ) external returns(uint amountA, uint amountB);\n\n function removeLiquidityETH(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline\n ) external returns(uint amountToken, uint amountETH);\n\n function removeLiquidityWithPermit(\n address tokenA,\n address tokenB,\n uint liquidity,\n uint amountAMin,\n uint amountBMin,\n address to,\n uint deadline,\n bool approveMax, uint8 v, bytes32 r, bytes32 s\n ) external returns(uint amountA, uint amountB);\n\n function removeLiquidityETHWithPermit(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline,\n bool approveMax, uint8 v, bytes32 r, bytes32 s\n ) external returns(uint amountToken, uint amountETH);\n\n function swapExactTokensForTokens(\n uint amountIn,\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external returns(uint[] memory amounts);\n\n function swapTokensForExactTokens(\n uint amountOut,\n uint amountInMax,\n address[] calldata path,\n address to,\n uint deadline\n ) external returns(uint[] memory amounts);\n\n function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns(uint[] memory amounts);\n function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns(uint[] memory amounts);\n function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns(uint[] memory amounts);\n function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns(uint[] memory amounts);\n\n function quote(uint amountA, uint reserveA, uint reserveB) external pure returns(uint amountB);\n\n function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns(uint amountOut);\n function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns(uint amountIn);\n function getAmountsOut(uint amountIn, address[] calldata path) external view returns(uint[] memory amounts);\n function getAmountsIn(uint amountOut, address[] calldata path) external view returns(uint[] memory amounts);\n}\n"},"IUniswapV2Router02.sol":{"content":"// SPDX-License-Identifier: GPL-3.0\n\npragma solidity \u003e=0.6.2;\n\nimport \u0027./IUniswapV2Router01.sol\u0027;\n\ninterface IUniswapV2Router02 is IUniswapV2Router01\n{\n function removeLiquidityETHSupportingFeeOnTransferTokens(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline\n ) external returns(uint amountETH);\n\n function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline,\n bool approveMax, uint8 v, bytes32 r, bytes32 s\n ) external returns(uint amountETH);\n\n function swapExactTokensForTokensSupportingFeeOnTransferTokens(\n uint amountIn,\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external;\n\n function swapExactETHForTokensSupportingFeeOnTransferTokens(\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external payable;\n\n function swapExactTokensForETHSupportingFeeOnTransferTokens(\n uint amountIn,\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external;\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 control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context\n{\n address public _owner;\n address private _previousOwner;\n uint256 public _lockTime;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns(address)\n {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner()\n {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner\n {\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 the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner\n {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n"},"SafeERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"./Address.sol\";\n\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20\n{\n using Address for address;\n\n function safeTransfer(\n IERC20 token,\n address to,\n uint256 value\n ) internal\n {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(\n IERC20 token,\n address from,\n address to,\n uint256 value\n ) internal\n {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(\n IERC20 token,\n address spender,\n uint256 value\n ) internal\n {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // \u0027safeIncreaseAllowance\u0027 and \u0027safeDecreaseAllowance\u0027\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n ) internal\n {\n uint256 newAllowance = token.allowance(address(this), spender) value;\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n ) internal\n {\n unchecked\n {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance \u003e= value, \"SafeERC20: decreased allowance below zero\");\n uint256 newAllowance = oldAllowance - value;\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private\n {\n // We need to perform a low level call here, to bypass Solidity\u0027s return data size checking mechanism, since\n // we\u0027re implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n if (returndata.length \u003e 0)\n {\n // Return data is optional\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n"},"SafeMath.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n// CAUTION\n// This version of SafeMath should only be used with Solidity 0.8 or later,\n// because it relies on the compiler\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 /**\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\n *\n * _Available since v3.4._\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns(bool, uint256)\n {\n unchecked\n {\n uint256 c = a b;\n if (c \u003c a) return (false, 0);\n return (true, c);\n }\n }\n \n /**\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\n *\n * _Available since v3.4._\n */\n function trySub(uint256 a, uint256 b) internal pure returns(bool, uint256)\n {\n unchecked\n {\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 an overflow flag.\n *\n * _Available since v3.4._\n */\n function tryMul(uint256 a, uint256 b) internal pure returns(bool, uint256)\n {\n unchecked\n {\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 \n if (a == 0) return (true, 0);\n uint256 c = a * b;\n if (c / a != b) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\n *\n * _Available since v3.4._\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns(bool, uint256)\n {\n unchecked\n {\n if (b == 0) return (false, 0);\n return (true, a / b);\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n *\n * _Available since v3.4._\n */\n function tryMod(uint256 a, uint256 b) internal pure returns(bool, uint256)\n {\n unchecked\n {\n if (b == 0) return (false, 0);\n return (true, a % b);\n }\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity\u0027s ` ` operator.\n *\n * Requirements:\n *\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns(uint256)\n {\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 */\n function sub(uint256 a, uint256 b) internal pure returns(uint256)\n {\n return a - b;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity\u0027s `*` operator.\n *\n * Requirements:\n *\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns(uint256)\n {\n return a * b;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers, reverting on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity\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 {\n return a / b;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * reverting when dividing by zero.\n *\n * Counterpart to Solidity\u0027s `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns(uint256)\n {\n return a % b;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {trySub}.\n *\n * Counterpart to Solidity\u0027s `-` operator.\n *\n * Requirements:\n *\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns(uint256)\n {\n unchecked\n {\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. The result is rounded towards zero.\n *\n * Counterpart to 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(uint256 a, uint256 b, string memory errorMessage) internal pure returns(uint256)\n {\n unchecked\n {\n require(b \u003e 0, errorMessage);\n return a / b;\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * reverting with custom message when dividing by zero.\n *\n * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {tryMod}.\n *\n * Counterpart to Solidity\u0027s `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns(uint256)\n {\n unchecked\n {\n require(b \u003e 0, errorMessage);\n return a % b;\n }\n }\n}\n"},"WHEXcosystemToken.sol":{"content":"// SPDX-License-Identifier: Unlicensed\r\n\r\n/*\r\n\r\n _____ _ __ _ _ \r\n | __ \\ | | / _| | | | | \r\n | |__) |_ _ _ __| |_ ___ | |_ | |_| |__ ___ \r\n | ___/ _` | \u0027__| __| / _ \\| _| | __| \u0027_ \\ / _ \\\r\n | | | (_| | | | |_ | (_) | | | |_| | | | __/\r\n |_| \\__,_|_| \\__| \\___/|_| \\__|_| |_|\\___|\r\n\r\n __ ___ _ ________ __ _ \r\n \\ \\ / / | | | ____\\ \\ / / | | \r\n \\ \\ /\\ / /| |__| | |__ \\ V / ___ ___ ___ _ _ ___| |_ ___ _ __ ___ \r\n \\ \\/ \\/ / | __ | __| \u003e \u003c / __/ _ \\/ __| | | / __| __/ _ \\ \u0027_ ` _ \\ \r\n \\ /\\ / | | | | |____ / . \\ (_| (_) \\__ \\ |_| \\__ \\ || __/ | | | | |\r\n \\/ \\/ |_| |_|______/_/ \\_\\___\\___/|___/\\__, |___/\\__\\___|_| |_| |_|\r\n __/ | \r\n |___/ \r\n\r\n*/\r\n\r\npragma solidity ^0.8.4;\r\n\r\n// Third-party interface imports.\r\nimport \u0027./IERC20.sol\u0027;\r\nimport \u0027./IUniswapV2Factory.sol\u0027;\r\nimport \u0027./IUniswapV2Pair.sol\u0027;\r\nimport \u0027./IUniswapV2Router01.sol\u0027;\r\nimport \u0027./IUniswapV2Router02.sol\u0027;\r\n\r\n// Third-party library imports.\r\nimport \u0027./Address.sol\u0027;\r\nimport \u0027./Context.sol\u0027;\r\nimport \u0027./Ownable.sol\u0027;\r\nimport \u0027./SafeERC20.sol\u0027;\r\nimport \u0027./SafeMath.sol\u0027;\r\n\r\n\r\ncontract WHEXcosystemToken is Context, IERC20, Ownable\r\n{\r\n using SafeMath for uint256;\r\n using SafeERC20 for IERC20;\r\n using Address for address;\r\n\r\n mapping(address =\u003e uint256) private _rOwned;\r\n mapping(address =\u003e uint256) private _tOwned;\r\n mapping(address =\u003e mapping(address =\u003e uint256)) private _allowances;\r\n mapping(address =\u003e bool) private _isExcludedFromFee;\r\n mapping(address =\u003e bool) private _isExcluded;\r\n \r\n address[] private _excluded;\r\n address public _devWalletAddress; // TODO - team wallet here\r\n \r\n uint256 private constant MAX = ~uint256(0);\r\n uint256 private _tTotal;\r\n uint256 private _rTotal;\r\n uint256 private _tFeeTotal;\r\n \r\n string private _name;\r\n string private _symbol;\r\n \r\n uint256 private _decimals;\r\n uint256 public _taxFee;\r\n uint256 private _previousTaxFee;\r\n uint256 public _devFee;\r\n uint256 private _previousDevFee;\r\n uint256 public _liquidityFee;\r\n uint256 private _previousLiquidityFee;\r\n \r\n IUniswapV2Router02 public uniswapV2Router;\r\n \r\n address public uniswapV2Pair;\r\n \r\n bool inSwapAndLiquify;\r\n bool public swapAndLiquifyEnabled = true;\r\n \r\n uint256 public _maxTxAmount;\r\n uint256 public numTokensSellToAddToLiquidity;\r\n \r\n event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap);\r\n event SwapAndLiquifyEnabledUpdated(bool enabled);\r\n event SwapAndLiquify(\r\n uint256 tokensSwapped,\r\n uint256 ethReceived,\r\n uint256 tokensIntoLiqudity\r\n );\r\n\r\n modifier lockTheSwap\r\n {\r\n inSwapAndLiquify = true;\r\n _;\r\n inSwapAndLiquify = false;\r\n }\r\n\r\n constructor(\r\n string memory _NAME,\r\n string memory _SYMBOL,\r\n uint256 _DECIMALS,\r\n uint256 _supply,\r\n uint256 _txFee,\r\n uint256 _lpFee,\r\n uint256 _DexFee,\r\n address routerAddress,\r\n address feeaddress,\r\n address tokenOwner,\r\n address[] memory taxExempt\r\n ) payable\r\n {\r\n _name = _NAME;\r\n _symbol = _SYMBOL;\r\n _decimals = _DECIMALS;\r\n _tTotal = _supply * 10 ** _decimals;\r\n _rTotal = (MAX - (MAX % _tTotal));\r\n _taxFee = _txFee;\r\n _liquidityFee = _lpFee;\r\n _previousTaxFee = _txFee;\r\n\r\n _devFee = _DexFee;\r\n _previousDevFee = _devFee;\r\n _previousLiquidityFee = _lpFee;\r\n _maxTxAmount = (_tTotal * 5 / 1000) * 10 ** _decimals;\r\n numTokensSellToAddToLiquidity = (_tTotal * 5 / 10000) * 10 ** _decimals;\r\n _devWalletAddress = feeaddress;\r\n\r\n _rOwned[tokenOwner] = _rTotal;\r\n\r\n IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(routerAddress);\r\n \r\n // Create a uniswap pair for this new token\r\n uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())\r\n .createPair(address(this), _uniswapV2Router.WETH());\r\n\r\n // set the rest of the contract variables\r\n uniswapV2Router = _uniswapV2Router;\r\n\r\n // exclude owner and this contract from fee\r\n _isExcludedFromFee[tokenOwner] = true;\r\n _isExcludedFromFee[address(this)] = true;\r\n \r\n for (uint256 i = 0; i \u003c taxExempt.length; i )\r\n {\r\n _isExcludedFromFee[taxExempt[i]] = true;\r\n _isExcludedFromFee[taxExempt[i]] = true;\r\n _isExcludedFromFee[taxExempt[i]] = true;\r\n _isExcludedFromFee[taxExempt[i]] = true;\r\n _isExcludedFromFee[taxExempt[i]] = true;\r\n }\r\n\r\n _owner = tokenOwner;\r\n emit Transfer(address(0), tokenOwner, _tTotal);\r\n }\r\n\r\n function name() public view returns(string memory)\r\n {\r\n return _name;\r\n }\r\n\r\n function symbol() public view returns(string memory)\r\n {\r\n return _symbol;\r\n }\r\n\r\n function decimals() public view returns(uint256)\r\n {\r\n return _decimals;\r\n }\r\n\r\n function totalSupply() public view override returns(uint256)\r\n {\r\n return _tTotal;\r\n }\r\n\r\n function balanceOf(address account) public view override returns(uint256)\r\n {\r\n if (_isExcluded[account]) return _tOwned[account];\r\n return tokenFromReflection(_rOwned[account]);\r\n }\r\n\r\n function transfer(address recipient, uint256 amount) public override returns(bool)\r\n {\r\n _transfer(_msgSender(), recipient, amount);\r\n return true;\r\n }\r\n\r\n function allowance(address owner, address spender) public view override returns(uint256)\r\n {\r\n return _allowances[owner][spender];\r\n }\r\n\r\n function approve(address spender, uint256 amount) public override returns(bool)\r\n {\r\n _approve(_msgSender(), spender, amount);\r\n return true;\r\n }\r\n\r\n function transferFrom(address sender, address recipient, uint256 amount) public override returns(bool)\r\n {\r\n _transfer(sender, recipient, amount);\r\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \"ERC20: transfer amount exceeds allowance\"));\r\n return true;\r\n }\r\n\r\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns(bool)\r\n {\r\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\r\n return true;\r\n }\r\n\r\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns(bool)\r\n {\r\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \"ERC20: decreased allowance below zero\"));\r\n return true;\r\n }\r\n\r\n function isExcludedFromReward(address account) public view returns(bool)\r\n {\r\n return _isExcluded[account];\r\n }\r\n\r\n function totalFees() public view returns(uint256)\r\n {\r\n return _tFeeTotal;\r\n }\r\n\r\n function deliver(uint256 tAmount) public\r\n {\r\n address sender = _msgSender();\r\n require(!_isExcluded[sender], \"Excluded addresses cannot call this function\");\r\n (uint256 rAmount, , , , , , ) = _getValues(tAmount);\r\n _rOwned[sender] = _rOwned[sender].sub(rAmount);\r\n _rTotal = _rTotal.sub(rAmount);\r\n _tFeeTotal = _tFeeTotal.add(tAmount);\r\n }\r\n\r\n function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256)\r\n {\r\n require(tAmount \u003c= _tTotal, \"Amount must be less than supply\");\r\n if (!deductTransferFee)\r\n {\r\n (uint256 rAmount, , , , , , ) = _getValues(tAmount);\r\n return rAmount;\r\n }\r\n else\r\n {\r\n (, uint256 rTransferAmount, , , , , ) = _getValues(tAmount);\r\n return rTransferAmount;\r\n }\r\n }\r\n\r\n function tokenFromReflection(uint256 rAmount) public view returns(uint256)\r\n {\r\n require(rAmount \u003c= _rTotal, \"Amount must be less than total reflections\");\r\n uint256 currentRate = _getRate();\r\n return rAmount.div(currentRate);\r\n }\r\n\r\n function excludeFromReward(address account) public onlyOwner()\r\n {\r\n require(!_isExcluded[account], \"Account is already excluded\");\r\n if (_rOwned[account] \u003e 0)\r\n {\r\n _tOwned[account] = tokenFromReflection(_rOwned[account]);\r\n }\r\n _isExcluded[account] = true;\r\n _excluded.push(account);\r\n }\r\n\r\n function includeInReward(address account) external onlyOwner()\r\n {\r\n require(_isExcluded[account], \"Account is already included\");\r\n for (uint256 i = 0; i \u003c _excluded.length; i )\r\n {\r\n if (_excluded[i] == account)\r\n {\r\n _excluded[i] = _excluded[_excluded.length - 1];\r\n _tOwned[account] = 0;\r\n _isExcluded[account] = false;\r\n _excluded.pop();\r\n break;\r\n }\r\n }\r\n }\r\n\r\n function _transferBothExcluded(address sender, address recipient, uint256 tAmount) private\r\n {\r\n (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity, uint256 tDev) = _getValues(tAmount);\r\n _tOwned[sender] = _tOwned[sender].sub(tAmount);\r\n _rOwned[sender] = _rOwned[sender].sub(rAmount);\r\n _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);\r\n _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);\r\n _takeLiquidity(tLiquidity);\r\n _takeDev(tDev);\r\n _reflectFee(rFee, tFee);\r\n emit Transfer(sender, recipient, tTransferAmount);\r\n }\r\n\r\n function excludeFromFee(address account) public onlyOwner\r\n {\r\n _isExcludedFromFee[account] = true;\r\n }\r\n\r\n function includeInFee(address account) public onlyOwner\r\n {\r\n _isExcludedFromFee[account] = false;\r\n }\r\n\r\n function setTaxFeePercent(uint256 taxFee) external onlyOwner()\r\n {\r\n _taxFee = taxFee;\r\n }\r\n\r\n function setDevFeePercent(uint256 devFee) external onlyOwner()\r\n {\r\n _devFee = devFee;\r\n }\r\n\r\n function setLiquidityFeePercent(uint256 liquidityFee) external onlyOwner()\r\n {\r\n _liquidityFee = liquidityFee;\r\n }\r\n\r\n function setMaxTxPercent(uint256 maxTxPercent) public onlyOwner\r\n {\r\n _maxTxAmount = maxTxPercent * 10 ** _decimals;\r\n }\r\n\r\n function setDevWalletAddress(address _addr) public onlyOwner\r\n {\r\n _devWalletAddress = _addr;\r\n }\r\n\r\n function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner\r\n {\r\n swapAndLiquifyEnabled = _enabled;\r\n emit SwapAndLiquifyEnabledUpdated(_enabled);\r\n }\r\n\r\n // to recieve ETH from uniswapV2Router when swaping\r\n receive() external payable\r\n {}\r\n\r\n function _reflectFee(uint256 rFee, uint256 tFee) private\r\n {\r\n _rTotal = _rTotal.sub(rFee);\r\n _tFeeTotal = _tFeeTotal.add(tFee);\r\n }\r\n\r\n function _getValues(uint256 tAmount) private view returns(uint256, uint256, uint256, uint256, uint256, uint256, uint256)\r\n {\r\n (uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity, uint256 tDev) = _getTValues(tAmount);\r\n (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tLiquidity, tDev, _getRate());\r\n return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tLiquidity, tDev);\r\n }\r\n\r\n function _getTValues(uint256 tAmount) private view returns(uint256, uint256, uint256, uint256)\r\n {\r\n uint256 tFee = calculateTaxFee(tAmount);\r\n uint256 tLiquidity = calculateLiquidityFee(tAmount);\r\n uint256 tDev = calculateDevFee(tAmount);\r\n uint256 tTransferAmount = tAmount.sub(tFee).sub(tLiquidity).sub(tDev);\r\n return (tTransferAmount, tFee, tLiquidity, tDev);\r\n }\r\n\r\n function _getRValues(uint256 tAmount, uint256 tFee, uint256 tLiquidity, uint256 tDev, uint256 currentRate) private pure returns(uint256, uint256, uint256)\r\n {\r\n uint256 rAmount = tAmount.mul(currentRate);\r\n uint256 rFee = tFee.mul(currentRate);\r\n uint256 rLiquidity = tLiquidity.mul(currentRate);\r\n uint256 rDev = tDev.mul(currentRate);\r\n uint256 rTransferAmount = rAmount.sub(rFee).sub(rLiquidity).sub(rDev);\r\n return (rAmount, rTransferAmount, rFee);\r\n }\r\n\r\n function _getRate() private view returns(uint256)\r\n {\r\n (uint256 rSupply, uint256 tSupply) = _getCurrentSupply();\r\n return rSupply.div(tSupply);\r\n }\r\n\r\n function _getCurrentSupply() private view returns(uint256, uint256)\r\n {\r\n uint256 rSupply = _rTotal;\r\n uint256 tSupply = _tTotal;\r\n for (uint256 i = 0; i \u003c _excluded.length; i )\r\n {\r\n if (_rOwned[_excluded[i]] \u003e rSupply || _tOwned[_excluded[i]] \u003e tSupply) return (_rTotal, _tTotal);\r\n rSupply = rSupply.sub(_rOwned[_excluded[i]]);\r\n tSupply = tSupply.sub(_tOwned[_excluded[i]]);\r\n }\r\n if (rSupply \u003c _rTotal.div(_tTotal)) return (_rTotal, _tTotal);\r\n return (rSupply, tSupply);\r\n }\r\n\r\n function _takeLiquidity(uint256 tLiquidity) private\r\n {\r\n uint256 currentRate = _getRate();\r\n uint256 rLiquidity = tLiquidity.mul(currentRate);\r\n _rOwned[address(this)] = _rOwned[address(this)].add(rLiquidity);\r\n if (_isExcluded[address(this)])\r\n _tOwned[address(this)] = _tOwned[address(this)].add(tLiquidity);\r\n }\r\n\r\n function _takeDev(uint256 tDev) private\r\n {\r\n uint256 currentRate = _getRate();\r\n uint256 rDev = tDev.mul(currentRate);\r\n _rOwned[_devWalletAddress] = _rOwned[_devWalletAddress].add(rDev);\r\n if (_isExcluded[_devWalletAddress])\r\n _tOwned[_devWalletAddress] = _tOwned[_devWalletAddress].add(tDev);\r\n }\r\n\r\n function calculateTaxFee(uint256 _amount) private view returns(uint256)\r\n {\r\n return _amount.mul(_taxFee).div(\r\n 10 ** 2\r\n );\r\n }\r\n\r\n function calculateDevFee(uint256 _amount) private view returns(uint256)\r\n {\r\n return _amount.mul(_devFee).div(\r\n 10 ** 2\r\n );\r\n }\r\n\r\n function calculateLiquidityFee(uint256 _amount) private view returns(uint256)\r\n {\r\n return _amount.mul(_liquidityFee).div(\r\n 10 ** 2\r\n );\r\n }\r\n\r\n function removeAllFee() private\r\n {\r\n _previousTaxFee = _taxFee;\r\n _previousDevFee = _devFee;\r\n _previousLiquidityFee = _liquidityFee;\r\n\r\n _taxFee = 0;\r\n _devFee = 0;\r\n _liquidityFee = 0;\r\n }\r\n\r\n function restoreAllFee() private\r\n {\r\n _taxFee = _previousTaxFee;\r\n _devFee = _previousDevFee;\r\n _liquidityFee = _previousLiquidityFee;\r\n }\r\n\r\n function isExcludedFromFee(address account) public view returns(bool)\r\n {\r\n return _isExcludedFromFee[account];\r\n }\r\n\r\n function _approve(address owner, address spender, uint256 amount) private\r\n {\r\n require(owner != address(0), \"ERC20: approve from the zero address\");\r\n require(spender != address(0), \"ERC20: approve to the zero address\");\r\n\r\n _allowances[owner][spender] = amount;\r\n emit Approval(owner, spender, amount);\r\n }\r\n\r\n function _transfer(\r\n address from,\r\n address to,\r\n uint256 amount\r\n ) private\r\n {\r\n require(from != address(0), \"ERC20: transfer from the zero address\");\r\n require(to != address(0), \"ERC20: transfer to the zero address\");\r\n require(amount \u003e 0, \"Transfer amount must be greater than zero\");\r\n if (from != owner() \u0026\u0026 to != owner())\r\n require(amount \u003c= _maxTxAmount, \"Transfer amount exceeds the maxTxAmount.\");\r\n\r\n uint256 contractTokenBalance = balanceOf(address(this));\r\n\r\n if (contractTokenBalance \u003e= _maxTxAmount)\r\n {\r\n contractTokenBalance = _maxTxAmount;\r\n }\r\n\r\n bool overMinTokenBalance = contractTokenBalance \u003e= numTokensSellToAddToLiquidity;\r\n if (\r\n overMinTokenBalance \u0026\u0026\r\n !inSwapAndLiquify \u0026\u0026\r\n from != uniswapV2Pair \u0026\u0026\r\n swapAndLiquifyEnabled\r\n )\r\n {\r\n contractTokenBalance = numTokensSellToAddToLiquidity;\r\n swapAndLiquify(contractTokenBalance);\r\n }\r\n\r\n bool takeFee = true;\r\n if (_isExcludedFromFee[from] || _isExcludedFromFee[to])\r\n {\r\n takeFee = false;\r\n }\r\n\r\n _tokenTransfer(from, to, amount, takeFee);\r\n }\r\n\r\n function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap\r\n {\r\n uint256 half = contractTokenBalance.div(2);\r\n uint256 otherHalf = contractTokenBalance.sub(half);\r\n uint256 initialBalance = address(this).balance;\r\n swapTokensForEth(half);\r\n uint256 newBalance = address(this).balance.sub(initialBalance);\r\n addLiquidity(otherHalf, newBalance);\r\n emit SwapAndLiquify(half, newBalance, otherHalf);\r\n }\r\n\r\n function swapTokensForEth(uint256 tokenAmount) private\r\n {\r\n address[] memory path = new address[](2);\r\n path[0] = address(this);\r\n path[1] = uniswapV2Router.WETH();\r\n _approve(address(this), address(uniswapV2Router), tokenAmount);\r\n uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\r\n tokenAmount,\r\n 0, // accept any amount of ETH\r\n path,\r\n address(this),\r\n block.timestamp\r\n );\r\n }\r\n\r\n function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private\r\n {\r\n _approve(address(this), address(uniswapV2Router), tokenAmount);\r\n uniswapV2Router.addLiquidityETH\r\n {\r\n value: ethAmount\r\n }(\r\n address(this),\r\n tokenAmount,\r\n 0, // slippage is unavoidable\r\n 0, // slippage is unavoidable\r\n owner(),\r\n block.timestamp\r\n );\r\n }\r\n\r\n function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private\r\n {\r\n if (!takeFee)\r\n removeAllFee();\r\n\r\n if (_isExcluded[sender] \u0026\u0026 !_isExcluded[recipient])\r\n {\r\n _transferFromExcluded(sender, recipient, amount);\r\n }\r\n else if (!_isExcluded[sender] \u0026\u0026 _isExcluded[recipient])\r\n {\r\n _transferToExcluded(sender, recipient, amount);\r\n }\r\n else if (!_isExcluded[sender] \u0026\u0026 !_isExcluded[recipient])\r\n {\r\n _transferStandard(sender, recipient, amount);\r\n }\r\n else if (_isExcluded[sender] \u0026\u0026 _isExcluded[recipient])\r\n {\r\n _transferBothExcluded(sender, recipient, amount);\r\n }\r\n else\r\n {\r\n _transferStandard(sender, recipient, amount);\r\n }\r\n\r\n if (!takeFee)\r\n restoreAllFee();\r\n }\r\n\r\n function _transferStandard(address sender, address recipient, uint256 tAmount) private\r\n {\r\n (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity, uint256 tDev) = _getValues(tAmount);\r\n _rOwned[sender] = _rOwned[sender].sub(rAmount);\r\n _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);\r\n _takeLiquidity(tLiquidity);\r\n _takeDev(tDev);\r\n _reflectFee(rFee, tFee);\r\n emit Transfer(sender, recipient, tTransferAmount);\r\n }\r\n\r\n function _transferToExcluded(address sender, address recipient, uint256 tAmount) private\r\n {\r\n (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity, uint256 tDev) = _getValues(tAmount);\r\n _rOwned[sender] = _rOwned[sender].sub(rAmount);\r\n _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);\r\n _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);\r\n _takeLiquidity(tLiquidity);\r\n _takeDev(tDev);\r\n _reflectFee(rFee, tFee);\r\n emit Transfer(sender, recipient, tTransferAmount);\r\n }\r\n\r\n function _transferFromExcluded(address sender, address recipient, uint256 tAmount) private\r\n {\r\n (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity, uint256 tDev) = _getValues(tAmount);\r\n _tOwned[sender] = _tOwned[sender].sub(tAmount);\r\n _rOwned[sender] = _rOwned[sender].sub(rAmount);\r\n _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);\r\n _takeLiquidity(tLiquidity);\r\n _takeDev(tDev);\r\n _reflectFee(rFee, tFee);\r\n emit Transfer(sender, recipient, tTransferAmount);\r\n }\r\n\r\n function setRouterAddress(address newRouter) external onlyOwner\r\n {\r\n IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(newRouter);\r\n uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH());\r\n uniswapV2Router = _uniswapV2Router;\r\n }\r\n\r\n function setNumTokensSellToAddToLiquidity(uint256 amountToUpdate) external onlyOwner\r\n {\r\n numTokensSellToAddToLiquidity = amountToUpdate;\r\n }\r\n \r\n function recover_tokens(address token_address) public onlyOwner\r\n {\r\n // Releases a random token sent to this contract to the contract owner.\r\n // Blocks attempts to release the token minted by this contract to protect the auto-LP.\r\n if (token_address != address(this))\r\n {\r\n IERC20 token = IERC20(token_address);\r\n \r\n uint256 amount = token.balanceOf(address(this));\r\n require(amount \u003e 0, \"WHEXcosystemToken: token balance is zero\");\r\n\r\n token.safeTransfer(owner(), amount);\r\n }\r\n }\r\n}\r\n\r\n"}}