Marmalade-NG / marmalade-ng

Fork of Marmalade-V2
10 stars 2 forks source link

Collection meta #11

Open CryptoPascal31 opened 6 months ago

CryptoPascal31 commented 6 months ago

The idea behind this PR is to attach meta information to a collection. The metadata is a JSON file referenced by a URI attached to the collection. Once defined, this URI is immutable.

This idea is currently being discussed for Ethereum too: https://eips.ethereum.org/EIPS/eip-7572

Attaching a URI to a collection is still optional. The new version of the collection policy is backward compatible:

The function (create-collection), and event (CREATE-COLLECTION) keep the same signatures.

Two new functions are added:

Once the URI is set with one of the two functions, the URI is immutable and can't be changed.

A new event is added:

Included the JSON schema based on ERC-7572.

Since the DB schema is updated, the collection policy won't bless the previous one. And a migration transaction (signed by the governance) will be required.

daplcor commented 6 months ago

If referencing https://eips.ethereum.org/EIPS/eip-7572 then I am in full agreement, this will be a nice quality of life upgrade for collections. I would also recommend projects store this on a service like s3/digital ocean as you may want to update graphics down the road.