ParserError: Expected identifier but got ':'
 --> bep-20.sol:3:6:
3 | https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol;
  |      ^

This is the code that I'm running (below). And i keep getting this error (above) im really new to all this and i damn near just copy and pasted this into remix.ethereum, but how do i fix this exactly? any help would be great thanks..

pragma solidity ^0.8.0;


contract Token is ERC20 {
    constructor(uint256 initialSupply) public ERC20 ("Token", "TKN"){

1 Answer 1


I'm getting a dead link with your github link, but you should look into the openzeppelin wizard if you are trying to code a simple ERC20:


It will help you understand the code. You can deploy it with remix on a testnet and play around with it.

Also, on openzeppelin wizard, on the left side, you have different criteria you can give to your ERC20, like mintable, burnable, ... Read the code and try to understand what's happening.

Hope this helps!

  • here's the github link: github.com/OpenZeppelin/openzeppelin-contracts/blob/master/… Commented Nov 14, 2022 at 3:11
  • Ok this is the basic erc20 contract. You just need to import it. Again, check openzeppelin wizard and let me know if you have questions Commented Nov 14, 2022 at 3:18
  • and thank you so much answer helped me alot Commented Nov 14, 2022 at 3:32
  • You are welcome! If you could mark my answer as correct so other people can find it more easily, that would be great! Commented Nov 14, 2022 at 3:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.