1

I have an older ERC721 collection that I want to update to be hosted on IPFS, Is that something that is possible? The collection is just on testnet and only owned by friends and family so is mainly for learning purposes.

The tokenURI of the nfts in the collection point to data:application/json;base64,... the image is an svg. From what I can gather I need to change the server the TokenURI is pointing to, so what I'm trying to find an answer for is how to figure out where it currently points to? and then how to change it? Or if for this to be possible would I have to have pre-coded the ability to change the TokenURI into the contract already?

Thanks

This is the only similar question I can find but it doesn't give me an answer to my question MIgrate a NFT to IPFS after minting?

1
  • Well that depends on the implementation. Which specific contract are we considering? Commented Aug 22, 2022 at 11:41

1 Answer 1

1

If you had written you NFT contract by following ERC721 standard then you won't be able to update the tokenURI.

I'm trying to find an answer for is how to figure out where it currently points to?

You should be able to find the URI of the token by passing the tokenId to contract's tokenURI function.

and then how to change it? Or if for this to be possible would I have to have pre-coded the ability to change the TokenURI into the contract already?

You won't be able to change the URI of the token. But if you want to have that kind of functionality you can implement the function using which you can update/migrate your metadata to IPFS or any other server. (NOTE : This is not advisable as once the NFT is in the market or with the diferent owner, no one should be able to alter the NFT's data.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.