I am trying to import a couple of OpenZeppelin contracts to my project, but each time I am given an error related to unsuccessful imports from sources. I'm gonna attach a screenshot of my code. I have to mention that I am using Macos and I have installed NPM package of OpenZeppelin via terminal, although it's not visible in my node_modules folder. Could anyone help me with a proper way of importing OpenZeppeli contracts on Remix? Thanks in advance enter image description here enter image description here

1 Answer 1


You have two options to importing OpenZeppelin contracts in Remix IDE:

  1. Copy and paste.
  2. Import with github links.

So if you write:

import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/math/SafeMath.sol";

That should be fine.

  • My pleasure. Can you mark my answer as correct? Aug 27, 2021 at 13:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.