Working with Parity to align RMRK pallet as close as possible #214
Yuripetusko
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There are three main features of RMRK pallet that unique v1 doesn't have.
We've been chatting with @jsidorenko from Parity for ways to add these features to uniques v2 to support RMRK functionality, while keeping uniques as generic as possible
Resources
Since resources in RMRK standard cannot be simple uint/string values, we can save them as Structs. i.e.
ResourceStruct{id: 1, part_id: 1, base_id: 1, metadata: 'ipfs://...', collection_whitelist: [0, 2, 42]}
Then when a pallet validation or JS need to get them back it can be done by calling
decode(value, ResourceStruct)
This way we can save resources in existing uniques
Attributes
storage without the need for any new storageNesting
This is being discussed and worked on, the main bottleneck is expensive traversing down the tree during certain operation like
burn
, we can perhaps set a limit to recursion and throw if it's too deep, to force user to un-bundle the nesting before performing this. But this is still TBDEquip
Given the Resource struct in Attribute storage, the only thing left for
equip
method to correctly validate is to decode the Resource struct of a child NFT that is being equipped, and check if parent NFT has compatible resource struct of type of Base with matchingbase_id
andslot_id
andcollection_whitelist
Let me know if I am missing anything from RMRK spec ?
Beta Was this translation helpful? Give feedback.
All reactions