Rename storage methods to follow the commonly accepted NFTs terminology.#13325
Rename storage methods to follow the commonly accepted NFTs terminology.#13325simonsso wants to merge 1 commit intoparitytech:masterfrom simonsso:patch-4
Conversation
This PR renames classes and instances to collections and items in the Uniques pallet in order to follow the commonly accepted NFTs terminology. PR #11389 renamed the extrinsics but storage helpers kept old names
|
|
||
| #[pallet::storage] | ||
| #[pallet::storage_prefix = "Class"] | ||
| #[pallet::storage_prefix = "Collection"] |
There was a problem hiding this comment.
We only set the storage_prefix to have the better name Collection inside the rust implementation without requiring a migration. Your proposed changes here require a migration.
There was a problem hiding this comment.
I created this PR because the current naming is not consistent. In one interface (extrinsics) it was refereed to as Collections and items and in the rpc interface there were suddenly called Classes and instances. I only discovered this when I saw the mismatch in documentation of #13322
I think the changes made in #11389 should have renamed these interfaces as well.
Pros: It gives a better experience for the users (developers) where it is easy to understand the connection
Cons: It is a change and it will break things.
Anyhow @bkchr I think you have a better view about the impact and implications here so I will trust your judgement if you don't want to do this, just pointing out the inconsistency which made me confused. Please handle it as you see fit.
Your proposed changes here require a migration.
@bkchr, So this is not only the name of the getter function, does this macro also declare the storage name?
There was a problem hiding this comment.
does this macro also declare the storage name?
Yes. storage_prefix in this case is the storage name.
There was a problem hiding this comment.
@bkchr Is it possible to have meaningful names in the external API which out chaining the internal storage
|
Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions. |

This PR renames classes and instances to collections and items in the Uniques pallet in order to follow the commonly accepted NFTs terminology.
PR #11389 renamed the extrinsics but storage helpers kept old names