Code to reproduce
I am using hardhat latest version to import openzepplin ERC721Enumerable on VS CODE and keep getting this error.
Not found: File import callback not supported @openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./IWhitelist.sol";
Environment
Using hardhat version 2.10.1 and dependencies @openzeppelin/contracts": "^4.7.2".
Hi.
I used these imports in the project and it compiles fine. Could you explain where you get that error and provide screenshots if you don't mind.
t's not show error on compile time but when I tried to verify using contract address then shows error
Failed to verify: Error calling ERC721 tokenURI() in contract for Token ID 1
If it's an error with verification then there is no problem with what you have provided. Looks like you are doing a course in LearnWeb3DAO.
I suggest to ask questions there instead of here. You can join their discord here.
As a crash support, you need to mint 1 token and then verify
1 Like
Thanks for your help and guidance
1 Like
Hehehe, this came out funny but then you are right.
1 Like
just move the @openzeppelin folder from node_modeule folder to your contracts working folder .
then import like ./ refering to current folder ,
import "./@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "./@openzeppelin/contracts/access/Ownable.sol";
then the error will go away