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
1 Answer
You have two options to importing OpenZeppelin contracts in Remix IDE:
- Copy and paste.
- 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.