@abcoathup @hantuzun @frangio
I compared the costs for both cases : 1. without using
setTokenURI and using predefined metadata vs 2. using
The very vague (might be wrong with 5,000 - 10,000 Gas, not that important) I found is this:
- without setTokenURI, and just using predefined metadata solution costs
154920 for creating new token.
- with setTokenURI, it costs 221474
The difference is 67,000 approximatelly.
My question now…
Question 1 : In my opinion, using predefined
metadata solution, which means, we first upload a directory which contains
3 ,.e.t.c named files(these are metadatas) seems a very bad solution.
- Reason 1: It’s bad because we can’t allow users to come in the future and mint new tokens, because their metadata is not in the ipfs. One can say that we can have the functionality of updating
baseURI , but what guarantee do we have that whoever can update won’t set it to
malicious.com. We can double check for sure, but he wil still be able to update it. which seems to be very wrong. Even using IPNS seems a very bad hack, because, now vice versa situation happens: we update the directory with new metadatas which means we can also upload totally different metadatas(even change the old ones) and now, contract’s
tokenURI will return wrong metadatas. How is this for even a second good solution ? I think the only way this could be a good solution is if we don’t use IPNS and also we don’t have the
updateBASEURI functionality in the contract. This means that with whatever
baseURI we deploy contract, we already have the already predefined metadatas on that baseURI and that’s it.
I’d really much appreciate your final input on this and if there’s something you don’t agree with me about this. I just wanna 100% make sure that i understand every hidden detail…
As we found the difference in gas costs which is 67,000, do you think this difference is really noticeable and worth changing the
setTokenURI solution to predefined metadata solution ? In my opinion, it’s not. So, I’d also love to hear your opinions.
I really appreciate your follow ups on this question.