contract TokenMintERC20Token is ERC20 {

    string private _name;
    string private _symbol;
    uint8 private _decimals;
    uint8 private _platform_fees = 1;
    address private _platform_fees_receiver;

    /**
     * @dev Constructor.
     * @param name name of the token
     * @param symbol symbol of the token, 3-4 chars is recommended
     * @param decimals number of decimal places of one token unit, 18 is widely used
     * @param totalSupply total supply of tokens in lowest units (depending on decimals)
     * @param tokenOwnerAddress address that gets 100% of token supply
     */
    constructor(string memory name, string memory symbol, uint8 decimals, uint256 totalSupply, address payable feeReceiver, address tokenOwnerAddress) public payable {
      _name = name;
      _symbol = symbol;
      _decimals = decimals;
     _platform_fees_receiver = feeReceiver;
      // set tokenOwnerAddress as owner of all tokens
      _mint(tokenOwnerAddress, totalSupply);

      // pay the service fee for contract deployment
      feeReceiver.transfer(msg.value);
    }

    /**
     * @dev Transfer tokens.
     * @param recipient address of token receiver.
     * @param amount The amount of token to be transfered.
     */
    function transfer(address recipient, uint256 amount) public returns (bool) {
        
      uint256 fees = amount.mul(_platform_fees).div(100);
      uint256 amountAfterDeductingFees = amount.sub(fees);

      _transfer(msg.sender, recipient, amountAfterDeductingFees);
      _transfer(msg.sender, _platform_fees_receiver, fees);
      
      return true;
    }

    // optional functions from ERC20 stardard

    /**
     * @return the name of the token.
     */
    function name() public view returns (string memory) {
      return _name;
    }

    /**
     * @return the symbol of the token.
     */
    function symbol() public view returns (string memory) {
      return _symbol;
    }

    /**
     * @return the number of decimals of the token.
     */
    function decimals() public view returns (uint8) {
      return _decimals;
    }
}
/**
 * @title TokenMintERC20Token
 * @author TokenMint (visit https://tokenmint.io)
 *
 * @dev Standard ERC20 token with burning and optional functions implemented.
 * For full specification of ERC-20 standard see:
 * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
 */
function decimals() public view returns (uint8) {
      return _decimals;
    }
/**
 * @return the number of decimals of the token.
 */