Code


pragmasolidity >=0.4.22<0.6.0;

contractowned{
  addresspublicowner;
  constructor()public{
    owner=msg.sender;
  }
  
  modifieronlyOwner{
    require(msg.sender==owner);
    _;
  }
  function transferOwnership(addressnewOwner)onlyOwnerpublic{
    owner=newOwner;
    }
 }
  interfacetokenRecipient{functionreceiveApproval(address_from,uint256_value,address_token,bytescalldata_extraData)external;}
  
contractTokenERC20{
  // Public variables of the token
  stringpublicname;
  stringpublicsymbol;
  uint8publicdecimals=18;
  // 18 decimals is the strongly suggested default, avoid changing it
  uint256publictotalSupply;
  
  // This creates an array with all balances
  mapping(address=>uint256)publicbalanceOf;
  mapping(address=>mapping(address=>uint256))publicallowance;
  
  // This generates a public event on the blockchain that will notify clients
  eventTransfer(addressindexedfrom,addressindexedto,uint256value);
  
  // This generates a public event on the blockchain that will notify clients
eventApproval(addressindexed_owner,addressindexed_spender,uint256_value);
  
  // This notifies clients about the amount burnt
   eventBurn(addressindexedfrom,uint256value);
  
  /**     
  * Constrctor function     
  *     
  * Initializes contract with initial supply tokens to the creator of the contract     */
  
  constructor(
    uint256initialSupply,
    stringmemorytokenName,
    stringmemorytokenSymbol
    )
  public{
  totalSupply=initialSupply * 10 ** uint256(decimals);
  // Update total supply with the decimal amount
  balanceOf[msg.sender]=totalSupply;
  // Give the creator all initial tokens
  name=tokenName;
  // Set the name for display purposes
  symbol=tokenSymbol;
  // Set the symbol for display purposes
  }
  
  /**     
  * Internal transfer, only can be called by this contract     
  */
  function_transfer(address_from,address_to,uint_value)internal{
    // Prevent transfer to 0x0 address. Use burn() instead
    require(_to != address(0x0));
    // Check if the sender has enough
    require(balanceOf[_from] >= _value);
    // Check for overflows
    require(balanceOf[_to]+_value>balanceOf[_to]);
    // Save this for an assertion in the future
    uintpreviousBalances=balanceOf[_from]+balanceOf[_to];
    // Subtract from the sender
    balanceOf[_from]-=_value;
    // Add the same to the recipient
    balanceOf[_to]+=_value;
    emitTransfer(_from,_to,_value);
    // Asserts are used to use static analysis to find bugs in your code. They should never fail
    assert(balanceOf[_from]+balanceOf[_to]==previousBalances);
    }
    
    /**     
    * Transfer tokens     
    *     
    * Send `_value` tokens to `_to` from your account     
    *     
    * @param _to The address of the recipient     
    * @param _value the amount to send     
    */
    
    function transfer(address_to,uint256_value)public returns