Be Able to Lock Descriptions
Motivation
From a collectors point of view, it is often important to be sure that all characteristics of an asset are immutable to establish the permanency of the object being traded. For this reason there is a strong demand from the community to add the possibility to lock the description of an asset. This feature is easy to implement, without any side effects, and without any consequences for existing assets.
Design
To lock an asset, there are currently two possibilities: perform an issuance
with the description equal to "lock" or directly pass the parameter lock=True
. When an Asset is locked, however, it is still possible to modify the description.
- Since there are two ways to lock an asset, the idea is to now use one of the two methods to specifically lock the description:
- If
description=lock
, it means that the description should be locked. - If
lock=True
, we lock only the quantity (as it is done today).
- If
- A
description_locked
field will be added to theissuances
table. - The
issuances.validate
function will be modified to check that ifdescription_locked
is equal toTrue
, the description must be necessarily equal toNone
. - A protocol change
lockable_description
will be added in theprotocol_changes.json
file.
API Changes
No API changes, except for the documentation to indicate that description=lock
causes description only to be locked.
Database Changes
A description_locked
field will be added to the issuances
table.