Flatten contract for verification not using command line

Hey @abcoathup,

Thanks for the reply here.

I’m trying to flatten the ERC721, I’m not sure what if/how the verifying ties into that.

  1. I am unsure if I need to include all the sol files, or some are optional
  2. I know this is blasphemy, but I just can’t touch the command line, it’s not good for my sanity and mental health so i hope you’ll indulge me (i often get insistence like “what, it’s really simple” and 3 hours later I’m still troubleshooting a package manager or some random error). In any case, I tried using Remix but the nested dependencies keep asking for more files and I’m not sure if I even need all of them and I got a bit tangled over there.

So I was mainly wondering if there is an already flattened version, on OZ or one that someone just made. Otherwise, if there is an easier way to do this.

Thanks in advance!

1 Like

Oh wait, are you saying that the contract on etherscan is already flattened and can be grabbed from there?

1 Like

Hi @JayM,

Unfortunately to verify you will need to use the command line.

You will need to convert your GitHub imports to npm imports.

I recommend using Hardhat: Verify smart contract inheriting from OpenZeppelin Contracts

Alternatively (though I recommend multifile verification) you can flatten your contract and encode your constructor parameters using https://abi.hashex.org/

If you get stuck then you can post your Solidity code, the constructor parameters, whether you used the optimizer and the address of the contract (and the network) and someone in the community may be able to help you verify.