How to confirm that the data on ERC-721 tokens will never change?

Hi guys, i am very new to here. Just start learning smart contract for launching NFT project but i have a question. Most ERC-721 tokens are configured to storage its data(images,text...) on IPFS or some decentralized network but if the contract owner change its baseuri then the data on tokens change too, doesn't it? So how to implement that the data on tokens will never be changed?

Hey,

Short Answer: As a Developer or Project Owner it's up to you to either make it Centralised or Completly Decentralised (Implement the baseURI business logic in a way that makes it impossible to change it or make it modifiable)

If you check the ERC721 you will notice that there's no implementation to update the baseURI and it's up to you how to manage it and it's mentioned that this behavior can be overridden in child contract.

So basically you will end up implementing the setBaseURI function:
1- External function with restricted access (Most projects follow this pattern where the owner can update the baseURI). [Centralised]
2- Static as Internal function where you can set up the baseURI in the constructor or just a static string/constant

1 Like