Cant verify SmartContract on bscscan nor on remix

There is a problem with verification of smart contracts deployed from Remix.

You need to select the “multi flies” option. (don’t remember the right naming) and upload all imported libraries as independent files. Or you can use Single File option, but you need to flatten all contracts in one

I dont need anyone else to verify my contract
i want to do it myself
and also flattening didnt do anything, it gives me errors when i try to compile the flattened contract

and dependencies as well

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

It’s easier to use truffle with “auto verify” plugin

flattening didnt work

I just wanted to take a look. You will do it by yourself :man_mechanic:

you just verified it, didnt you?

No, I didn’t

You can take a look at how it looks in exmaple token:

All imported libraries end up as one file

what am i looking at here

That may be, but flattening didnt work for my contract
Also the code was written in 0.8.2 and after flattening it was 0.8.0 version

If you would jsut make a video it would also help more than 100s of messages

Besides after flattening i had after every contract isntance pragma solidity 0.8.0 and the spdf identifier

Why do you tell me to use those imports aswell when i obviously dont need them, the contract works without those imports and as you see my contract was verified aswell without those imports, so why are you telling me i need to use them?

The imports are meant to make your code a little more easier to use. Once compiled, all the code comes into a single file anyway. If you manually add all your code into a single file, you don’t need to add the imports. Its just a standard way of development that developers follow.

Looks like your contract is verified on bscScan right now. Is there anything else you’d like to clear up or does everything work good?

Looking forward to your response! :slight_smile:

Apperently bscscan verifies some standard contracts automatically, so I still dont know how to verify a contract with imports

Hi, Can you verify my contract on bscscan?

What kind of smart contract you have?

https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol bsc

It should be easy, can you post what imports it uses?

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

I can look in 1-2 hours