|
| 1 | +# Uniques Module |
| 2 | + |
| 3 | +A simple, secure module for dealing with non-fungible assets. |
| 4 | + |
| 5 | +## Overview |
| 6 | + |
| 7 | +The Uniques module provides functionality for asset management of non-fungible asset classes, including: |
| 8 | + |
| 9 | +* Asset Issuance |
| 10 | +* Asset Transfer |
| 11 | +* Asset Destruction |
| 12 | + |
| 13 | +To use it in your runtime, you need to implement the assets [`uniques::Config`](https://docs.rs/pallet-uniques/latest/pallet_uniques/pallet/trait.Config.html). |
| 14 | + |
| 15 | +The supported dispatchable functions are documented in the [`uniques::Call`](https://docs.rs/pallet-uniques/latest/pallet_uniques/pallet/enum.Call.html) enum. |
| 16 | + |
| 17 | +### Terminology |
| 18 | + |
| 19 | +* **Asset issuance:** The creation of a new asset instance. |
| 20 | +* **Asset transfer:** The action of transferring an asset instance from one account to another. |
| 21 | +* **Asset burning:** The destruction of an asset instance. |
| 22 | +* **Non-fungible asset:** An asset for which each unit has unique characteristics. There is exactly |
| 23 | + one instance of such an asset in existance and there is exactly one owning account. |
| 24 | + |
| 25 | +### Goals |
| 26 | + |
| 27 | +The Uniques pallet in Substrate is designed to make the following possible: |
| 28 | + |
| 29 | +* Allow accounts to permissionlessly create asset classes (collections of asset instances). |
| 30 | +* Allow a named (permissioned) account to mint and burn unique assets within a class. |
| 31 | +* Move asset instances between accounts permissionlessly. |
| 32 | +* Allow a named (permissioned) account to freeze and unfreeze unique assets within a |
| 33 | + class or the entire class. |
| 34 | +* Allow the owner of an asset instance to delegate the ability to transfer the asset to some |
| 35 | + named third-party. |
| 36 | + |
| 37 | +## Interface |
| 38 | + |
| 39 | +### Permissionless dispatchables |
| 40 | +* `create`: Create a new asset class by placing a deposit. |
| 41 | +* `transfer`: Transfer an asset instance to a new owner. |
| 42 | +* `redeposit`: Update the deposit amount of an asset instance, potentially freeing funds. |
| 43 | +* `approve_transfer`: Name a delegate who may authorise a transfer. |
| 44 | +* `cancel_approval`: Revert the effects of a previous `approve_transfer`. |
| 45 | + |
| 46 | +### Permissioned dispatchables |
| 47 | +* `destroy`: Destroy an asset class. |
| 48 | +* `mint`: Mint a new asset instance within an asset class. |
| 49 | +* `burn`: Burn an asset instance within an asset class. |
| 50 | +* `freeze`: Prevent an individual asset from being transferred. |
| 51 | +* `thaw`: Revert the effects of a previous `freeze`. |
| 52 | +* `freeze_class`: Prevent all asset within a class from being transferred. |
| 53 | +* `thaw_class`: Revert the effects of a previous `freeze_class`. |
| 54 | +* `transfer_ownership`: Alter the owner of an asset class, moving all associated deposits. |
| 55 | +* `set_team`: Alter the permissioned accounts of an asset class. |
| 56 | + |
| 57 | +### Metadata (permissioned) dispatchables |
| 58 | +* `set_attribute`: Set a metadata attribute of an asset instance or class. |
| 59 | +* `clear_attribute`: Remove a metadata attribute of an asset instance or class. |
| 60 | +* `set_metadata`: Set general metadata of an asset instance. |
| 61 | +* `clear_metadata`: Remove general metadata of an asset instance. |
| 62 | +* `set_class_metadata`: Set general metadata of an asset class. |
| 63 | +* `clear_class_metadata`: Remove general metadata of an asset class. |
| 64 | + |
| 65 | +### Force (i.e. governance) dispatchables |
| 66 | +* `force_create`: Create a new asset class. |
| 67 | +* `force_asset_status`: Alter the underlying characteristics of an asset class. |
| 68 | + |
| 69 | +Please refer to the [`Call`](https://docs.rs/pallet-assets/latest/pallet_assets/enum.Call.html) enum |
| 70 | +and its associated variants for documentation on each function. |
| 71 | + |
| 72 | +## Related Modules |
| 73 | + |
| 74 | +* [`System`](https://docs.rs/frame-system/latest/frame_system/) |
| 75 | +* [`Support`](https://docs.rs/frame-support/latest/frame_support/) |
| 76 | +* [`Assets`](https://docs.rs/pallet-assets/latest/pallet_assetss/) |
| 77 | + |
| 78 | +License: Apache-2.0 |
0 commit comments