Introducing TaoHe (套盒): Collection of nestable Move resources

TaoHe is a collection of nestable smart contract resources that can be used to create secure on-chain applications on MoveVM blockchains, such as Diem. Resources can be nested like a Russian doll (матрёшка), or Chinese boxes (套盒), the namesake of this project.

Tao is a simple Move resource that has been designed to be nested inside other taos. TaoHe is a collection of taos, and a special Root resource that can be used to store a resource directly into an account (taos themselves can be stored into resources only, for simplicity).

Example: You could place Diem tokens into a time locked tao, and place that inside an NFT tao, effectively creating a non-fungible time locked token.

Keeping code footprint per each tao in minimum is vital for safer code, and is simpler to audit. Keeping taos simple also shifts the code footprint to scripts, which are easier to develop and update than smart contracts (since scripts do not reside on-chain).

You may ask, why not to name the project to something like “move-boxes” (ha, ha, ha!), and the reason is, that “box” (boxing / unboxing) has a different meaning in the world of programming languages, and would just confuse people. The first option was naming after the Russian nesting doll (матрёшка), but it would have been a long name, and hard to write. So, I studied some more of nesting traditions, and stumbled upon 套盒 (never heard of it before, despite learning mandarin for the past year :smiley: ).

Thanks to @damirka for their magnificent Move IDE plug-in for Visual Studio Code :tada:

For more information, documentation, code and instructions on how to contribute, see:


Wow! Definitely gonna visit the website. Glad that you’re using Move IDE!

1 Like

Very cool! Are you using this library in a Move project?


Thanks :slightly_smiling_face: Yep, you are right: this was indeed originally for one of my projects (far from being launched :laughing: ), but then I thought, that this could evolve into something general, like OpenZeppelin is in the Solidity world #modestgoals :laughing:

1 Like