DEV Community

Discussion on: Deploy NFTs with Truffle, IPFS OpenSea & Polygon

Collapse
mmintel profile image
Marc Mintel

hey there, nice article! one question though: if you pass the URI to the mint function it's possible for anybody to inject ANY metadata to your contract. How would you avoid this?

Collapse
yournewempire profile image
Archie Smyth Author

Hi Marc. The mint function can only be called by you, the owner of the contract, as programmed by the modifier 'onlyOwner'. You could set your own customised modifiers. Perhaps I have misunderstood you.