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)
public
returns (uint256)
{
_tokenIds.increment();
uint256 newItemId = _tokenIds.current();
_mint(player, newItemId);
_setTokenURI(newItemId, tokenURI);
return newItemId;
}
@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
Thanks again
Muchas gracias!
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.