I cant verify my contract on BSCScan

Hi, i have a problem if i try to verify my contract source code i get this error:

ParserError: Source "@openzeppelin/contracts/token/ERC20/ERC20.sol" not found: File import callback not supported
--> myc:5:1:
|
5 | import "@openzeppelin/contracts/token/ERC20/ERC20.sol"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

i am using this contract:

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

contract MonopolyCoin is ERC20 {
    constructor() ERC20("MonopolyCoin", "MONO") {
        _mint(msg.sender, 25000000000000 * 10 ** decimals());
    }
}

Can someone help me?

Hi, welcome! :wave:

Maybe you can have a look at this tutorial:

1 Like

thanks for the help. I tried to flatten my contract. the source code was fine, after I flatten it, I can't compile it anymore it shows the following errorr


trying to figure it out all night. any help would be great.
thanks

I think you should reorder the contracts, and maybe you can have a look at this tutorial: