BSC-Testnet Contract address verification always fails: Error! Unable to generate Contract ByteCode and ABI

I've been struggling with this with different methods. As the most straightforward, I tried manually-flattening the code in REMIX, and verifying it on bscscan. Compiler version OK, Runs for optimization 200 OK, Optimization ON... and it always fail.

Then I tried with hardhat, and truffle, with truffle compile and verifying I got a very similar result. I think I have checked all possible options about this and I can't fix it.

I will be gratefull if any mate could give some advice.

Contract address:

BSC Scan testnet output:

What error does truffle show you?

I can also help you verify it if you want. Just send your contract source codes

Hey! I fanaly did it with Hardhat. Thank you very much :slight_smile: @isoteriksoftware

1 Like

I'm facing similar issue, but while verifying it on BSC Scan testnet, it takes me to the mainnet strangely.

Could you please share which method worked for you?