Problem when Verifying and publishing an ERC20 tokencontract on etherscan Error! Unable to generate Contract ByteCode and ABI

Hello I deployed on remix IDE the following contract :

pragma solidity 0.8.0;

import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol";

contract Tokenart is ERC20 ("Tokenart","OKNA") {

constructor(uint256 _supply) {
    _mint(msg.sender, _supply);
}
}

Now I am trying to verify it on etherscan but first when I try to just copy past overthrew it does not find the link where ERC20 source code are and then when I send all file separately with ERC20 on open zeppelin + IERC20 + Context + IERC20Metadata it send me back this message : Error! Unable to generate Contract ByteCode and ABI

Can someone help me PLEASE ?

Hi, welcome! :wave:

I think you can have a look at this tutorial: Verify ERC20 token on Etherscan that was deployed through Remix: Step by Step Guide

Thank you very much Skyge ! It works

hey i have the same problem for my bsc token, any ideas?


Hi, I think if you read the tutorialI shared above, you will find this is a known error, you need to adjust manually, assume your contracts are:

contract A is B {}
contract B {}

so you got this error, you should place contract B in front of contract A, that is:

contract B {}
contract A is B {}

for more details, please check at here:

Glad to hear that, but for the next time, please search your question on the forum before asking, if you found a similar question, you can follow the suggestion of that question, if it still not works, then open a new topic to ask for help.