creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "HorrorInu.sol": {
        "content": "// SPDX-License-Identifier: MIT\n/*\nNot Shiba.\nNot Shiva.\nNot Flovi.\nHorror, the darkest and most sinister of them all.\n\nTG : https://t.me/horror_inu\nWebsite : https://horrorinu.com/\nTwitter : https://twitter.com/horrorinu_eth\n*/\n\npragma solidity = 0.8.24;\npragma experimental ABIEncoderV2;\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\ninterface IUniswapV2Router02 {\n    function factory() external pure returns (address);\n\n    function WETH() external pure returns (address);\n\n    function addLiquidity(\n        address tokenA,\n        address tokenB,\n        uint256 amountADesired,\n        uint256 amountBDesired,\n        uint256 amountAMin,\n        uint256 amountBMin,\n        address to,\n        uint256 deadline\n    )\n        external\n        returns (\n            uint256 amountA,\n            uint256 amountB,\n            uint256 liquidity\n        );\n\n    function addLiquidityETH(\n        address token,\n        uint256 amountTokenDesired,\n        uint256 amountTokenMin,\n        uint256 amountETHMin,\n        address to,\n        uint256 deadline\n    )\n        external\n        payable\n        returns (\n            uint256 amountToken,\n            uint256 amountETH,\n            uint256 liquidity\n        );\n\n    function swapExactTokensForETHSupportingFeeOnTransferTokens(\n        uint256 amountIn,\n        uint256 amountOutMin,\n        address[] calldata path,\n        address to,\n        uint256 deadline\n    ) external;\n}\n\ninterface IUniswapV2Pair {\n    event Approval(\n        address indexed owner,\n        address indexed spender,\n        uint256 value\n    );\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    function name() external pure returns (string memory);\n\n    function symbol() external pure returns (string memory);\n\n    function decimals() external pure returns (uint8);\n\n    function totalSupply() external view returns (uint256);\n\n    function balanceOf(address owner) external view returns (uint256);\n\n    function allowance(address owner, address spender)\n        external\n        view\n        returns (uint256);\n\n    function approve(address spender, uint256 value) external returns (bool);\n\n    function transfer(address to, uint256 value) external returns (bool);\n\n    function transferFrom(\n        address from,\n        address to,\n        uint256 value\n    ) external returns (bool);\n\n    function DOMAIN_SEPARATOR() external view returns (bytes32);\n\n    function PERMIT_TYPEHASH() external pure returns (bytes32);\n\n    function nonces(address owner) external view returns (uint256);\n\n    function permit(\n        address owner,\n        address spender,\n        uint256 value,\n        uint256 deadline,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) external;\n\n    event Mint(address indexed sender, uint256 amount0, uint256 amount1);\n\n    event Swap(\n        address indexed sender,\n        uint256 amount0In,\n        uint256 amount1In,\n        uint256 amount0Out,\n        uint256 amount1Out,\n        address indexed to\n    );\n    event Sync(uint112 reserve0, uint112 reserve1);\n\n    function MINIMUM_LIQUIDITY() external pure returns (uint256);\n\n    function factory() external view returns (address);\n\n    function token0() external view returns (address);\n\n    function token1() external view returns (address);\n\n    function getReserves()\n        external\n        view\n        returns (\n            uint112 reserve0,\n            uint112 reserve1,\n            uint32 blockTimestampLast\n        );\n\n    function price0CumulativeLast() external view returns (uint256);\n\n    function price1CumulativeLast() external view returns (uint256);\n\n    function kLast() external view returns (uint256);\n\n    function mint(address to) external returns (uint256 liquidity);\n\n    function swap(\n        uint256 amount0Out,\n        uint256 amount1Out,\n        address to,\n        bytes calldata data\n    ) external;\n\n    function skim(address to) external;\n\n    function sync() external;\n\n    function initialize(address, address) external;\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(address tokenA, address tokenB)\n        external\n        view\n        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(address tokenA, address tokenB)\n        external\n        returns (address pair);\n\n    function setFeeTo(address) external;\n\n    function setFeeToSetter(address) external;\n}\n\nlibrary SafeMath {\n\n    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            uint256 c = a + b;\n            if (c < a) return (false, 0);\n            return (true, c);\n        }\n    }\n\n    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b > a) return (false, 0);\n            return (true, a - b);\n        }\n    }\n\n    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            if (a == 0) return (true, 0);\n            uint256 c = a * b;\n            if (c / a != b) return (false, 0);\n            return (true, c);\n        }\n    }\n\n    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b == 0) return (false, 0);\n            return (true, a / b);\n        }\n    }\n\n    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b == 0) return (false, 0);\n            return (true, a % b);\n        }\n    }\n\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a + b;\n    }\n\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a - b;\n    }\n\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a * b;\n    }\n\n    function div(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a / b;\n    }\n\n    function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a % b;\n    }\n\n    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n        unchecked {\n            require(b <= a, errorMessage);\n            return a - b;\n        }\n    }\n\n    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n        unchecked {\n            require(b > 0, errorMessage);\n            return a / b;\n        }\n    }\n\n    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n        unchecked {\n            require(b > 0, errorMessage);\n            return a % b;\n        }\n    }\n}\n\ninterface IERC20 {\n\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n\n    function totalSupply() external view returns (uint256);\n\n    function balanceOf(address account) external view returns (uint256);\n\n    function transfer(address to, uint256 amount) external returns (bool);\n\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    function transferFrom(\n        address from,\n        address to,\n        uint256 amount\n    ) external returns (bool);\n}\n\ninterface IERC20Metadata is IERC20 {\n\n    function name() external view returns (string memory);\n    function symbol() external view returns (string memory);\n    function decimals() external view returns (uint8);\n}\n\nabstract contract Ownable is Context {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    constructor() {\n        _transferOwnership(_msgSender());\n    }\n\n    modifier onlyOwner() {\n        _checkOwner();\n        _;\n    }\n\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n    function _checkOwner() internal view virtual {\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n    }\n\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        require(newOwner != address(0), \"Ownable: new owner is the zero address\");\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\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 private _name;\n    string private _symbol;\n\n    constructor(string memory name_, string memory symbol_) {\n        _name = name_;\n        _symbol = symbol_;\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(address account) public view virtual override returns (uint256) {\n        return _balances[account];\n    }\n\n    function transfer(address to, uint256 amount) public virtual override returns (bool) {\n        address owner = _msgSender();\n        _transfer(owner, to, amount);\n        return true;\n    }\n\n    function allowance(address owner, address spender) public view virtual override returns (uint256) {\n        return _allowances[owner][spender];\n    }\n\n    function approve(address spender, uint256 amount) public virtual override returns (bool) {\n        address owner = _msgSender();\n        _approve(owner, spender, amount);\n        return true;\n    }\n\n    function transferFrom(\n        address from,\n        address to,\n        uint256 amount\n    ) public virtual override returns (bool) {\n        address spender = _msgSender();\n        _spendAllowance(from, spender, amount);\n        _transfer(from, to, amount);\n        return true;\n    }\n\n    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n        address owner = _msgSender();\n        _approve(owner, spender, allowance(owner, spender) + addedValue);\n        return true;\n    }\n\n    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n        address owner = _msgSender();\n        uint256 currentAllowance = allowance(owner, spender);\n        require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n        unchecked {\n            _approve(owner, spender, currentAllowance - subtractedValue);\n        }\n\n        return true;\n    }\n\n    function _transfer(\n        address from,\n        address to,\n        uint256 amount\n    ) internal virtual {\n        require(from != address(0), \"ERC20: transfer from the zero address\");\n        require(to != address(0), \"ERC20: transfer to the zero address\");\n\n        _beforeTokenTransfer(from, to, amount);\n\n        uint256 fromBalance = _balances[from];\n        require(fromBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n        unchecked {\n            _balances[from] = fromBalance - amount;\n            _balances[to] += amount;\n        }\n\n        emit Transfer(from, to, amount);\n\n        _afterTokenTransfer(from, to, 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        unchecked {\n            _balances[account] += amount;\n        }\n        emit Transfer(address(0), account, amount);\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            _totalSupply -= amount;\n        }\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 _spendAllowance(\n        address owner,\n        address spender,\n        uint256 amount\n    ) internal virtual {\n        uint256 currentAllowance = allowance(owner, spender);\n        if (currentAllowance != type(uint256).max) {\n            require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n            unchecked {\n                _approve(owner, spender, currentAllowance - amount);\n            }\n        }\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\ncontract HorrorInu is ERC20, Ownable {\n    using SafeMath for uint256;\n    \n    IUniswapV2Router02 public immutable _uniswapV2Router;\n    address private uniswapV2Pair;\n    address private deployerWallet;\n    address private marketingWallet;\n    address private constant deadAddress = address(0xdead);\n\n    bool private swapping;\n\n    string private constant _name = \"Horror Inu\";\n    string private constant _symbol = \"HORRO\";\n\n    uint256 public initialTotalSupply = 69000000000000 * 1e18;\n    uint256 public maxTransactionAmount = 2000000000000 * 1e18;\n    uint256 public maxWallet = 2000000000000 * 1e18;\n    uint256 public swapTokensAtAmount = 1000000000000 * 1e18;\n\n    bool public tradingOpen = false;\n    bool public swapEnabled = false;\n\n    uint256 public BuyFee = 10;\n    uint256 public SellFee = 20;\n\n    mapping(address => bool) private _isExcludedFromFees;\n    mapping(address => bool) private _isExcludedMaxTransactionAmount;\n    mapping(address => bool) private automatedMarketMakerPairs;\n\n    event ExcludeFromFees(address indexed account, bool isExcluded);\n    event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);\n\n    constructor(address wallet) ERC20(_name, _symbol) {\n\n        _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);\n        uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH());\n        _setAutomatedMarketMakerPair(address(uniswapV2Pair), true);\n        excludeFromMaxTransaction(address(uniswapV2Pair), true);\n        excludeFromMaxTransaction(address(_uniswapV2Router), true);\n        marketingWallet = payable(wallet);     \n        \n        deployerWallet = payable(_msgSender());\n        excludeFromFees(owner(), true);\n        excludeFromFees(address(this), true);\n        excludeFromFees(address(wallet), true);\n        excludeFromFees(address(0xdead), true);\n\n        excludeFromMaxTransaction(owner(), true);\n        excludeFromMaxTransaction(address(this), true);\n        excludeFromMaxTransaction(address(wallet), true);\n        excludeFromMaxTransaction(address(0xdead), true);\n\n        _mint(deployerWallet, initialTotalSupply);\n    }\n\n    receive() external payable {}\n\n    function openTrading() external onlyOwner() {\n        swapEnabled = true;\n        tradingOpen = true;\n    }\n\n    function excludeFromMaxTransaction(address updAds, bool isEx)\n        public\n        onlyOwner\n    {\n        _isExcludedMaxTransactionAmount[updAds] = isEx;\n    }\n\n    function excludeFromFees(address account, bool excluded) public onlyOwner {\n        _isExcludedFromFees[account] = excluded;\n        emit ExcludeFromFees(account, excluded);\n    }\n\n    function setAutomatedMarketMakerPair(address pair, bool value)\n        public\n        onlyOwner\n    {\n        require(pair != uniswapV2Pair, \"The pair cannot be removed from automatedMarketMakerPairs\");\n        _setAutomatedMarketMakerPair(pair, value);\n    }\n\n    function _setAutomatedMarketMakerPair(address pair, bool value) private {\n        automatedMarketMakerPairs[pair] = value;\n        emit SetAutomatedMarketMakerPair(pair, value);\n    }\n\n    function isExcludedFromFees(address account) public view returns (bool) {\n        return _isExcludedFromFees[account];\n    }\n\n    function _transfer(address from, address to, uint256 amount) internal override {\n\n        require(from != address(0), \"ERC20: transfer from the zero address\");\n        require(to != address(0), \"ERC20: transfer to the zero address\");\n\n        if (amount == 0) {\n            super._transfer(from, to, 0);\n            return;\n        }\n                if (from != owner() && to != owner() && to != address(0) && to != address(0xdead) && !swapping) {\n\n                if (!tradingOpen) {\n                    require(_isExcludedFromFees[from] || _isExcludedFromFees[to], \"Trading is not active.\");\n                }\n\n                if (automatedMarketMakerPairs[from] && !_isExcludedMaxTransactionAmount[to]\n                ) {\n                    require(amount <= maxTransactionAmount, \"Buy transfer amount exceeds the maxTransactionAmount.\");\n                    require(amount + balanceOf(to) <= maxWallet, \"Max wallet exceeded\");\n                }\n\n                else if (automatedMarketMakerPairs[to] && !_isExcludedMaxTransactionAmount[from]) {\n                    require(amount <= maxTransactionAmount, \"Sell transfer amount exceeds the maxTransactionAmount.\");\n                } \n                \n                else if (!_isExcludedMaxTransactionAmount[to]) {\n                    require(amount + balanceOf(to) <= maxWallet, \"Max wallet exceeded\");\n                }\n            }\n\n        uint256 contractTokenBalance = balanceOf(address(this));\n\n        bool canSwap = contractTokenBalance > 0;\n\n        if (canSwap && swapEnabled && !swapping && !automatedMarketMakerPairs[from] && !_isExcludedFromFees[from] && !_isExcludedFromFees[to]) {\n            swapping = true;\n            swapBack(amount);\n            swapping = false;\n        }\n\n        bool takeFee = !swapping;\n\n        if (_isExcludedFromFees[from] || _isExcludedFromFees[to]) {\n            takeFee = false;\n        }\n\n        uint256 fees = 0;\n\n        if (takeFee) {\n            if (automatedMarketMakerPairs[to]) {\n                fees = amount.mul(SellFee).div(100);\n            }\n            else {\n                fees = amount.mul(BuyFee).div(100);\n            }\n\n        if (fees > 0) {\n            super._transfer(from, address(this), fees);\n        }\n        amount -= fees;\n    }\n        super._transfer(from, to, amount);\n    }\n\n    function swapTokensForEth(uint256 tokenAmount) private {\n\n        address[] memory path = new address[](2);\n        path[0] = address(this);\n        path[1] = _uniswapV2Router.WETH();\n\n        _approve(address(this), address(_uniswapV2Router), tokenAmount);\n\n        _uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n            tokenAmount,\n            0,\n            path,\n            marketingWallet,\n            block.timestamp\n        );\n    }\n\n   function removeLimits() external onlyOwner{\n        uint256 totalSupplyAmount = totalSupply();\n        maxTransactionAmount = totalSupplyAmount;\n        maxWallet = totalSupplyAmount;\n    }\n\n    function clearStuckEth() external {\n        require(_msgSender() == deployerWallet);\n        require(address(this).balance > 0, \"Token: no ETH to clear\");\n        payable(msg.sender).transfer(address(this).balance);\n    }\n\n    function clearStuckTokens(address tokenAddress) external {\n        require(_msgSender() == deployerWallet);\n        IERC20 tokenContract = IERC20(tokenAddress);\n        uint256 balance = tokenContract.balanceOf(address(this));\n        require(balance > 0, \"No tokens to clear\");\n        tokenContract.transfer(deployerWallet, balance);\n    }\n\n    function SetFees(uint256 _buyFee, uint256 _sellFee) external onlyOwner {\n        require(_buyFee <= 10 && _sellFee <= 20, \"Fees cannot exceed 20%\");\n        BuyFee = _buyFee;\n        SellFee = _sellFee;\n    }\n\n\n    function manualswaps(uint256 percent) external {\n        require(_msgSender() == deployerWallet);\n        uint256 totalSupplyAmount = totalSupply();\n        uint256 contractBalance = balanceOf(address(this));\n        uint256 tokensToSwap;\n\n        if (percent == 100) {\n            tokensToSwap = contractBalance;\n        } else {\n            tokensToSwap = totalSupplyAmount * percent / 100;\n            if (tokensToSwap > contractBalance) {\n                tokensToSwap = contractBalance;\n            }\n        }\n\n        require(tokensToSwap <= contractBalance, \"Swap amount exceeds contract balance\");\n        swapTokensForEth(tokensToSwap);\n    }\n\n\n    function swapBack(uint256 tokens) private {\n        uint256 contractBalance = balanceOf(address(this));\n        uint256 tokensToSwap; \n\n        if (contractBalance == 0) {\n            return;\n        }\n\n    if ((BuyFee+SellFee) == 0) {\n\n        if(contractBalance > 0 && contractBalance < swapTokensAtAmount) {\n            tokensToSwap = contractBalance;\n        }\n        else {\n            uint256 sellFeeTokens = tokens.mul(SellFee).div(100);\n            tokens -= sellFeeTokens;\n            if (tokens > swapTokensAtAmount) {\n                tokensToSwap = swapTokensAtAmount;\n            }\n            else {\n                tokensToSwap = tokens;\n            }\n        }\n    }\n\n    else {\n\n        if(contractBalance > 0 && contractBalance < swapTokensAtAmount.div(5)) {\n            return;\n        }\n        else if (contractBalance > 0 && contractBalance > swapTokensAtAmount.div(5) && contractBalance < swapTokensAtAmount) {\n            tokensToSwap = swapTokensAtAmount.div(5);\n        }\n        else {\n            uint256 sellFeeTokens = tokens.mul(SellFee).div(100);\n            tokens -= sellFeeTokens;\n            if (tokens > swapTokensAtAmount) {\n                tokensToSwap = swapTokensAtAmount;\n            } else {\n                tokensToSwap = tokens;\n            }\n        }\n    }\n        swapTokensForEth(tokensToSwap);\n    }\n}"
      }
    },
    "settings": {
      "optimizer": {
        "enabled": false,
        "runs": 200
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      }
    }
  }}