Hi Team,
So I have very little Solidity knowledge so have just learnt through YT. I'm getting a
"Error! Unable to generate Contract Bytecode and ABI" when verifying on Etherscan.
I created a standard ERC20 token -> deployed to Remix -> then injected my MetaMask -> complied (no errors) -> launched on mainnet. Contract 0x9cbe55fbdea69cd48d597e3f84368c041ac8c47a was deployed.
Verification is failing:
I flattened in remix -> add 1 line of code at the top to give License (MIT) and then copied all the code.
In Etherscan I try to verify (Contract as above, Single file, MIT license v0.8.20). I add all the code. Optimization: Yes. Remove the Constructor Argument -> publish and I get the below error:
Error! Unable to generate Contract Bytecode and ABI
Compiler debug log:
- Found the following ContractName(s) in source code : Context, ERC20, ERC20Pausable, IERC1155Errors, IERC20, IERC20Errors, IERC20Metadata, IERC721Errors, MemeMan1, Ownable, Pausable
- 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've tried all different variations, leaving the auto-populated Constructor Argument, etc.
Any tips to debug this?