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

#4 in #nft

Download history 360/week @ 2024-07-06 858/week @ 2024-07-13 422/week @ 2024-07-20 756/week @ 2024-07-27 387/week @ 2024-08-03 539/week @ 2024-08-10 842/week @ 2024-08-17 602/week @ 2024-08-24 228/week @ 2024-08-31 448/week @ 2024-09-07 265/week @ 2024-09-14 560/week @ 2024-09-21 526/week @ 2024-09-28 379/week @ 2024-10-05 763/week @ 2024-10-12 1118/week @ 2024-10-19

2,913 downloads per month
Used in 8 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

~17–32MB
~532K SLoC