I'm cloning the repository of ERC721 and when I compiled I got this error

Compiling contracts/token/ERC721/TDERC721_metadata.cairo
/Users/noraizabid/Downloads/starknet-erc721/contracts/token/ERC721/ERC721_Metadata_base.cairo:9:6: Could not find module ‘openzeppelin.introspection.ERC165’. Searched in the following paths:
/Users/noraizabid/Downloads/starknet-erc721/contracts/openzeppelin/introspection/ERC165.cairo
/Users/noraizabid/Downloads/starknet-erc721/openzeppelin/introspection/ERC165.cairo
/Users/noraizabid/cairo_venv/lib/python3.10/site-packages/openzeppelin/introspection/ERC165.cairo
from openzeppelin.introspection.ERC165 import ERC165_register_interface
^*******************************^

6 Likes

ERC721_Metadata_base.cairo? that looks like a very old version of OpenZeppelin contracts. Why are you cloning and not installing the packages as indicated in the official documentation?

4 Likes

I even installed the package “pip install openzeppelin-cairo-contracts”
but same thing happening…
I just wanted to compile and deploy ERC721 with hardhat or nile…
Guide me in this regard or give me any updated repository

3 Likes

I think you’re working on top a ERC721 repository i don’t know about, and that repo uses an old version of OpenZeppelin Contracts. I don’t recommend downgrading since many old functionality is no longer compatible with current versions of StarkNet (and by looking at the error you’re getting, it’s a quite old version).

This brief ERC20 workshop/tutorial plus this ERC721 docs should help you.

3 Likes