Implementing ERC721Metadata in ERC721

Hi, there! I’m trying to deploy a simple ERC721 NFT contract guided by de documentation, but I’m having a problem with the function _setTokenURI(newItemId, tokenURI).
I’m not sure how to use the ERC721Metada, should I create a json file and import it in my contract file or am I getting all the wrong way?

contract UniqueArt is ERC721 {

 using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
constructor() ERC721("UniqueArt", "MNFT") {}

 function tokenURI(uint256 _tokenId) external view returns (string);

         function awardItem(address player, string memory tokenURI)
    returns (uint256)

    uint256 newItemId = _tokenIds.current();
    _mint(player, newItemId);
    _setTokenURI(newItemId, tokenURI);

    return newItemId;


1 Like

Hey! welcome!

I think you can have a look at the documentation: ERC721 - OpenZeppelin Docs


Hi @Paula,

Welcome to the community :wave:

I suggest using the OpenZeppelin Contracts Wizard:

@Skyge @abcoathup Hey guys! Thank you so much for the support.
I’ve been reading the docs and realized what I was missing: all the library is available in the node_modules, it’s awesome. I’m just getting started.
I’ll probably be back soon with more questions :nerd_face:
Thanks again

1 Like

Feel free to answer your questions.

bienvenida! :argentina:
preguntá cualquier cosa :slight_smile:

1 Like

Muchas gracias! :slight_smile:
Estoy terminando un bootcamp orientado a JavaScript y cerramos con un pequeño proyecto, desarrollando una dapp que integra una corte descentralizada.
Estoy familiarizandome de a poco con esta libreria que está tremenda.

1 Like