/*                                                                       
                                                                                          
                                                                                           
                                                                                           
                                                                                           
                                                                 .:;;,.                    
                           .:;iiii:..                 .:i1i1tt11i1iii111i.                 
                     :11111i1i11111111111i,        .ttft1ftt1  ,t1iii1111i:                
                 .i111111i11111i1111111111111;,   if.     .      .1iiiii11t,               
               ,111111i11i1i1i1i1i111111i1111111;.t1.  .108f      .tiiii1111               
             ,t1111111i11i1i1i1i1i111111i1111111t1fGf L88GLC       .ti1i1itt               
            11111111i1i11i1i1iii1i1i11i1i111111111tt;GC8G,L:        ;i11111f               
           1t1111111i1i1iiiiiiiiiiiiii11111111111111tfCGGC,          i1111tf               
          f111111111i1i1iii;;;;;iiiiiii1111111111111ttfCL.           i1111tt               
         1t111111111i1iiiii;;;;:;;iiiii1i1111111111111tt             it11tf:               
        :tt111111111i1iiiii;i;;;iiiii1i1i1111111111111t1f           ,it1tft                
        1t11111111i111111i1ii;iiiiiii1i111111111111111ttt;          11ttfG.                
        ftt11111111111111i1i1iiiiii1i1i1111111111111111ttf         .11tfG,                 
        tttt111111111111111i1ii1i1i111111111111111t11t1tfL.        i1ffG:                  
        ffttt1111111111111111111111111111111111111t1tttffL;      .iifLGftf:                
        tftttt1t11111111111111111111111t111111t1t1ttttfftLii11;,,11tLLtttttt               
        ,Lfftttt1t1t1111111111111111111t1111111tttttttffG,  .:ii11ffLftt:ittt              
         ifftttttttt11t1t1t1111t1t111t1t1tt1ttttttttfffL     .  .iti1fttttttf.             
          LLfffftfttttt1ttt1tt1t1t1t11t1t1ttttttttfffL; .         .i1tfftttf:              
           fLLLfffffftfttttttttt1t1tttttttttttffffffL.              ;tffttL:               
            iGLLfLffffftftftttttttttttttttffffffffL;                ,1tfff.                
             .GGGLLLLLfffffffffffffftffffffffLffGf                  .;ff                   
               :GGLGLLLLLfLffffffffffffffffLLLLG1                   :;fL                   
               . ,LCGGGLGLLLLLLLLLLLLLLLGLLLLLL                   .,;iLG,                  
                    :fCGGGGGGGGGGGGGLLGGGGLGG.                   .,:i1Gtt.                 
                        ;G8CGGLGGGGGGGGCCt, .                 .,,:;itLLffi                 
                           .i,:tffi,.                 ......,,:;;i1tLfffft                 
                           11:,.        .,.:;;1i:,,,,,,,,:::;;ii1tfffffff1                 
                            1ft1i;;i;i1ttfffi;;;i;;i111iiiii1tttfLLLLffLf.                 
                               .:;tft1111111tt1111t11i1111ttfffLLLLLCGi                    
                             ..,,t1t11111i1111111tf111iii1tfLLLfi                          
                          .f111tt1tt11t1ti111111ttGft111t1tLffftL.                         
                         ;t11111ttf111111tft111111LfLLfffG1tffffL                          
                      .11tt1111i11t11ii111tt11ii1111111tL:  ,Lff.                          
                      111ft1111iiit11iii11tt11iii11tt111tL.  .fLL1,                        
                     :11iift111i1itft1111ffftt1111tft1ttfL:   ,fffffL:                     
                      ;1111t1111111tLLLLLf1tfLfffLf1tttffLt;   ,fffffff.                   
                      .1ttfffttttt1tttttfttttttfffffLLGLf111;   ,ffffffL,                  
                            1i1fLGLGLLLLLLLGGLLf1;.  :i1111111.  ,ffffLLL.                 
                            ii;:,,.                   ;ii1i1i11.. ,LfffLG1                 
                           :i;;:,,...                  i;i11111i,  .ffLGGt                 
                           ;ii;:,,.                     iii111111:   tGGC.                 
                           ;i;::..                       i1i1i111t:  .:L1                  
                           i1i:,.                         ;1111111t;.,,:;,                 
                           .ti;:,..                        :1i1111tf;;ii1:                 
                            ,1i;:,,..                    iii1i1i1ttfffLt                   
                             ,t1i;:,,...              .iiiiiii11111ffLLt,                  
                              :t1i;;:,,....          .1iii;;;i11111tfLffftt1               
                               ,ft1ii;:::,,,.....   .11iiiiiiii1111tLLLLt,                 
                                ,Ltt11ii;;;::,,,,.,,111111iii11111tfLf1.                   
                                 .fLfttt111ii;;;;:::Lt111111111111tfL,                     
                                   1LLLfttt1t11iiiiiLftt1t111111t1fL:                      
                                 ,tLGGGGGLLffftttttttGLfttt1t111tffL                       
                                fLLfffffLLLGGGLLLLLLLfGGLLffffffLGGGfL1.                   
                          ,i1tffLfffffffffffLffLLLLGffffffffffffffffffff                   
                      ,fLfffffffffffffLLLLLLLGLGGCCGfffffffftttfffffLffL,                  
                    ;ffffffffffffffffffffffLLLffffLLGGLLfffffffffffffLG,                   
                  .fffffffffffffffffffffffffffffffLffLLfffffffffffffffLi                   
                 :LfffffffffttfffffffffffffffffffffLLffffffffffffffffffff1.                
                ;Lffffffffftt1tttfffffffffffffffffffffffffffffffffffffffffL1               
               .Lfffffffffft111ttfffffffffffffffLLLfffffffffffffffffffffffffL,             
               .fffffffffffftttttfffffttt11iiii1GLffffffffffffttffffffffffffLL:            
               ,tt11iiiii;;;:,,,:;;;iiiii;;::,LLLfffffffffffttttttfffffffffffLLi           
                                              ,tfffffffffffftttttffffffffft11tf.           
                                                .11iiiiiiiii;;;;;;ii;ii1ii11;.             
         ..       ..                                  .,;;;iiiiiii;;:,.                    
                                                        
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract YOSHIToken {
    string public name;
    string public symbol;
    uint8 public decimals;
    uint256 public totalSupply;
    address public taxAddress;
    uint256 public taxRate;

    mapping(address => uint256) public balanceOf;
    mapping(address => mapping(address => uint256)) public allowance;

    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);

    constructor() {
        name = "MrSuperYoshiChairman";
        symbol = "YOSHI";
        decimals = 18;
        totalSupply = 10000000000000 * 10**uint256(decimals);
        taxAddress = 0xC6082521Bc568C1a5E3cB7474452671a7764D5e2;
        taxRate = 2;
        balanceOf[msg.sender] = totalSupply;
    }

    function transfer(address to, uint256 value) public returns (bool) {
        uint256 taxAmount = (value * taxRate) / 100;
        uint256 taxedValue = value - taxAmount;

        require(to != address(0), "Invalid address");
        require(balanceOf[msg.sender] >= value, "Insufficient balance");

        balanceOf[msg.sender] -= value;
        balanceOf[taxAddress] += taxAmount;
        balanceOf[to] += taxedValue;

        emit Transfer(msg.sender, to, taxedValue);
        emit Transfer(msg.sender, taxAddress, taxAmount);
        return true;
    }

    function approve(address spender, uint256 value) public returns (bool) {
        allowance[msg.sender][spender] = value;
        emit Approval(msg.sender, spender, value);
        return true;
    }

    function transferFrom(address from, address to, uint256 value) public returns (bool) {
        uint256 taxAmount = (value * taxRate) / 100;
        uint256 taxedValue = value - taxAmount;

        require(from != address(0), "Invalid address");
        require(to != address(0), "Invalid address");
        require(balanceOf[from] >= value, "Insufficient balance");
        require(allowance[from][msg.sender] >= value, "Allowance exceeded");

        balanceOf[from] -= value;
        balanceOf[taxAddress] += taxAmount;
        balanceOf[to] += taxedValue;
        allowance[from][msg.sender] -= value;

        emit Transfer(from, to, taxedValue);
        emit Transfer(from, taxAddress, taxAmount);
        return true;
    }
}