Unable to generate Contract ByteCode and ABI • BSC

Hi Magnus,
I found a solution! Just change your import... refer below

The key is:

  1. Use import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
  2. do not use import http link, it will work on Remix
  3. Use Remix flattener plug in to flatten the file.
  4. Remove all the extra pragma and license
  5. Might have some error due to sequence of each openzeppelin code chunk, just re-organize it.
  6. deploy the flattened .sol file
  7. On BSCscan page, use single file verification
  8. Copy the flattened .sol
  9. Do not use optimization
  10. Should be ok. I get it verified on testnet and mainnet
    https://testnet.bscscan.com/address/0x718c35c014f8cdc2b6ee810dab44a4da8cb40887#code
    https://bscscan.com/address/0x07dafaf783bc253ac310692856e863b659d8f3ca#code
1 Like