RMRK 2.0 - Return to the Nest (Shoving NFTs into the Backpack)
Fumbling My Way Through RMRK 2.0 - SEND Interaction
If you have a RMRK 2.0 NFT with nested children you can remove them by selecting and clicking Move to root.
For now you can't reverse the process in the UI and nest an NFT as a child again or essentially put it back in the backpack.
Luckily it's a good way to dive in and learn how to do it on-chain. Which is exactly what I did.
For this example I'll use Tricky's RMRK Experience, the OG edition came with 5 Promo variants of the Experience nested within.
Once removed there is no way in the UI to put them back. :(
To do it on chain, you need to use the SEND interaction, the format from the RMRK 2.0 standards is:
0x{bytes(rmrk::SEND::{version}::{id}::{recipient})}
What you do is essentially send one NFT to another NFT, if both NFTs are owned by the same account this is a very simple process.
So first we need to construct a string as below:
RMRK::SEND::2.0.0::[ID of Sent NFT (Child)]::[ID of Recipient NFT (Parent)]
Note that the sent NFT becomes a child of the recipient NFT.
The square brackets are placeholders, you substitute with the intended NFT's IDs.
The NFT's ID can be found in it's Attributes or at the end of it's URL.
I will use the ID's of my own as an example to step through the process.
I am sending the Promo to the OG. So the Promo becomes a child of the parent OG. Another way of thinking about this is I'm putting the Promo into the OG.
RMRK::SEND::2.0.0::11651616-388c3c690f11554553-RMRK2XP-Tricky_Promo-00000042::11651551-388c3c690f11554553-RMRK2XP-TRICKY_OG-00000042
Now you need to submit a transaction with this remark extrinsic on-chain.
To do that this then needs to be converted to hex, you can use the following site:
https://onlineutf8tools.com/convert-utf8-to-bytes
Make sure to untick Spaces Between Bytes.
Now go to:
https://polkadot.js.org/apps/
Obviously make sure you're on Kusama as your network and on the top menu select Developer > Extrinsics
-
Select the account, make sure this is also the owner of the NFTs
-
Select
system
- Select
remark(remark)
-
Type a prefix of 0x for hex, then paste the converted string from earlier after it.
-
Submit the transaction and Sign & Submit in the next window. Then approve in your favourite wallet ;).
If you have the NFT open in Singular you may see this pop up.
If all went well you should now see the NFT as a child in the parent NFT's backpack.
Great Success!
Also if you view the child NFT you should see the text In inventory of: with a clickable link through to the parent.
So now you're done, I'll pull back the curtain.
The move to root interaction you can do through the UI is just sending the NFT to your KSM address instead of another NFT. You can check the extrinsic in a block explorer.
You can do even more with SEND but that is a story for another time.
Do this at your own risk, I suggest experimenting with cheaper NFTs to make yourself familiar with the process with lower risk.
For the RMRK standards for the SEND interaction refer to their github:
https://github.com/rmrk-team/rmrk-spec/blob/master/standards/rmrk2.0.0/interactions/send.md
Thanks to
Tricky for the puzzles and things to play with
RMRK for building the coolness
As always Wag and Polka Haus for inspiring content