creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "JumpyTurtlee.sol": {
        "content": "// SPDX-License-Identifier:MIT\r\n\r\npragma solidity ^0.8.10;\r\n\r\nabstract contract Context {\r\n    function _msgSender() internal view virtual returns (address) {\r\n        return msg.sender;\r\n    }\r\n\r\n    function _msgData() internal view virtual returns (bytes calldata) {\r\n        return msg.data;\r\n    }\r\n}\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)\r\n        external\r\n        returns (bool);\r\n    function allowance(address owner, address spender)\r\n        external\r\n        view\r\n        returns (uint256);\r\n    function approve(address spender, uint256 amount) external returns (bool);\r\n    function transferFrom(\r\n        address sender,\r\n        address recipient,\r\n        uint256 amount\r\n    ) external returns (bool);\r\n    event Transfer(address indexed from, address indexed to, uint256 value);\r\n    event Approval(\r\n        address indexed owner,\r\n        address indexed spender,\r\n        uint256 value\r\n    );\r\n}\r\n\r\nabstract contract Ownable is Context {\r\n    address private _owner;\r\n\r\n    event OwnershipTransferred(\r\n        address indexed previousOwner,\r\n        address indexed newOwner\r\n    );\r\n\r\n    /**\r\n     * @dev Initializes the contract setting the deployer as the initial owner.\r\n     */\r\n    constructor() {\r\n        _setOwner(_msgSender());\r\n    }\r\n\r\n    /**\r\n     * @dev Returns the address of the current owner.\r\n     */\r\n    function owner() public view virtual returns (address) {\r\n        return _owner;\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(owner() == _msgSender(), \"Ownable: caller is not the owner\");\r\n        _;\r\n    }\r\n\r\n    function renounceOwnership() public virtual onlyOwner {\r\n        _setOwner(address(0));\r\n    }\r\n\r\n    function transferOwnership(address newOwner) public virtual onlyOwner {\r\n        require(\r\n            newOwner != address(0),\r\n            \"Ownable: new owner is the zero address\"\r\n        );\r\n        _setOwner(newOwner);\r\n    }\r\n\r\n    function _setOwner(address newOwner) private {\r\n        address oldOwner = _owner;\r\n        _owner = newOwner;\r\n        emit OwnershipTransferred(oldOwner, newOwner);\r\n    }\r\n}\r\n\r\nlibrary SafeMath {\r\n\r\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\r\n        uint256 c = a + b;\r\n        require(c >= a, \"SafeMath: addition overflow\");\r\n\r\n        return c;\r\n    }\r\n\r\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\r\n        return sub(a, b, \"SafeMath: subtraction overflow\");\r\n    }\r\n\r\n    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\r\n        require(b <= a, errorMessage);\r\n        uint256 c = a - b;\r\n\r\n        return c;\r\n    }\r\n\r\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\r\n        if (a == 0) {\r\n            return 0;\r\n        }\r\n\r\n        uint256 c = a * b;\r\n        require(c / a == b, \"SafeMath: multiplication overflow\");\r\n\r\n        return c;\r\n    }\r\n\r\n    function div(uint256 a, uint256 b) internal pure returns (uint256) {\r\n        return div(a, b, \"SafeMath: division by zero\");\r\n    }\r\n\r\n    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\r\n        require(b > 0, errorMessage);\r\n        uint256 c = a / b;\r\n        // assert(a == b * c + a % b); // There is no case in which this doesn't hold\r\n\r\n        return c;\r\n    }\r\n\r\n    function mod(uint256 a, uint256 b) internal pure returns (uint256) {\r\n        return mod(a, b, \"SafeMath: modulo by zero\");\r\n    }\r\n\r\n    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\r\n        require(b != 0, errorMessage);\r\n        return a % b;\r\n    }\r\n}\r\n\r\ninterface IDexSwapFactory {\r\n    event PairCreated(address indexed token0, address indexed token1, address pair, uint);\r\n    function createPair(address tokenA, address tokenB) external returns (address pair);\r\n}\r\n\r\ninterface IDexSwapPair {\r\n    event Approval(address indexed owner, address indexed spender, uint value);\r\n    event Transfer(address indexed from, address indexed to, uint value);\r\n\r\n    function name() external pure returns (string memory);\r\n    function symbol() external pure returns (string memory);\r\n    function decimals() external pure returns (uint8);\r\n    function totalSupply() external view returns (uint);\r\n    function balanceOf(address owner) external view returns (uint);\r\n    function allowance(address owner, address spender) external view returns (uint);\r\n\r\n    function approve(address spender, uint value) external returns (bool);\r\n    function transfer(address to, uint value) external returns (bool);\r\n    function transferFrom(address from, address to, uint value) external returns (bool);\r\n\r\n    function DOMAIN_SEPARATOR() external view returns (bytes32);\r\n    function PERMIT_TYPEHASH() external pure returns (bytes32);\r\n    function nonces(address owner) external view returns (uint);\r\n\r\n    function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;\r\n    \r\n    event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);\r\n    event Swap(\r\n        address indexed sender,\r\n        uint amount0In,\r\n        uint amount1In,\r\n        uint amount0Out,\r\n        uint amount1Out,\r\n        address indexed to\r\n    );\r\n    event Sync(uint112 reserve0, uint112 reserve1);\r\n\r\n    function MINIMUM_LIQUIDITY() external pure returns (uint);\r\n    function factory() external view returns (address);\r\n    function token0() external view returns (address);\r\n    function token1() external view returns (address);\r\n    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\r\n    function price0CumulativeLast() external view returns (uint);\r\n    function price1CumulativeLast() external view returns (uint);\r\n    function kLast() external view returns (uint);\r\n\r\n    function burn(address to) external returns (uint amount0, uint amount1);\r\n    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;\r\n    function skim(address to) external;\r\n    function sync() external;\r\n\r\n    function initialize(address, address) external;\r\n}\r\n\r\ninterface IDexSwapRouter {\r\n    function factory() external pure returns (address);\r\n    function WETH() external pure returns (address);\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 swapExactTokensForETHSupportingFeeOnTransferTokens(\r\n        uint amountIn,\r\n        uint amountOutMin,\r\n        address[] calldata path,\r\n        address to,\r\n        uint deadline\r\n    ) external;\r\n\r\n}\r\n\r\ncontract JumpyTurtlee is Context, IERC20, Ownable {\r\n\r\n    using SafeMath for uint256;\r\n\r\n    string private _name = \"JumpyTurtlee\";\r\n    string private _symbol = \"JT\";\r\n    uint8 private _decimals = 18; \r\n\r\n    address public immutable deadAddress = 0x000000000000000000000000000000000000dEaD;\r\n    address public immutable zeroAddress = 0x0000000000000000000000000000000000000000;\r\n\r\n    uint256 public _buyTreasuryFee = 0;\r\n    uint256 public _sellTreasuryFee = 250;\r\n\r\n    address public Treasury = address(0x512c8e0F9B14AF5Eb07efb7F3d151085afAA7724);\r\n    \r\n    uint256 feedenominator = 1000;\r\n\r\n    mapping (address => uint256) _balances;\r\n    mapping (address => mapping (address => uint256)) private _allowances;\r\n\r\n    mapping (address => bool) public isExcludedFromFee;\r\n    mapping (address => bool) public isMarketPair;\r\n\r\n    uint256 private _totalSupply = 300_000_000 * 10**_decimals;\r\n\r\n    uint256 public swapThreshold = 20_000 * 10**_decimals;\r\n\r\n    bool public swapEnabled = true;\r\n\r\n    IDexSwapRouter public dexRouter;\r\n    address public dexPair;\r\n\r\n    bool inSwap;\r\n    bool public swapbylimit = false;\r\n    \r\n    modifier onlyGuard() {\r\n        require(msg.sender == Treasury,\"Error: Invalid Caller!\");\r\n        _;\r\n    }\r\n\r\n    modifier onlyOwnerOrTreasury() {\r\n    require(msg.sender == owner() || msg.sender == Treasury, \"Error: Invalid Caller!\");\r\n    _;\r\n    }\r\n\r\n    modifier swapping() {\r\n        inSwap = true;\r\n        _;\r\n        inSwap = false;\r\n    }\r\n    \r\n    event SwapTokensForETH(\r\n        uint256 amountIn,\r\n        address[] path\r\n    );\r\n\r\n    constructor() {\r\n\r\n        IDexSwapRouter _dexRouter = IDexSwapRouter(\r\n            0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\r\n        );\r\n\r\n        dexPair = IDexSwapFactory(_dexRouter.factory()).createPair(\r\n            address(this),\r\n            _dexRouter.WETH()\r\n        );\r\n\r\n        dexRouter = _dexRouter;\r\n\r\n        Treasury = msg.sender;\r\n\r\n        isExcludedFromFee[address(this)] = true;\r\n        isExcludedFromFee[msg.sender] = true;\r\n        isExcludedFromFee[address(dexRouter)] = true;\r\n\r\n        isMarketPair[address(dexPair)] = true;\r\n\r\n        _allowances[address(this)][address(dexRouter)] = ~uint256(0);\r\n        _allowances[address(this)][address(dexPair)] = ~uint256(0);\r\n\r\n        _balances[msg.sender] = _totalSupply;\r\n        emit Transfer(address(0), msg.sender, _totalSupply);\r\n    }\r\n\r\n    function name() public view returns (string memory) {\r\n        return _name;\r\n    }\r\n\r\n    function symbol() public view returns (string memory) {\r\n        return _symbol;\r\n    }\r\n\r\n    function decimals() public view returns (uint8) {\r\n        return _decimals;\r\n    }\r\n\r\n    function totalSupply() public view override returns (uint256) {\r\n        return _totalSupply;\r\n    }\r\n\r\n    function balanceOf(address account) public view override returns (uint256) {\r\n       return _balances[account];     \r\n    }\r\n\r\n    function allowance(address owner, address spender) public view override returns (uint256) {\r\n        return _allowances[owner][spender];\r\n    }\r\n    \r\n    function getCirculatingSupply() public view returns (uint256) {\r\n        return _totalSupply.sub(balanceOf(deadAddress)).sub(balanceOf(zeroAddress));\r\n    }\r\n\r\n    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\r\n        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\r\n        return true;\r\n    }\r\n\r\n    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\r\n        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \"ERC20: decreased allowance below zero\"));\r\n        return true;\r\n    }\r\n\r\n    function approve(address spender, uint256 amount) public override returns (bool) {\r\n        _approve(_msgSender(), spender, amount);\r\n        return true;\r\n    }\r\n\r\n    function _approve(address owner, address spender, uint256 amount) private {\r\n        require(owner != address(0), \"ERC20: approve from the zero address\");\r\n        require(spender != address(0), \"ERC20: approve to the zero address\");\r\n\r\n        _allowances[owner][spender] = amount;\r\n        emit Approval(owner, spender, amount);\r\n    }\r\n\r\n     //to recieve ETH from Router when swaping\r\n    receive() external payable {}\r\n\r\n    function transfer(address recipient, uint256 amount) public override returns (bool) {\r\n        _transfer(_msgSender(), recipient, amount);\r\n        return true;\r\n    }\r\n\r\n    function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {\r\n        _transfer(sender, recipient, amount);\r\n        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \"ERC20: transfer amount exceeds allowance\"));\r\n        return true;\r\n    }\r\n\r\n    function _transfer(address sender, address recipient, uint256 amount) private returns (bool) {\r\n\r\n        require(sender != address(0), \"ERC20: transfer from the zero address\");\r\n        require(recipient != address(0), \"ERC20: transfer to the zero address\");\r\n        require(amount > 0, \"Transfer amount must be greater than zero\");\r\n    \r\n        if (inSwap) {\r\n            return _basicTransfer(sender, recipient, amount);\r\n        }\r\n        else {\r\n\r\n            uint256 contractTokenBalance = balanceOf(address(this));\r\n            bool overMinimumTokenBalance = contractTokenBalance >= swapThreshold;\r\n\r\n            if (overMinimumTokenBalance && !inSwap && !isMarketPair[sender] && swapEnabled) {\r\n                swapBack(contractTokenBalance);\r\n            }\r\n            \r\n            _balances[sender] = _balances[sender].sub(amount, \"Insufficient Balance\");\r\n\r\n            uint256 finalAmount = shouldNotTakeFee(sender,recipient) ? amount : takeFee(sender, recipient, amount);\r\n\r\n            _balances[recipient] = _balances[recipient].add(finalAmount);\r\n\r\n            emit Transfer(sender, recipient, finalAmount);\r\n            return true;\r\n\r\n        }\r\n\r\n    }\r\n\r\n    function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {\r\n        _balances[sender] = _balances[sender].sub(amount, \"Insufficient Balance\");\r\n        _balances[recipient] = _balances[recipient].add(amount);\r\n        emit Transfer(sender, recipient, amount);\r\n        return true;\r\n    }\r\n    \r\n    function shouldNotTakeFee(address sender, address recipient) internal view returns (bool) {\r\n        if(isExcludedFromFee[sender] || isExcludedFromFee[recipient]) {\r\n            return true;\r\n        }\r\n        else if (isMarketPair[sender] || isMarketPair[recipient]) {\r\n            return false;\r\n        }\r\n        else {\r\n            return false;\r\n        }\r\n    }\r\n\r\n    function takeFee(address sender, address recipient, uint256 amount) internal returns (uint256) {\r\n        \r\n        uint feeAmount;\r\n\r\n        unchecked {\r\n\r\n            if(isMarketPair[sender]) { \r\n                feeAmount = amount.mul(_buyTreasuryFee).div(feedenominator);\r\n            } \r\n            else if(isMarketPair[recipient]) { \r\n                feeAmount = amount.mul(_sellTreasuryFee).div(feedenominator);\r\n            }\r\n\r\n            if(feeAmount > 0) {\r\n                _balances[address(this)] = _balances[address(this)].add(feeAmount);\r\n                emit Transfer(sender, address(this), feeAmount);\r\n            }\r\n\r\n            return amount.sub(feeAmount);\r\n        }\r\n        \r\n    }\r\n\r\n    function swapBack(uint contractBalance) internal swapping {\r\n\r\n        if(swapbylimit) contractBalance = swapThreshold;\r\n\r\n        uint256 initialBalance = address(this).balance;\r\n        swapTokensForEth(contractBalance);\r\n        uint256 amountReceived = address(this).balance.sub(initialBalance);\r\n\r\n       if(amountReceived > 0) payable(Treasury).transfer(amountReceived);\r\n\r\n    }\r\n\r\n    function swapTokensForEth(uint256 tokenAmount) private {\r\n        // generate the uniswap pair path of token -> weth\r\n        address[] memory path = new address[](2);\r\n        path[0] = address(this);\r\n        path[1] = dexRouter.WETH();\r\n\r\n        _approve(address(this), address(dexRouter), tokenAmount);\r\n\r\n        // make the swap\r\n        dexRouter.swapExactTokensForETHSupportingFeeOnTransferTokens(\r\n            tokenAmount,\r\n            0, // accept any amount of ETH\r\n            path,\r\n            address(this), // The contract\r\n            block.timestamp\r\n        );\r\n        \r\n        emit SwapTokensForETH(tokenAmount, path);\r\n    }\r\n\r\n    function rescueFunds() external onlyGuard { \r\n        (bool os,) = payable(msg.sender).call{value: address(this).balance}(\"\");\r\n        require(os,\"Transaction Failed!!\");\r\n    }\r\n\r\n    function rescueTokens(IERC20 adr,address recipient,uint amount) external onlyGuard {\r\n        adr.transfer(recipient,amount);\r\n    }\r\n\r\n    function setFee(uint _buyTreasury, uint _sellTreasury, uint _deno) external onlyOwnerOrTreasury {    \r\n        _buyTreasuryFee = _buyTreasury;\r\n        _sellTreasuryFee = _sellTreasury;\r\n        feedenominator = _deno;\r\n    }\r\n\r\n    function excludeFromFee(address _adr, bool _status) external onlyOwner {\r\n        isExcludedFromFee[_adr] = _status;\r\n    }\r\n\r\n    function setTreasuryWallet(address _newWallet) external onlyOwnerOrTreasury {\r\n        Treasury = _newWallet;\r\n    }\r\n\r\n    function setMarketPair(address _pair, bool _status) external onlyOwner {\r\n        isMarketPair[_pair] = _status;\r\n    }\r\n\r\n    function setSwapBackSettings(bool _enabled, bool _limited, uint256 _amount)\r\n        external\r\n        onlyOwner\r\n    {\r\n        swapEnabled = _enabled;\r\n        swapThreshold = _amount;\r\n        swapbylimit = _limited;\r\n    }\r\n\r\n    function setManualRouter(address _router) external onlyOwner {\r\n        dexRouter = IDexSwapRouter(_router);\r\n    }\r\n\r\n    function setManualPair(address _pair) external onlyOwner {\r\n        dexPair = _pair;\r\n    }\r\n\r\n\r\n}"
      }
    },
    "settings": {
      "optimizer": {
        "enabled": false,
        "runs": 200
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      }
    }
  }}