Installation of openzeppelin/contracts Library

1.3k views Asked by At

I have created a node.js project, within which I have created a truffle directory and initialised its project. I have installed the openzeppelin (npm install @openzeppelin/contracts) library in this truffle project directory, but nothing appears to have been installed, although I did not received any error during the install process. The import statement in my project displays the error hereafter:

import "@openzeppelin/contracts/token/ERC721/ERC721Full.sol";

Source "@openzeppelin/contracts/token/ERC721/ERC721Full.sol" not found: File import callback not supported

2

There are 2 answers

0
user938363 On

Try this:

import "github.com/openzeppelin/contracts/token/ERC721/ERC721Full.sol"
0
Intenex On

It looks like they changed the name, and now the contract name is

ERC721.sol and not ERC721Full.sol, so try

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";