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

#3 in #fungible

Download history 635/week @ 2024-07-25 586/week @ 2024-08-01 423/week @ 2024-08-08 618/week @ 2024-08-15 729/week @ 2024-08-22 413/week @ 2024-08-29 338/week @ 2024-09-05 381/week @ 2024-09-12 305/week @ 2024-09-19 704/week @ 2024-09-26 445/week @ 2024-10-03 499/week @ 2024-10-10 1065/week @ 2024-10-17 933/week @ 2024-10-24 985/week @ 2024-10-31 10288/week @ 2024-11-07

13,378 downloads per month
Used in 12 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–34MB
~555K SLoC