Closed Ajinkya-kamble7 closed 3 months ago
@ajinkyablockchain there are a few typos in your imports. should be:
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
You also need to inherit ERC721
, asides from ERC721URIStorage
and Ownable
. You should check out our Wizard tool, which will make it easier to get a working implementation: https://wizard.openzeppelin.com/#erc721
π» Environment
π Details
Error:
[{ "resource": "/D:/NFT/contracts/MyNft.sol", "owner": "solidity-language-server", "code": "6275", "severity": 8, "message": "Source \"@openzeppelin/contract/token/ERC721/extensions/ERC721URIStorage.sol\" not found: File not found. Searched the following locations: \"\".", "source": "solidity", "startLineNumber": 8, "startColumn": 1, "endLineNumber": 8, "endColumn": 78 }]
π’ Code to reproduce bug