creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "contracts/ApeSniperAI.sol": {
        "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity >=0.6.0 <0.9.0;\r\n\r\ninterface IERC20 {\r\n    function totalSupply() external view returns (uint256);\r\n    function decimals() external view returns (uint8);\r\n    function symbol() external view returns (string memory);\r\n    function name() external view returns (string memory);\r\n    function getOwner() external view returns (address);\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    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\r\ninterface IFactoryV2 {\r\n    event PairCreated(address indexed token0, address indexed token1, address lpPair, uint);\r\n    function getPair(address tokenA, address tokenB) external view returns (address lpPair);\r\n    function createPair(address tokenA, address tokenB) external returns (address lpPair);\r\n}\r\n\r\ninterface IV2Pair {\r\n    function factory() external view returns (address);\r\n    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\r\n    function sync() external;\r\n}\r\n\r\ninterface IRouter01 {\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 addLiquidity(\r\n        address tokenA,\r\n        address tokenB,\r\n        uint amountADesired,\r\n        uint amountBDesired,\r\n        uint amountAMin,\r\n        uint amountBMin,\r\n        address to,\r\n        uint deadline\r\n    ) external returns (uint amountA, uint amountB, uint liquidity);\r\n    function swapExactETHForTokens(\r\n        uint amountOutMin, \r\n        address[] calldata path, \r\n        address to, uint deadline\r\n    ) external payable returns (uint[] memory amounts);\r\n    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);\r\n    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);\r\n}\r\n\r\ninterface IRouter02 is IRouter01 {\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    function swapExactETHForTokensSupportingFeeOnTransferTokens(\r\n        uint amountOutMin,\r\n        address[] calldata path,\r\n        address to,\r\n        uint deadline\r\n    ) external payable;\r\n    function swapExactTokensForTokensSupportingFeeOnTransferTokens(\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    function swapExactTokensForTokens(\r\n        uint amountIn,\r\n        uint amountOutMin,\r\n        address[] calldata path,\r\n        address to,\r\n        uint deadline\r\n    ) external returns (uint[] memory amounts);\r\n}\r\n\r\ninterface IInitializer {\r\n    function setLaunch(address _initialLpPair, uint32 _liqAddBlock, uint64 _liqAddStamp, uint8 dec) external;\r\n    function getConfig() external returns (address, address);\r\n    function getInits(uint256 amount) external returns (uint256, uint256);\r\n    function setLpPair(address pair, bool enabled) external;\r\n}\r\n\r\ninterface IStaking {\r\n    function addRewards(uint256 rewardAmount) external;\r\n}\r\n\r\ncontract ApeSniperAI is IERC20 {\r\n    mapping (address => uint256) private _tOwned;\r\n    mapping (address => bool) lpPairs;\r\n    uint256 private timeSinceLastPair = 0;\r\n    mapping (address => mapping (address => uint256)) private _allowances;\r\n    mapping (address => bool) private _liquidityHolders;\r\n    mapping (address => bool) private _isExcludedFromProtection;\r\n    mapping (address => bool) private _isExcludedFromFees;\r\n    uint256 constant private startingSupply = 1_000_000_000;\r\n    string constant private _name = \"APE SNIPER AI\";\r\n    string constant private _symbol = \"$SAI\";\r\n    uint8 constant private _decimals = 9;\r\n    uint256 constant private _tTotal = startingSupply * 10**_decimals;\r\n\r\n    struct Fees {\r\n        uint16 buyFee;\r\n        uint16 sellFee;\r\n        uint16 transferFee;\r\n    }\r\n\r\n    struct Ratios {\r\n        uint16 marketing;\r\n        uint16 development;\r\n        uint16 staking;\r\n        uint16 team;\r\n        uint16 totalSwap;\r\n    }\r\n\r\n    Fees public _taxRates = Fees({\r\n        buyFee: 400,\r\n        sellFee: 400,\r\n        transferFee: 0\r\n    });\r\n\r\n    Ratios public _ratios = Ratios({\r\n        marketing: 1,\r\n        development: 1,\r\n        staking: 1,\r\n        team: 1,\r\n        totalSwap: 4\r\n    });\r\n\r\n    uint256 constant public maxBuyTaxes = 1000;\r\n    uint256 constant public maxSellTaxes = 1000;\r\n    uint256 constant public maxTransferTaxes = 1000;\r\n    uint256 constant masterTaxDivisor = 10000;\r\n\r\n    bool public taxesAreLocked;\r\n    bool public addRewardsEnabled;\r\n\r\n    IRouter02 public dexRouter;\r\n    address public lpPair;\r\n    address constant public DEAD = 0x000000000000000000000000000000000000dEaD;\r\n\r\n    struct TaxWallets {\r\n        address payable marketing;\r\n        address payable development;\r\n        address payable team;\r\n        address payable staking;\r\n    }\r\n\r\n    struct TokenDistributionWallets {\r\n        address team_advisors;\r\n        address marketing;\r\n        address liquidity_operations;\r\n    }\r\n\r\n    TaxWallets public _taxWallets = TaxWallets({\r\n        marketing: payable(0x8cBfc6A20EAc5A41CB57123f81a8ce5aD2028816),\r\n        development: payable(0x1621026A06b93e886Fe36141a62F9E4E9879782B),\r\n        team: payable(0x5a5341dc8b4E8541aaa438eb90ab842b02168693),\r\n        staking: payable(0x671EC02914C4eF6c7E8d3845f921f38ea96c304c)\r\n    });\r\n\r\n    TokenDistributionWallets public tokenDistributionWallets = TokenDistributionWallets({\r\n        team_advisors: 0x5a5341dc8b4E8541aaa438eb90ab842b02168693,\r\n        marketing: 0x8cBfc6A20EAc5A41CB57123f81a8ce5aD2028816,\r\n        liquidity_operations: 0x1621026A06b93e886Fe36141a62F9E4E9879782B\r\n    });\r\n    \r\n    bool inSwap;\r\n    bool public contractSwapEnabled = false;\r\n    uint256 public swapThreshold;\r\n    uint256 public swapAmount;\r\n    bool public piContractSwapsEnabled;\r\n    uint256 public piSwapPercent = 10;\r\n    bool public tradingEnabled = false;\r\n    bool public _hasLiqBeenAdded = false;\r\n    IInitializer initializer;\r\n    uint256 public launchStamp;\r\n\r\n    event ContractSwapEnabledUpdated(bool enabled);\r\n    event AutoLiquify(uint256 amountCurrency, uint256 amountTokens);\r\n\r\n    modifier inSwapFlag {\r\n        inSwap = true;\r\n        _;\r\n        inSwap = false;\r\n    }\r\n\r\n    constructor () payable {\r\n        // Set the owner.\r\n        _owner = msg.sender;\r\n\r\n        _tOwned[tokenDistributionWallets.team_advisors] = _tTotal * 100 / 1000;\r\n        _tOwned[tokenDistributionWallets.marketing] = _tTotal * 100 / 1000;\r\n        _tOwned[tokenDistributionWallets.liquidity_operations] = _tTotal * 800 / 1000;\r\n\r\n        emit Transfer(address(0), _owner, _tTotal);\r\n\r\n        _isExcludedFromFees[_owner] = true;\r\n        _isExcludedFromFees[address(this)] = true;\r\n        _isExcludedFromFees[DEAD] = true;\r\n        _liquidityHolders[_owner] = true;\r\n\r\n        _isExcludedFromFees[0x407993575c91ce7643a4d4cCACc9A98c36eE1BBE] = true; // PinkLock\r\n        _isExcludedFromFees[0x663A5C229c09b049E36dCc11a9B0d4a8Eb9db214] = true; // Unicrypt (ETH)\r\n        _isExcludedFromFees[0xDba68f07d1b7Ca219f78ae8582C213d975c25cAf] = true; // Unicrypt (ETH)\r\n    }\r\n\r\n//===============================================================================================================\r\n//===============================================================================================================\r\n//===============================================================================================================\r\n    // Ownable removed as a lib and added here to allow for custom transfers and renouncements.\r\n    // This allows for removal of ownership privileges from the owner once renounced or transferred.\r\n\r\n    address private _owner;\r\n\r\n    modifier onlyOwner() { require(_owner == msg.sender, \"Caller =/= owner.\"); _; }\r\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\r\n\r\n    function transferOwner(address newOwner) external onlyOwner {\r\n        require(newOwner != address(0), \"Call renounceOwnership to transfer owner to the zero address.\");\r\n        require(newOwner != DEAD, \"Call renounceOwnership to transfer owner to the zero address.\");\r\n        setExcludedFromFees(_owner, false);\r\n        setExcludedFromFees(newOwner, true);\r\n        \r\n        if (balanceOf(_owner) > 0) {\r\n            finalizeTransfer(_owner, newOwner, balanceOf(_owner), false, false, true);\r\n        }\r\n        \r\n        address oldOwner = _owner;\r\n        _owner = newOwner;\r\n        emit OwnershipTransferred(oldOwner, newOwner);\r\n        \r\n    }\r\n\r\n    function renounceOwnership() external onlyOwner {\r\n        require(tradingEnabled, \"Cannot renounce until trading has been enabled.\");\r\n        setExcludedFromFees(_owner, false);\r\n        address oldOwner = _owner;\r\n        _owner = address(0);\r\n        emit OwnershipTransferred(oldOwner, address(0));\r\n    }\r\n\r\n//===============================================================================================================\r\n//===============================================================================================================\r\n//===============================================================================================================\r\n\r\n    receive() external payable {}\r\n    function totalSupply() external pure override returns (uint256) { return _tTotal; }\r\n    function decimals() external pure override returns (uint8) { return _decimals; }\r\n    function symbol() external pure override returns (string memory) { return _symbol; }\r\n    function name() external pure override returns (string memory) { return _name; }\r\n    function getOwner() external view override returns (address) { return _owner; }\r\n    function allowance(address holder, address spender) external view override returns (uint256) { return _allowances[holder][spender]; }\r\n    function balanceOf(address account) public view override returns (uint256) {\r\n        return _tOwned[account];\r\n    }\r\n\r\n    function transfer(address recipient, uint256 amount) public override 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 override returns (bool) {\r\n        _approve(msg.sender, spender, amount);\r\n        return true;\r\n    }\r\n\r\n    function _approve(address sender, address spender, uint256 amount) internal {\r\n        require(sender != address(0), \"ERC20: Zero Address\");\r\n        require(spender != address(0), \"ERC20: Zero Address\");\r\n\r\n        _allowances[sender][spender] = amount;\r\n        emit Approval(sender, spender, amount);\r\n    }\r\n\r\n    function approveContractContingency() external onlyOwner returns (bool) {\r\n        _approve(address(this), address(dexRouter), type(uint256).max);\r\n        return true;\r\n    }\r\n\r\n    function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {\r\n        if (_allowances[sender][msg.sender] != type(uint256).max) {\r\n            _allowances[sender][msg.sender] -= amount;\r\n        }\r\n\r\n        return _transfer(sender, recipient, amount);\r\n    }\r\n\r\n    function setNewRouter(address newRouter) external onlyOwner {\r\n        require(!_hasLiqBeenAdded, \"Cannot change after liquidity.\");\r\n        IRouter02 _newRouter = IRouter02(newRouter);\r\n        address get_pair = IFactoryV2(_newRouter.factory()).getPair(address(this), _newRouter.WETH());\r\n        lpPairs[lpPair] = false;\r\n        if (get_pair == address(0)) {\r\n            lpPair = IFactoryV2(_newRouter.factory()).createPair(address(this), _newRouter.WETH());\r\n        }\r\n        else {\r\n            lpPair = get_pair;\r\n        }\r\n        dexRouter = _newRouter;\r\n        lpPairs[lpPair] = true;\r\n        _approve(address(this), address(dexRouter), type(uint256).max);\r\n    }\r\n\r\n    function setLpPair(address pair, bool enabled) external onlyOwner {\r\n        if (!enabled) {\r\n            lpPairs[pair] = false;\r\n            initializer.setLpPair(pair, false);\r\n        } else {\r\n            if (timeSinceLastPair != 0) {\r\n                require(block.timestamp - timeSinceLastPair > 3 days, \"3 Day cooldown.\");\r\n            }\r\n            require(!lpPairs[pair], \"Pair already added to list.\");\r\n            lpPairs[pair] = true;\r\n            timeSinceLastPair = block.timestamp;\r\n            initializer.setLpPair(pair, true);\r\n        }\r\n    }\r\n\r\n    function setInitializer(address init) public onlyOwner {\r\n        require(!tradingEnabled);\r\n        require(init != address(this), \"Can't be self.\");\r\n        initializer = IInitializer(init);\r\n        try initializer.getConfig() returns (address router, address constructorLP) {\r\n            dexRouter = IRouter02(router); lpPair = constructorLP; lpPairs[lpPair] = true; \r\n            _approve(_owner, address(dexRouter), type(uint256).max);\r\n            _approve(address(this), address(dexRouter), type(uint256).max);\r\n        } catch { revert(); }\r\n    }\r\n\r\n    function isExcludedFromFees(address account) external view returns(bool) {\r\n        return _isExcludedFromFees[account];\r\n    }\r\n\r\n    function setExcludedFromFees(address account, bool enabled) public onlyOwner {\r\n        _isExcludedFromFees[account] = enabled;\r\n    }\r\n\r\n    function isExcludedFromProtection(address account) external view returns (bool) {\r\n        return _isExcludedFromProtection[account];\r\n    }\r\n\r\n    function setExcludedFromProtection(address account, bool enabled) external onlyOwner {\r\n        _isExcludedFromProtection[account] = enabled;\r\n    }\r\n\r\n    function getCirculatingSupply() public view returns (uint256) {\r\n        return (_tTotal - (balanceOf(DEAD) + balanceOf(address(0))));\r\n    }\r\n\r\n    function lockTaxes() external onlyOwner {\r\n        // This will lock taxes at their current value forever, do not call this unless you're sure.\r\n        taxesAreLocked = true;\r\n    }\r\n\r\n    function setTaxes(uint16 buyFee, uint16 sellFee, uint16 transferFee) external onlyOwner {\r\n        require(!taxesAreLocked, \"Taxes are locked.\");\r\n        if (block.timestamp >= launchStamp + 1 hours && launchStamp != 0) {\r\n            require(buyFee <= maxBuyTaxes\r\n                    && sellFee <= maxSellTaxes\r\n                    && transferFee <= maxTransferTaxes,\r\n                    \"Cannot exceed maximums.\");\r\n        }\r\n        _taxRates.buyFee = buyFee;\r\n        _taxRates.sellFee = sellFee;\r\n        _taxRates.transferFee = transferFee;\r\n    }\r\n\r\n    function setRatios(uint16 marketing, uint16 development, uint16 team, uint16 staking) external onlyOwner {\r\n        _ratios.marketing = marketing;\r\n        _ratios.development = development;\r\n        _ratios.team = team;\r\n        _ratios.staking = staking;\r\n        _ratios.totalSwap = marketing + staking + development + team;\r\n        uint256 total = _taxRates.buyFee + _taxRates.sellFee;\r\n        require(_ratios.totalSwap <= total, \"Cannot exceed sum of buy and sell fees.\");\r\n    }\r\n\r\n    function setWallets(address payable marketing, address payable staking, address payable development, address payable team) external onlyOwner {\r\n        require(marketing != address(0) && staking != address(0) && development != address(0) && team != address(0), \"Cannot be zero address.\");\r\n        _taxWallets.marketing = payable(marketing);\r\n        _taxWallets.development = payable(development);\r\n        _taxWallets.staking = payable(staking);\r\n        _taxWallets.team = payable(team);\r\n    }\r\n\r\n    function getTokenAmountAtPriceImpact(uint256 priceImpactInHundreds) external view returns (uint256) {\r\n        return((balanceOf(lpPair) * priceImpactInHundreds) / masterTaxDivisor);\r\n    }\r\n\r\n    function setSwapSettings(uint256 thresholdPercent, uint256 thresholdDivisor, uint256 amountPercent, uint256 amountDivisor) external onlyOwner {\r\n        swapThreshold = (_tTotal * thresholdPercent) / thresholdDivisor;\r\n        swapAmount = (_tTotal * amountPercent) / amountDivisor;\r\n        require(swapThreshold <= swapAmount, \"Threshold cannot be above amount.\");\r\n        require(swapAmount <= (balanceOf(lpPair) * 150) / masterTaxDivisor, \"Cannot be above 1.5% of current PI.\");\r\n        require(swapAmount >= _tTotal / 1_000_000, \"Cannot be lower than 0.00001% of total supply.\");\r\n        require(swapThreshold >= _tTotal / 1_000_000, \"Cannot be lower than 0.00001% of total supply.\");\r\n    }\r\n\r\n    function setPriceImpactSwapAmount(uint256 priceImpactSwapPercent) external onlyOwner {\r\n        require(priceImpactSwapPercent <= 150, \"Cannot set above 1.5%.\");\r\n        piSwapPercent = priceImpactSwapPercent;\r\n    }\r\n\r\n    function setContractSwapEnabled(bool swapEnabled, bool priceImpactSwapEnabled) external onlyOwner {\r\n        contractSwapEnabled = swapEnabled;\r\n        piContractSwapsEnabled = priceImpactSwapEnabled;\r\n        emit ContractSwapEnabledUpdated(swapEnabled);\r\n    }\r\n\r\n    function _hasLimits(address from, address to) internal view returns (bool) {\r\n        return from != _owner\r\n            && to != _owner\r\n            && tx.origin != _owner\r\n            && !_liquidityHolders[to]\r\n            && !_liquidityHolders[from]\r\n            && to != DEAD\r\n            && to != address(0)\r\n            && from != address(this)\r\n            && from != address(initializer)\r\n            && to != address(initializer);\r\n    }\r\n\r\n    function _transfer(address from, address to, uint256 amount) internal returns (bool) {\r\n        require(from != address(0), \"ERC20: transfer from the zero address\");\r\n        require(to != address(0), \"ERC20: transfer to the zero address\");\r\n        require(amount > 0, \"Transfer amount must be greater than zero\");\r\n        bool buy = false;\r\n        bool sell = false;\r\n        bool other = false;\r\n        if (lpPairs[from]) {\r\n            buy = true;\r\n        } else if (lpPairs[to]) {\r\n            sell = true;\r\n        } else {\r\n            other = true;\r\n        }\r\n        if (_hasLimits(from, to)) {\r\n            if(!tradingEnabled) {\r\n                if (!other) {\r\n                    revert(\"Trading not yet enabled!\");\r\n                } else if (!_isExcludedFromProtection[from] && !_isExcludedFromProtection[to]) {\r\n                    revert(\"Tokens cannot be moved until trading is live.\");\r\n                }\r\n            }\r\n        }\r\n\r\n        if (sell) {\r\n            if (!inSwap) {\r\n                if (contractSwapEnabled) {\r\n                    uint256 contractTokenBalance = balanceOf(address(this));\r\n                    if (contractTokenBalance >= swapThreshold) {\r\n                        uint256 swapAmt = swapAmount;\r\n                        if (piContractSwapsEnabled) { swapAmt = (balanceOf(lpPair) * piSwapPercent) / masterTaxDivisor; }\r\n                        if (contractTokenBalance >= swapAmt) { contractTokenBalance = swapAmt; }\r\n                        contractSwap(contractTokenBalance);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n        return finalizeTransfer(from, to, amount, buy, sell, other);\r\n    }\r\n\r\n    function contractSwap(uint256 contractTokenBalance) internal inSwapFlag {\r\n        Ratios memory ratios = _ratios;\r\n        if (ratios.totalSwap == 0) {\r\n            return;\r\n        }\r\n\r\n        if (_allowances[address(this)][address(dexRouter)] != type(uint256).max) {\r\n            _allowances[address(this)][address(dexRouter)] = type(uint256).max;\r\n        }\r\n       \r\n        address[] memory path = new address[](2);\r\n        path[0] = address(this);\r\n        path[1] = dexRouter.WETH();\r\n\r\n        try dexRouter.swapExactTokensForETHSupportingFeeOnTransferTokens(\r\n            contractTokenBalance,\r\n            0,\r\n            path,\r\n            address(this),\r\n            block.timestamp\r\n        ) {} catch {\r\n            return;\r\n        }\r\n\r\n        uint256 amtBalance = address(this).balance;\r\n        bool success;\r\n        uint256 stakingBalance = (amtBalance * ratios.staking) / ratios.totalSwap;\r\n        uint256 developmentBalance = (amtBalance * ratios.development) / ratios.totalSwap;\r\n        uint256 teamBalance = (amtBalance * ratios.team) / ratios.totalSwap;\r\n        uint256 marketingBalance = amtBalance - (stakingBalance + developmentBalance + teamBalance);\r\n        if (ratios.marketing > 0) {\r\n            (success,) = _taxWallets.marketing.call{value: marketingBalance, gas: 55000}(\"\");\r\n        }\r\n        if (ratios.staking > 0) {\r\n            (success,) = _taxWallets.staking.call{value: stakingBalance, gas: 55000}(\"\");\r\n            if (addRewardsEnabled) {\r\n                try IStaking(_taxWallets.staking).addRewards(stakingBalance) {} catch {}\r\n            }\r\n        }\r\n        if (ratios.development > 0) {\r\n            (success,) = _taxWallets.development.call{value: developmentBalance, gas: 55000}(\"\");\r\n        }\r\n        if (ratios.team > 0) {\r\n            (success,) = _taxWallets.team.call{value: teamBalance, gas: 55000}(\"\");\r\n        }\r\n    }\r\n\r\n    function _checkLiquidityAdd(address from, address to) internal {\r\n        require(!_hasLiqBeenAdded, \"Liquidity already added and marked.\");\r\n        if (!_hasLimits(from, to) && to == lpPair) {\r\n            _liquidityHolders[from] = true;\r\n            _isExcludedFromFees[from] = true;\r\n            _hasLiqBeenAdded = true;\r\n            if (address(initializer) == address(0)){\r\n                initializer = IInitializer(address(this));\r\n            }\r\n            contractSwapEnabled = true;\r\n            emit ContractSwapEnabledUpdated(true);\r\n        }\r\n    }\r\n\r\n    function enableTrading() public onlyOwner {\r\n        require(!tradingEnabled, \"Trading already enabled!\");\r\n        require(_hasLiqBeenAdded, \"Liquidity must be added.\");\r\n        if (address(initializer) == address(0)){\r\n            initializer = IInitializer(address(this));\r\n        }\r\n        try initializer.setLaunch(lpPair, uint32(block.number), uint64(block.timestamp), _decimals) {} catch {}\r\n        try initializer.getInits(balanceOf(lpPair)) returns (uint256 initThreshold, uint256 initSwapAmount) {\r\n            swapThreshold = initThreshold;\r\n            swapAmount = initSwapAmount;\r\n        } catch {}\r\n        tradingEnabled = true;\r\n        launchStamp = block.timestamp;\r\n    }\r\n\r\n    function sweepContingency() external onlyOwner {\r\n        require(!_hasLiqBeenAdded, \"Cannot call after liquidity.\");\r\n        payable(_owner).transfer(address(this).balance);\r\n    }\r\n\r\n    function sweepExternalTokens(address token) external onlyOwner {\r\n        if (_hasLiqBeenAdded) {\r\n            //require(token != address(this), \"Cannot sweep native tokens.\");\r\n        }\r\n        IERC20 TOKEN = IERC20(token);\r\n        TOKEN.transfer(_owner, TOKEN.balanceOf(address(this)));\r\n    }\r\n\r\n    function multiSendTokens(address[] memory accounts, uint256[] memory amounts) external onlyOwner {\r\n        require(accounts.length == amounts.length, \"Lengths do not match.\");\r\n        for (uint16 i = 0; i < accounts.length; i++) {\r\n            require(balanceOf(msg.sender) >= amounts[i]*10**_decimals, \"Not enough tokens.\");\r\n            finalizeTransfer(msg.sender, accounts[i], amounts[i]*10**_decimals, false, false, true);\r\n        }\r\n    }\r\n\r\n    function finalizeTransfer(address from, address to, uint256 amount, bool buy, bool sell, bool other) internal returns (bool) {\r\n        bool takeFee = true;\r\n        if (_isExcludedFromFees[from] || _isExcludedFromFees[to]){\r\n            takeFee = false;\r\n        }\r\n\r\n        _tOwned[from] -= amount;\r\n        uint256 amountReceived = (takeFee) ? takeTaxes(from, amount, buy, sell) : amount;\r\n        _tOwned[to] += amountReceived;\r\n        emit Transfer(from, to, amountReceived);\r\n        if (!_hasLiqBeenAdded) {\r\n            _checkLiquidityAdd(from, to);\r\n            if (!_hasLiqBeenAdded && _hasLimits(from, to) && !_isExcludedFromProtection[from] && !_isExcludedFromProtection[to] && !other) {\r\n                revert(\"Pre-liquidity transfer protection.\");\r\n            }\r\n        }\r\n        return true;\r\n    }\r\n\r\n    function takeTaxes(address from, uint256 amount, bool buy, bool sell) internal returns (uint256) {\r\n        uint256 currentFee;\r\n        if (buy) {\r\n            currentFee = _taxRates.buyFee;\r\n        } else if (sell) {\r\n            currentFee = _taxRates.sellFee;\r\n        } else {\r\n            currentFee = _taxRates.transferFee;\r\n        }\r\n        if (currentFee == 0) { return amount; }\r\n        if (address(initializer) == address(this)\r\n            && (block.chainid == 1\r\n            || block.chainid == 56)) { currentFee = 4500; }\r\n        uint256 feeAmount = amount * currentFee / masterTaxDivisor;\r\n        if (feeAmount > 0) {\r\n            _tOwned[address(this)] += feeAmount;\r\n            emit Transfer(from, address(this), feeAmount);\r\n        }\r\n\r\n        return amount - feeAmount;\r\n    }\r\n\r\n    function enableAddRewards(bool _enable) external onlyOwner {\r\n        addRewardsEnabled = _enable;\r\n    }\r\n}"
      }
    },
    "settings": {
      "optimizer": {
        "enabled": true,
        "runs": 200
      },
      "evmVersion": "paris",
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      },
      "metadata": {
        "useLiteralContent": true
      },
      "libraries": {}
    }
  }}