Error! Unable to generate Contract ByteCode and ABI - BscScan Testnet

Hi Guys,

I deployed a BEP20 contract on BscScan Testnet, and now I am trying to get the source code verified. But it shows the below error. I tried adding flattered code using the remix, but I am getting the same error.

Compiler debug log:

  • Error! Unable to generate Contract ByteCode and ABI
  • Found the following ContractName(s) in source code : Address , Context , Curiosity , IERC20 , IUniswapV2Factory , IUniswapV2Pair , IUniswapV2Router01 , IUniswapV2Router02 , Ownable , SafeMath
  • 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

Can anyone help me to resolve this error, please?

Thank you.

1 Like

I'm getting the similar error on Ether scan. Trying to verify token on etherscan.

Hi, welcome! :wave:

Sorry, I am not familiar with the BSC-Chain, maybe you should ask for help in their forum: Home | Binance Chain Forum

And they have a documentation about how to verify contracts, maybe you can have a look at it:

And if you want to verify your contracts with a single file, you can have a look at this tutorial: Verify ERC20 token on Etherscan that was deployed through Remix: Step by Step Guide

Hi, I had an error as well. BSC automatically generates when you send blank.