Authenticating token_uri before minting?

Hey guys,
i'm tinkering with a concept for NFT minting with generative music and art and trying to work out the best way to make sure that people can only mint essentially ‘approved’ content. I.e from the generative tools that I’d provide and that it can’t just have anything added to the token_uri on mint. The image and audio would be generated client side, uploaded to IPFS and then with other relevant attributes get added to token_uri json which is then also uploaded to IPFS and then sent to the contract with the mint transaction.

With ready access to the contract on Etherscan now and a token_uri needing to be generated-off chain it would be easy for someone to put something stupid in and spoil the collection. I guess a minting fee would be something of a deterrent but doesn't actually solve the issue.

What would be a good way to prevent this being possible? Some kind of way of verifying the token_uri being submitted was legit? Looked at doing it with a murkle proof but that relies on knowing all the token_uris upfront. Maybe I am overthinking something that isn't really an issue? Any help / suggestions greatly appreciated. Thanks

Posted Sep 10, 2021, 1:47 PM UTC

11
Double-Code1902•

Depending on the use case and UX you could limit access to those who hold a specific NFT in their wallet granted to authorized users. This would ensure authorized users only.

If an authorized user is your concern (they are still a bad actor and don’t use your software) you could possibly place the NFT after set is generated and loaded to IPFS and then only mint if they have the NFT. The contract could grab the tokenURL from that holders NFT.

1