Verify a NFT collection smart contract minted using Rarible UI?

Hello OpenZeppelin Community,

I am turning to you after a few days of desperate googling trying to get a smart contract verified on Etherscan.
I am not a developer, I minted a NFT collection contract (0xf453f48b01ed3da95429571f176f407ed4583ab8) using Rarible UI, and I also want to list the upcoming collection on a different marketplace. To list on the other marketplace, I need the contract to be verified. To get the contract verified, I need a few information (Compiler Type and Compiler Version) and also the source code. I thought those information would be easy to get since everything is open source, but I haven’t been able to find that anywhere and so far nobody was able to help on the Rarible Discord.

Probably a long shot, but someone mentioned the OpenZeppelin community might be able to help, so here I am :slight_smile:

Hi, welcome! :wave:

Yeah, you are right, when you want to verify a contract, you should know the contract code, the configs about the compiler and the contract address, if I do not know these message, I can't make bricks without straw.

Hi @Skyge, thanks for coming back to me!
An do you know by any chance if there is a way to get this information in my situation?

So who deployed this contract? The developer of the Rarible?

Indirectly yes I guess, but it has been done automatically when I used the "Create" function from the UI to create a new collection.

This contract was created during this transaction. It was created by the ERC721RaribleFactoryC2 using function createToken

You can see that your contract is a BeaconProxy produced using this exact code. Compiler version is the same as the parent: v0.7.6+commit.7338295f with 200 runs of optimization.

With that, you should be able to verify the proxy ... which by itself will not get you very far.

The beacon for this proxy is not verified. We could try assuming its an unmodified OZ with the same compiler settings, but we have no guarantee about that.

The beacon implementation() points to this contract which contains the actual logic you are using, and which is verified.

So for complete transparency you should:

  • verify the code of your instance (pretty easy with the elements I shared)
  • ask that rarible verifies the code of there beacon
    I plus would be for etherscan to support beacons proxy, but that could take a while.

Hi @Amxx , thanks a lot for your help, very much appreciated :pray:

I tried to complete step one to start: I copied the BeaconProxy.sol code from here and try to run the verification using compiler version v0.7.6+commit.7338295f with 200 runs of optimization.
However, I am getting an error: "Error! Unable to generate Contract ByteCode and ABI (General Exception, unable to get compiled [bytecode])".
See screenshot below for more details. Do you know what am I doing wrong?
Really sorry to bother you with that, not being a developer those days is a big liability!

Have you read our resources about verification? Look for the section about "File import callback not supported".

1 Like

When I see your shared screenshot for the issues why it is not published now , It says your contract code has includes non-existing proxy contract now. So you need to consider that contract source. Please use openzepplin's proxy contract module.

1 Like

Thanks all for your help. I ended up forgetting about the Rarible contract and setup a new one using some open source code and tutorials, and it worked out well!