Allowing contracts to carry metadata is a good idea. Software licenses seems like a very sensible field to carry but others could be helpful as well including
- original source code and compiler version, if compiling from a high level language
- documentation
- contact information
This could take the form of a pair between
- the hash of a RDF document
- a URI where the document can be retrieved
This pair could be programmatically updatable from the contract. That way, it can be changed, but there’s a clear trace of what it was at different point in time. For instance, the user of a contract can retrieve and store the license at the time they use it for later proof. Alternatively, a simpler standard would have the pair remain unchanged after origination.
Suggested roadmap:
- start by embedding an IPFS hash as an annotation at the beginning of contracts
- develop an ontology for talking about the metadata in OWL or RDFS. Keep it simple to start with. Ontologies of licenses most likely already exist but the way
- as part of a protocol upgrade, introduce a proper field for URI + hash
- optional: introduce a michelson operation to change that field