Candy-Labs / CandyContracts

Open-source NFT contract implementations
MIT License
11 stars 7 forks source link

Support PermanentURI Contract Events for OpenSea Frozen Metadata #4

Closed kyokosdream closed 2 years ago

kyokosdream commented 2 years ago

The contract should support indicating that the metadata is frozen:

https://docs.opensea.io/docs/metadata-standards#freezing-metadata

It's not entirely clear how this is enforced, since emitting such an event has no bearing on whether the baseURI can be changed. I believe that it's "enforced" by OpenSea just never allowing the metadata to change on their marketplace, but this has no bearing on other marketplaces.

We should also add support for Arweave and Filecoin moving forward and allow users to set a provenance hash. Provenance hashing was included in an earlier unreleased version of the contract but removed since beginners have no easy way of generating a provenance hash, and many projects seem to disregard it's importance or aren't interested in including it.

event PermanentURI(string _value, uint256 indexed _id);

You can clearly see that the event they instruct users' contracts to emit takes the tokenId as a parameter. In my personal opinion, the entire collection should be marked as permanent. It doesn't make sense for some of the user's tokens to be marked as permanent while others are not. It may also be very expensive in terms of gas to emit this event for every token in the collection.

OpenSea says to contact them to mark an entire collection as frozen, which seems a terrible way to handle things.

kyokosdream commented 2 years ago

I believe only an entire collection should be marked as frozen, and the gas costs to emit this event for a large collection (10,000 tokens or similar) just doesn't make sense.

If users want to make their metadata more "permanent" we should just use Arweave.