'set token URI function
I understood that setTokenURI function isn't in use anymore. How can I change the token URI of the NFT token I want to create? for now my function createCollectible inside the smart contract looks like this:
function createCollectible(string memory tokenURI)
public
returns (uint256)
{
uint256 newItemId = tokenId;
_safeMint(msg.sender, newItemId);
_setTokenURI(newItemId, tokenURI);
tokenId = tokenId + 1;
return newItemId;
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
