Cannot download the complete openzeppellin library in remix desktop

I am trying to test eth-infinitism contracts on my remix desktop.

But I can't get it to download your complete library.

I have copied them from the official repository and of course I have not touched any files. However I suspect this is not the best way to test these contracts.

Hey @Cainuriel,

In your firest example, the openzeppelin/.../Create2.sol is missing a @ at the beginning.

I'm not sure about the second one but my best guess is that you may have a mismatched version in Remix. This usually happens because it caches versions depending on the imported files. Best practice in remix is to specify the version as:

import "@openzeppelin/contracts/v4.8.2/..."

Where v4.8.2 is the latest at the moment of writing.

Is it possible you can share a URL to remix with a minimal reproducible example? So I can confirm it's the version cache.

I have made the indicated corrections with the same result.

What type of URL would you like me to share with you?
I am using Remix desktop.

Oh sorry, my bad, I made a mistake with the import line, it should be:

import "@openzeppelin/contracts@4.8.2/..."

What type of URL would you like me to share with you?
I am using Remix desktop.

I was referring to URLs with encoded code, but I thought there was an option for generating them.
If the @4.8.2 doesn't work, I think it'll be fine to just share the files if you want.

Dont worry

Same result:


If you wish to have the code I have used the standard shared by its creators:
Here is SimplleAccount.sol:

And here is SimpleAccountFactory.sol:

1 Like

Thanks for sharing @Cainuriel.

I can't clearly see the issue without looking at the folder structure, but my guess is that it's still either a version mismatch (you have to change all the @openzeppelin/contracts imports to @4.8.2), or that you're missing some files, I see you reordered the original code.

Luckily, the dependencies are cached by workspace on Remix as referred in the docs, so it may be worth starting a new workspace from scratch so you can get the newest versions.

My recommendation would be using the Clone repository option, it'll create a new Workspace from scratch, so the dependencies should match, and you can start testing or extending from there:

Best

Fantastic! @ernestognw, easy solution.
This happens because I don't know the tool well.
With cloning everything compiled perfectly.

1 Like