I tried to verify my token created on BSC Scan yesterday but nothing worked so far. I followed the advices to use the truffle-flatenner and copy paste the code in BSC Scan but didn’t worked also.
@Skyge could you please help me out? I really gave my try for hours…hahaha the best I got so far was that the ByteCode were not identical (as it also detects ERC20 and PUROCIGARS in the code).
I guess it automatically used the OpenZeppelin [v4.1.0]
The token: 0xdd301479d8b6058fed4a177ff20a87c260be1701
Many thanks! @Skyge for you helpful work, posts and advices (that I tried to follow).
Keep up the great OpenZeppelin work, project and community!.
Code to reproduce
I used OpenZeppelin and Remix.Ethereum with Solidity compiler 0.8.4, see below the short script:
Yep I tried the truffle verify also :(. Yes the tag ERC-20 was misleading in my post sorry. I also recompiled the truffle-flattener code with Remix.eth and doesn’t work
Thankssss!
The error I get is the following:
Error! Unable to generate Contract ByteCode and ABI
Found the following ContractName(s) in source code : Context , ERC20 , IERC20 , IERC20Metadata , PUROCIGARS
But we were unable to locate a matching bytecode (err_code_2)
For troubleshooting, you can try compiling your source code with the Remix - Solidity IDE and check for exceptions
I use to have the same issue, Be contracts deployed with Remix are very difficult to verify my next token or you may apply next time too with the following:
First deploy to a testnet.
Try to verify with familiar tool like : truffle-plugin-verify