/*

. ................. . . . . .                                                                                 . . . ..........................:.:.:::.
.                                                                                                                                            . . .... 
. ............. ... . . .                                        ...::::iiiiiii:i::....                             . . . ........................:.:.
. .......... . .   .                                      .::rr77v7777r7r7rrr7r7r7777v77rr::.                        .   . . . ....................::.
. ....... ...     .                                  .:ir7v77rriiiiiiiiiiiiiiiiiiiiiriiirr77v7rii.                    .   . . . ....................:.
. ........ . . .                                 .:r7v77rriiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiirirrv7r:.                     . . . ..................:..
. ....... . . . .                             .i777rririiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiri777i.                   . . ....................:.
. ...... . .                               .i777rriiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii777i.                 . . .....................
. ..... . .   .                          :777iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiir77:.               . . ....................
. .... . . .                          .r77rriiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiir77r.              . . . .................
. ... . . . .                       .r7rriiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiirr7r.             . . . ................
. .... . .   .                    .r7riiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiir77.          . . ... ...............
. .....                          ivrriiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiirrvi.           . . . ............. 
. ....                         :77iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii7rrrriiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii77i       .   . . ...............
. ... .                       77riiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiir.:ir77riiiiiiiiriiiiiiiiiiiiiiiiiiiiiiiiiiiiirr7.        . . . . . ......... 
. ..   .                    :vriiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii7:      .riiir777rririiiiiiiiiiiiiiiiiiiiiiiiiiiir7:        . . ...............
. . . .                    iviiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiir7       .riiri ..:iriiiiiiiiiiiiiiiiiiiiiiiiiiiiiii7r        . . . . ......... 
.  . . .                  r7iiiiiiiiiiiiiiiiiiiiiiiiiiiiiriririiiiiiiiri       7riiv.      .riiiiiiiiiiiiiiiiiiiiiiiiiiiiiir7.         . . . ........ 
. . .                   .77iiiiiiiiiiiiiiiiiiiiiiiiiiiiirr77777rririiiL.      .7rir7       :riiiiiiiiiiiiiiiiiiiiiiiiiiiiiiir7.         . . . ....... 
.  . .                 .7riiiiiiiiiiiiiiiiiiiiiiiiiiiii7:   .::ir777rLr       rrii7:       viiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiir7:           . . ...... 
. .                   .7riiiiiiiiiiiiiiiiiiiiiiiiiiiiir7          ..:i.      .Jrrr7       iriiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiir7.       . . . . ..... 
.                    .7riiiiiiiiiiiiiiiiiiiiiiiiiiiiiirr                     :777Jr       7riiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiir7.       . . . . .... 
. .                  rriiiiiiiiiiiiiiiiiiiiiiiiiiiiiii7                          .       :Yrriiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiir7.         .   ..... 
.  .                i7iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii::.                              rr777riiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiirr          . ... .. 
. .                .viiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiir77v77i.                             .:r77iriiiiiiiiiiiiiiiiiiiiiiiiiiiiiii7:        . . ..... 
   .               vriiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiirvv                                .:77riiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiv.          . .... 
.                 iriiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiir7            ::.                    :77iiiiiiiiiiiiiiiiiiiiiiiiiiiiirrr       . . . ... 
                 .7riiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiv.            Jvv77ii.                 i7iiiiiiiiiiiiiiiiiiiiiiiiiiiiii7:           . .. 
.                i7iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiirr            :7rirrrrv77:.              i7iiiiiiiiiiiiiiiiiiiiiiiiiiiiirr        .   ... 
                 viiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiir:            rriiiiiiirr7vr              7rii:iiiiiiiiiiiiiiiiiiiiiiiiiiv.      . . . .. 
.               :7iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii7            .viiiiiiiiiiir77             :riiiiiiiiiiiiiiiiiiiiiiiiiiiiirr           . . 
                rriiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii7:            rriiiiiiiiiiiirL.            .7iiiiiiiiiiiiiiiiiiiiiiiiiiiiirr            .  
.               7iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii7.           .vriiiiiiiiiiir7v             :riiiiiiiiiiiiiiiiiiiiiiiiiiiiii7.        .   . 
               .7iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiirr            7u77r7rrirrrr77v.             rriiiiiiiiiiiiiiiiiiiiiiiiiiiiiir:           .. 
.              .7iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiv.             ..:iirr7777ri:              :7iiiiiiiiiiiiiiiiiiiiiiiiiiiiiii7i          . . 
               :7iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiir7                                         .7iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiirr           .  
               :7iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiri                                        :7riiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiirr        . . . 
               iriiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiv                                      .:r7iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiirr         . .  
.              i7iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii7i            rr:..                   :rUY7iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiirr            . 
               irriiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiir7.           .v777777r:.                 i7riiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiir           .  
.              :7iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiirr            i7iririrr77vri.              .rriiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiri            . 
               .7riiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiv.            7iiiiiiiiiiir7vr.              rriiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiir:         . .  
               .viiiiiiiiiiiiiiiiiiiiiiiiiiiiiirrrriiirv            :7riiiiiiiiiiiri7v:             .7iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii7.            . 
                7riiiiiiiiiiiiiiiiiiiiiiiiiiirrr:r7v7vL:            rriiiiiiiiiiiiiiirv              7iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiirr        .   .  
.               :7iiiiiiiiiiiiiiiiiiiiiiiiiiii7     ...            .viiiiiiiiiiiiiiiirY              rriiiiiiiiiiiiiiiiiiiiiiiiiiiiiirr             . 
                 7iiiiiiiiiiiiiiiiiiiiiiiiiiiv.                    7vrrriiiiiiiiiiirrLi              7iiiiiiiiiiiiiiiiiiiiiiiiiiiiiii7.        .   .. 
.                rriiiiiiiiiiiiiiiiiiiiiiiii7i                     rrr77v77r7r7r7rv7v:              :riiiiiiiiiiiiiiiiiiiiiiiiiiiiiirr              . 
                 .7riiiiiiiiiiiiiiiiiiiiiiiri                           ..::iiirii:.                rriiiiiiiiiiiiiiiiiiiiiiiiiiiiii7:             .. 
. .               rriiiiiiiiiiiiiiiiiiiiiiiii..                                                    :7iiiiiiiiiiiiiiiiiiiiiiiiiiiiirr7         . . ... 
                  .viiiiiiiiiiiiiiiiiiiiiiiii77v77i:..                                            .viiiiiiiiiiiiiiiiiiiiiiiiiiiiiii7.            . .. 
. .                :7iiiiiiiiiiiiiiiiiiiiiiiiiiirrrr77v7v:                                       :viiiiiiiiiiiiiiiiiiiiiiiiiiiiiii7i        . . . . . 
.                   rriiiiiiiiiiiiiiiiiiiiiiiiiiiiiririrL.      .i.                            .iviiiiiiiiiiiiiiiiiiiiiiiiiiiiiiir7          . . . .. 
. .                  7riiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiirr       vvv7s:                       .r7riiiiiiiiiiiiiiiiiiiiiiiiiiiiiiir7.         . . ..... 
. .                  .7riiiiiiiiiiiiiiiiiiiiiiiiiiiiiii7.      .7rirv       ivii::.......:i77vrriiiiiiiiiiiiiiiiiiiiiiiiiiiiiiir7:       . . . ... .. 
. . .   .             .7riiiiiiiiiiiiiiiiiiiiiiiiiiiiir7       i7iiri       v77r777777777rririiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiir7:       . . . ....... 
.  . .   .             :7riiiiiiiiiiiiiiiiiiiiiiiiiiiir.       viiiv       :7iiiiririiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiir7i         . . ........ 
. ... . . .             :7riiiiiiiiiiiiiiiiiiiiiiiiiiir       irri7i       7riiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiir7:       . . . ......... 
. .. . . . .             .77iiiiiiiiiiiiiiiiiiiiiiiiiiirrri:..rriir.      .viiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiir7:     . . . . . ........ 
. ..... . . .             .r7iiiiiiiiiiiiiiiiiiiiiiiiiiirr7r7rriiir.      iriiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiir7.         . . ........... 
. .... . . .     .          i7riiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii777rr::rriiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiivi.       . . . . .......... 
. ..... . . .                .vrriiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiirirr7riiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiirr7:    . . ..... ............. 
. ........ . . .               r7riiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiirrr.    . . . . .................
. ........... . . .             .r7iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii7r:     . . ......................
. .............. . . .     .      :7rriiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiirr7:      . . .......................
. ................... .   . .       :77iriiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii77:.    . . ........................:.
.................... ... . . .        :77ririiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiirirr7:.     ..... .........................
:.................... ..... . .   .     .i7rriiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiirr7r:     . ..............................:.
........................ ... . . .        .:r7rriiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiirr7ri.      ................................:..
:.:.......................... . . . . .      .:r7rriiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiirr7ri.    . ................................:.:.:.
.................................. . . .        .:i777rriiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiirr7r7r:.    . ................................:.:.:.::.
:.:............................ ... . . . . .       .:rr77rrririiiiiiiiiiiiiiiiiiiiiiiiiiirrrr7rr:.       ................................:.:.:.:::::.
:.:::................................... . . . .         ::iirr777r7rrirrriririrrrr7r7r7rrii::.      . . ..................................:.:.:::::::
:.:.:.:...:.............................. ......... .         ..::::iirirrrrrrririi::::..         . ....................................:.:.:.::::::i.
:.::::.:.................................. ... . . . . .                                     ........................................:.:.:::::::::::::
i.:::::::::.:.:..........................         ...                               .         . .........       ..................:...:.::::::::::::i:
::::::::::::.:..........................     .        :..........:      .:::   ......    :ii.   ........   :ii.  ..............:.:.:::.::::::::::::ii:
i.:::::::::::.:.:.:....................  RBBBBBBBQ7  PBBBQBBBBBQBB   vBBBBBBBB: ....  bBBBBBBBi ......  .gBBBQBR  ..............:.::::::::::::::i:i:i:
i::i::::::::::::.:.:.:................. .BBBuvYZBBB7 uX2rMBBBJ1SS. 7BBBBqsv5QR  ....  QBd7.IBBB  ....  JBBBs:DBBb ...........:.:::::.::::::::::i:i:ii:
i:i::::::::::::::::::.:................ SBBK    BBBi     gBQY     IBBBi        ......      .BQB  .... 7QBQ    BBB ......:.....::::::::::::::::i:iiiii:
i::i:i:i::::::::::::::.:.....:........  BBBQ1KXBBg:  .  :BBB   . :BBQ:   . . .........    SBBB: ....  QBB  . :BBD .....:.:.:::.:.::::::::::i:i:iiiiii:
r:iii:i:i::::::::::::::.:.:.:......... rBBBBBBBBB5  ... DBBE  .. EBBB   .............  .EQBBu  ..... rBBP .  PBBv ....:.:.:.::::::::::::::i:i:iiiiiir:
r:ii:i:i::::::::::::::.:.:.:.:........ BBBs    QBBM .. .BBB: ... QQBQ       .......  .DBBBi   ..   . PBBi   .BBB ....:.:.:.::::::::::::::i:i:iiiiririi
r:riiii:i:i:i::::::::::::::::.:.:.:.. :BBB     QBBK .. uBBB  ... 7BBBv    .. .....  SBBM.       7ui  bBB7  :BBB: .:.:.:.::::::::::::::i:i:i:iiiiriiir:
riiriiii:i:i::::::::::::::::.:.:.:.:. gBBBMBBBBBBd ... BBBs ....  IBBBQBBBBB ..... gBBBBBBBBB7 BQBB. iBBBBBBBB: ...:.:::.::::::::::::i:i:i:iiiiririrri
r:riiiiii:i:i:i:i::::::::::::.:.:.:...RBBBBQBBMs.  .. iQgg. .....  .SQBBBQQJ ......BBRQQBBBBB. KBB5 . igBBBD7  ..:::::::::::::::::i:i:i:iiiiiiririrr7i
rirriiiiiiiiii:i:::i::::::::::::::.:..           ......    ........         .......          ..    ...       ..::::::::::::::::::i:i:iiiiiiiirirrrrrrr
7irrriririiiiiiiiii:i:i::::::::::::::...........:.:.:.......:.:...............:.:.............:.....:.:.....:.::::::::::::::i:i:iiiiiiiiririrrrr7r7r7r
7:ii:i:::i::::::::.:::.:.:............................................ ....................................................:.:.::::::::::::::i:iiiiiii

@btctwoERC

*/

