23 releases (major breaking)

21.0.0 Sep 26, 2024
20.0.0 Jul 18, 2024
18.0.0 Jul 12, 2024
17.0.0 Jun 24, 2024
0.1.0-dev.2 Jul 27, 2023

#2 in #fungible

Download history 598/week @ 2024-08-26 235/week @ 2024-09-02 429/week @ 2024-09-09 277/week @ 2024-09-16 574/week @ 2024-09-23 503/week @ 2024-09-30 468/week @ 2024-10-07 824/week @ 2024-10-14 1038/week @ 2024-10-21 941/week @ 2024-10-28 759/week @ 2024-11-04 20445/week @ 2024-11-11 24870/week @ 2024-11-18 27785/week @ 2024-11-25 22500/week @ 2024-12-02 27447/week @ 2024-12-09

103,819 downloads per month
Used in 13 crates (4 directly)

Apache-2.0

3MB
50K SLoC

Lock NFT

Lock an NFT from pallet-nfts and mint fungible assets from pallet-assets.

The NFT gets locked by putting a system-level attribute named Locked. This prevents the NFT from being transferred further. The NFT becomes unlocked when the Locked attribute is removed. In order to unify the fungible asset and unlock the NFT, an account must hold the full issuance of the asset the NFT was fractionalised into. Holding less of the fungible asset will not allow the unlocking of the NFT.

Release

Polkadot SDK stable2409


lib.rs:

NFT Fractionalization Pallet

This pallet provides the basic functionality that should allow users to leverage partial ownership, transfers, and sales, of illiquid assets, whether real-world assets represented by their digital twins, or NFTs, or original NFTs.

The functionality allows a user to lock an NFT they own, create a new fungible asset, and mint a set amount of tokens (fractions).

It also allows the user to burn 100% of the asset and to unlock the NFT into their account.

Functions

  • fractionalize: Lock the NFT and create and mint a new fungible asset.
  • unify: Return 100% of the asset and unlock the NFT.

Dependencies

~18–32MB
~532K SLoC