I deployed this simple burnable erc20 token inheriting from the openzeppelin contract but I am unable to verify it on etherscan. I have tried to use the truffle flattener but I am not familiar with the truffle framework on cmd with my system.
I have also used the API key verification with remix and it didn’t verify on etherscan though it showed verified correctly!
Is there another way I can do the verification with remix or any other interface?
We should only use an official release of OpenZeppelin Contracts. When using GitHub imports we can specify a release tag. The following is for OpenZeppelin Contracts 3.4 Solidity 0.7 version.
The code you provided is importing Solidity 0.7 branch which is subject to change and is not part of an official release. As the code can change, this can make verification difficult too.
Also, the code provided isn’t burnable, it appears to be different to what is actually deployed. The code above has a supply of zero, but the contract linked on Etherscan has minted tokens. I assume you are only showing a cut down version of your contract?
Thanks @abcoathup and @Skyge for your contribution. I have been able to rewrite it in a single file and contract got verified easily. However, I have a little concern that the write contract tab doesn’t show any functions. Is this normal or could it be network or I missed something in my script?
Thanks @Skyge for the prompt response and check. It’s clear my ISP is down here as many other sites and disconnecting now.
I noticed the burn function didn’t show up in the write contract tab screenshot you sent me. I have a function written for it in my source code but it seems to be silent and uncallable. What do you think I didn’t get right?
I am sorry I am doing this reply with my phone because my network is down.