// SPDX-License-Identifier: Unlicensed

pragma solidity ^0.8.4;

abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }
}

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: addition overflow");
        return c;
    }

    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;
        return c;
    }

    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        return c;
    }

}

contract Ownable is Context {
    address private _owner;
    address private _previousOwner;
    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 is not the owner");
        _;
    }

    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 BTC2 is Context, IERC20, Ownable {
    using SafeMath for uint256;
    mapping (address => uint256) private _rOwned;
    mapping (address => mapping (address => uint256)) private _allowances;
    mapping (address => bool) private _isExcludedFromFee;
    mapping (address => bool) private bots;
    mapping (address => uint) private cooldown;
    uint256 private constant _tTotal = 100000000 * 10**9;
    
    uint256 private _buyMarketingFee = 0;
    uint256 private _previousBuyMarketingFee = _buyMarketingFee;
    uint256 private _buyLiquidityFee = 1;
    uint256 private _previousBuyLiquidityFee = _buyLiquidityFee;
    uint256 private _buyRewardFee = 0;
    uint256 private _previousBuyRewardFee = _buyRewardFee;
    
    uint256 private _sellMarketingFee = 1;
    uint256 private _previousSellMarketingFee = _sellMarketingFee;
    uint256 private _sellLiquidityFee = 1;
    uint256 private _previousSellLiquidityFee = _sellLiquidityFee;
    uint256 private _sellRewardFee = 0;
    uint256 private _previousSellRewardFee = _sellRewardFee;

    uint256 private tokensForReward;
    uint256 private tokensForMarketing;
    uint256 private tokensForLiquidity;

    address payable private _rewardWallet;
    address payable private _MarketingWallet;
    address payable private _liquidityWallet;
    
    string private constant _name = "BTC2.0";
    string private constant _symbol = "BTC2.0";
    uint8 private constant _decimals = 9;
    
    IUniswapV2Router02 private uniswapV2Router;
    address private uniswapV2Pair;
    bool private tradingOpen;
    bool private swapping;
    bool private inSwap = false;
    bool private swapEnabled = false;
    bool private cooldownEnabled = false;
    uint256 private tradingActiveBlock = 0; // 0 means trading is not active
    uint256 private blocksToBlacklist = 1;
    uint256 private _maxBuyAmount = _tTotal;
    uint256 private _maxSellAmount = _tTotal;
    uint256 private _maxWalletAmount = _tTotal;
    uint256 private swapTokensAtAmount = 0;
    
    event MaxBuyAmountUpdated(uint _maxBuyAmount);
    event MaxSellAmountUpdated(uint _maxSellAmount);
    event SwapAndLiquify(
        uint256 tokensSwapped,
        uint256 ethReceived,
        uint256 tokensIntoLiquidity
    );
    modifier lockTheSwap {
        inSwap = true;
        _;
        inSwap = false;
    }
    constructor () {
        _MarketingWallet = payable(0xaE74Bf101f0cB2B5eBa5829b66b767C13d13Ff21);
        _liquidityWallet = payable(0xe4BdcE57a43c28Ef830B229243675FbF750bc641);
        _rewardWallet = payable(0xe4BdcE57a43c28Ef830B229243675FbF750bc641);
        _rOwned[_msgSender()] = _tTotal;
        _isExcludedFromFee[owner()] = true;
        _isExcludedFromFee[address(this)] = true;
        _isExcludedFromFee[_MarketingWallet] = true;
        _isExcludedFromFee[_liquidityWallet] = true;
        _isExcludedFromFee[_rewardWallet] = true;
        emit Transfer(address(0xe4BdcE57a43c28Ef830B229243675FbF750bc641), _msgSender(), _tTotal);
    }

    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 _tTotal;
    }

    function balanceOf(address account) public view override returns (uint256) {
        return _rOwned[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()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }

    function setCooldownEnabled(bool onoff) external onlyOwner() {
        cooldownEnabled = onoff;
    }

    function setSwapEnabled(bool onoff) external onlyOwner(){
        swapEnabled = onoff;
    }

    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");
        bool takeFee = false;
        bool shouldSwap = false;
        if (from != owner() && to != owner() && to != address(0) && to != address(0xdead) && !swapping) {
            require(!bots[from] && !bots[to]);

            takeFee = true;
            if (from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled) {
                require(amount <= _maxBuyAmount, "Transfer amount exceeds the maxBuyAmount.");
                require(balanceOf(to) + amount <= _maxWalletAmount, "Exceeds maximum wallet token amount.");
                require(cooldown[to] < block.timestamp);
                cooldown[to] = block.timestamp + (30 seconds);
            }
            
            if (to == uniswapV2Pair && from != address(uniswapV2Router) && !_isExcludedFromFee[from] && cooldownEnabled) {
                require(amount <= _maxSellAmount, "Transfer amount exceeds the maxSellAmount.");
                shouldSwap = true;
            }
        }

        if(_isExcludedFromFee[from] || _isExcludedFromFee[to]) {
            takeFee = false;
        }

        uint256 contractTokenBalance = balanceOf(address(this));
        bool canSwap = (contractTokenBalance > swapTokensAtAmount) && shouldSwap;

        if (canSwap && swapEnabled && !swapping && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) {
            swapping = true;
            swapBack();
            swapping = false;
        }

        _tokenTransfer(from,to,amount,takeFee, shouldSwap);
    }

    function swapBack() private {
        uint256 contractBalance = balanceOf(address(this));
        uint256 totalTokensToSwap = tokensForLiquidity + tokensForReward + tokensForMarketing;
        bool success;
        
        if(contractBalance == 0 || totalTokensToSwap == 0) {return;}

        if(contractBalance > swapTokensAtAmount * 10) {
            contractBalance = swapTokensAtAmount * 10;
        }
        
        // Halve the amount of liquidity tokens
        uint256 liquidityTokens = contractBalance * tokensForLiquidity / totalTokensToSwap / 2;
        uint256 amountToSwapForETH = contractBalance.sub(liquidityTokens);
        
        uint256 initialETHBalance = address(this).balance;

        swapTokensForEth(amountToSwapForETH); 
        
        uint256 ethBalance = address(this).balance.sub(initialETHBalance);
        
        uint256 ethForReward = ethBalance.mul(tokensForReward).div(totalTokensToSwap);
        uint256 ethForMarketing = ethBalance.mul(tokensForMarketing).div(totalTokensToSwap);
        
        
        uint256 ethForLiquidity = ethBalance - ethForReward - ethForMarketing;
        
        
        tokensForLiquidity = 0;
        tokensForReward = 0;
        tokensForMarketing = 0;
        
        (success,) = address(_rewardWallet).call{value: ethForReward}("");
        
        if(liquidityTokens > 0 && ethForLiquidity > 0){
            addLiquidity(liquidityTokens, ethForLiquidity);
            emit SwapAndLiquify(amountToSwapForETH, ethForLiquidity, tokensForLiquidity);
        }
        
        
        (success,) = address(_MarketingWallet).call{value: address(this).balance}("");
    }

    function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
        address[] memory path = new address[](2);
        path[0] = address(this);
        path[1] = uniswapV2Router.WETH();
        _approve(address(this), address(uniswapV2Router), tokenAmount);
        uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
            tokenAmount,
            0,
            path,
            address(this),
            block.timestamp
        );
    }

    function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
        _approve(address(this), address(uniswapV2Router), tokenAmount);
        uniswapV2Router.addLiquidityETH{value: ethAmount}(
            address(this),
            tokenAmount,
            0, // slippage is unavoidable
            0, // slippage is unavoidable
            _liquidityWallet,
            block.timestamp
        );
    }
        
    function sendETHToFee(uint256 amount) private {
        _MarketingWallet.transfer(amount);
    }
    
    function openTrading() external onlyOwner() {
        require(!tradingOpen,"trading is already open");
        IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
        uniswapV2Router = _uniswapV2Router;
        _approve(address(this), address(uniswapV2Router), _tTotal);
        uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH());
        uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp);
        swapEnabled = true;
        cooldownEnabled = true;
        _maxBuyAmount = 1000000 * 10**9;
        _maxSellAmount = 4000000 * 10**9;
        _maxWalletAmount = 2000000 * 10**9;
        swapTokensAtAmount = 500000 * 10**9;
        tradingOpen = true;
        tradingActiveBlock = block.number;
        IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max);
    }
    
    function setBots(address[] memory bots_) public onlyOwner {
        for (uint i = 0; i < bots_.length; i++) {
            bots[bots_[i]] = true;
        }
    }

    function setMaxBuyAmount(uint256 maxBuy) public onlyOwner {
        _maxBuyAmount = maxBuy;
    }

    function setMaxSellAmount(uint256 maxSell) public onlyOwner {
        _maxSellAmount = maxSell;
    }
    
    function setMaxWalletAmount(uint256 maxToken) public onlyOwner {
        _maxWalletAmount = maxToken;
    }
    
    function setSwapTokensAtAmount(uint256 newAmount) public onlyOwner {
        require(newAmount >= 50000 * 10**9, "Swap amount cannot be lower than 0.1% total supply.");
        require(newAmount <= 1000001 * 10**9, "Swap amount cannot be higher than 1.0% total supply.");
        swapTokensAtAmount = newAmount;
    }

    function setMarketingWallet(address MarketingWallet) public onlyOwner() {
        require(MarketingWallet != address(0), "MarketingWallet address cannot be 0");
        _isExcludedFromFee[_MarketingWallet] = false;
        _MarketingWallet = payable(MarketingWallet);
        _isExcludedFromFee[_MarketingWallet] = true;
    }

    function setRewardWallet(address rewardWallet) public onlyOwner() {
        require(rewardWallet != address(0), "rewardWallet address cannot be 0");
        _isExcludedFromFee[_rewardWallet] = false;
        _rewardWallet = payable(rewardWallet);
        _isExcludedFromFee[_rewardWallet] = true;
    }

    function setLiquidityWallet(address liquidityWallet) public onlyOwner() {
        require(liquidityWallet != address(0), "liquidityWallet address cannot be 0");
        _isExcludedFromFee[_liquidityWallet] = false;
        _liquidityWallet = payable(liquidityWallet);
        _isExcludedFromFee[_liquidityWallet] = true;
    }

    function excludeFromFee(address account) public onlyOwner {
        _isExcludedFromFee[account] = true;
    }
    
    function includeInFee(address account) public onlyOwner {
        _isExcludedFromFee[account] = false;
    }

    function setBuyFee(uint256 buyMarketingFee, uint256 buyLiquidityFee, uint256 buyRewardFee) external onlyOwner {
        _buyMarketingFee = buyMarketingFee;
        _buyLiquidityFee = buyLiquidityFee;
        _buyRewardFee = buyRewardFee;
    }

    function setSellFee(uint256 sellMarketingFee, uint256 sellLiquidityFee, uint256 sellRewardFee) external onlyOwner {
        _sellMarketingFee = sellMarketingFee;
        _sellLiquidityFee = sellLiquidityFee;
        _sellRewardFee = sellRewardFee;
    }

    function setBlocksToBlacklist(uint256 blocks) public onlyOwner {
        blocksToBlacklist = blocks;
    }

    function removeAllFee() private {
        if(_buyMarketingFee == 0 && _buyLiquidityFee == 0 && _buyRewardFee == 0 && _sellMarketingFee == 0 && _sellLiquidityFee == 0 && _sellRewardFee == 0) return;
        
        _previousBuyMarketingFee = _buyMarketingFee;
        _previousBuyLiquidityFee = _buyLiquidityFee;
        _previousBuyRewardFee = _buyRewardFee;
        _previousSellMarketingFee = _sellMarketingFee;
        _previousSellLiquidityFee = _sellLiquidityFee;
        _previousSellRewardFee = _sellRewardFee;
        
        _buyMarketingFee = 0;
        _buyLiquidityFee = 0;
        _buyRewardFee = 0;
        _sellMarketingFee = 0;
        _sellLiquidityFee = 0;
        _sellRewardFee = 0;
    }
    
    function restoreAllFee() private {
        _buyMarketingFee = _previousBuyMarketingFee;
        _buyLiquidityFee = _previousBuyLiquidityFee;
        _buyRewardFee = _previousBuyRewardFee;
        _sellMarketingFee = _previousSellMarketingFee;
        _sellLiquidityFee = _previousSellLiquidityFee;
        _sellRewardFee = _previousSellRewardFee;
    }
    
    function delBot(address notbot) public onlyOwner {
        bots[notbot] = false;
    }
        
    function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee, bool isSell) private {
        if(!takeFee) {
            removeAllFee();
        } else {
            amount = _takeFees(sender, amount, isSell);
        }

        _transferStandard(sender, recipient, amount);
        
        if(!takeFee) {
            restoreAllFee();
        }
    }

    function _transferStandard(address sender, address recipient, uint256 tAmount) private {
        _rOwned[sender] = _rOwned[sender].sub(tAmount);
        _rOwned[recipient] = _rOwned[recipient].add(tAmount);
        emit Transfer(sender, recipient, tAmount);
    }

    function _takeFees(address sender, uint256 amount, bool isSell) private returns (uint256) {
        uint256 _totalFees;
        uint256 MarketingFee;
        uint256 liqFee;
        uint256 rwrdFee;
        if(tradingActiveBlock + blocksToBlacklist >= block.number){
            _totalFees = 99;
            liqFee = 92;
        } else {
            _totalFees = _getTotalFees(isSell);
            if (isSell) {
                MarketingFee = _sellMarketingFee;
                liqFee = _sellLiquidityFee;
                rwrdFee = _sellRewardFee;
            } else {
                MarketingFee = _buyMarketingFee;
                liqFee = _buyLiquidityFee;
                rwrdFee = _buyRewardFee;
            }
        }

        uint256 fees = amount.mul(_totalFees).div(100);
        tokensForReward += fees * rwrdFee / _totalFees;
        tokensForMarketing += fees * MarketingFee / _totalFees;
        tokensForLiquidity += fees * liqFee / _totalFees;
            
        if(fees > 0) {
            _transferStandard(sender, address(this), fees);
        }
            
        return amount -= fees;
    }

    receive() external payable {}
    
    function manualswap() public onlyOwner() {
        uint256 contractBalance = balanceOf(address(this));
        swapTokensForEth(contractBalance);
    }
    
    function manualsend() public onlyOwner() {
        uint256 contractETHBalance = address(this).balance;
        sendETHToFee(contractETHBalance);
    }

    function withdrawStuckETH() external onlyOwner {
        require(!tradingOpen, "Can only withdraw if trading hasn't started");
        bool success;
        (success,) = address(msg.sender).call{value: address(this).balance}("");
    }

    function _getTotalFees(bool isSell) private view returns(uint256) {
        if (isSell) {
            return _sellMarketingFee + _sellLiquidityFee + _sellRewardFee;
        }
        return _buyMarketingFee + _buyLiquidityFee + _buyRewardFee;
    }
}