You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Update documentation for uniques (This PR renames classes and instances to collections and items in the Uniques pallet in order to follow the commonly accepted NFTs terminology.) (#13322)
* Update documentation for uniques
The documentation was outdated after merge of #11389
Using the widely spread term collections and item instead
of the previous class and instance.
* Update README.md
---------
Co-authored-by: Jegor Sidorenko <[email protected]>
Co-authored-by: Jegor Sidorenko <[email protected]>
Copy file name to clipboardExpand all lines: frame/uniques/README.md
+39-35Lines changed: 39 additions & 35 deletions
Original file line number
Diff line number
Diff line change
@@ -4,67 +4,71 @@ A simple, secure module for dealing with non-fungible assets.
4
4
5
5
## Overview
6
6
7
-
The Uniques module provides functionality for asset management of non-fungible asset classes, including:
7
+
The Uniques module provides functionality for non-fungible tokens' management, including:
8
8
9
-
* Asset Issuance
10
-
* Asset Transfer
11
-
* Asset Destruction
9
+
* Collection Creation
10
+
* Item Minting
11
+
* Item Transfers
12
+
* Item Trading methods
13
+
* Attributes Management
14
+
* Item Burning
12
15
13
-
To use it in your runtime, you need to implement the assets [`uniques::Config`](https://paritytech.github.io/substrate/master/pallet_uniques/pallet/trait.Config.html).
16
+
To use it in your runtime, you need to implement [`uniques::Config`](https://paritytech.github.io/substrate/master/pallet_uniques/pallet/trait.Config.html).
14
17
15
18
The supported dispatchable functions are documented in the [`uniques::Call`](https://paritytech.github.io/substrate/master/pallet_uniques/pallet/enum.Call.html) enum.
16
19
17
20
### Terminology
18
21
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 existence and there is exactly one owning account.
22
+
***Collection creation:** The creation of a new collection.
23
+
***Item minting:** The action of creating a new item within a collection.
24
+
***Item transfer:** The action of sending an item from one account to another.
25
+
***Item burning:** The destruction of an item.
26
+
***Non-fungible token (NFT):** An item for which each unit has unique characteristics. There is exactly
27
+
one instance of such an item in existence and there is exactly one owning account.
24
28
25
29
### Goals
26
30
27
31
The Uniques pallet in Substrate is designed to make the following possible:
28
32
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
33
+
* Allow accounts to permissionlessly create NFT collections.
34
+
* Allow a named (permissioned) account to mint and burn unique items within a collection.
35
+
* Move items between accounts permissionlessly.
36
+
* Allow a named (permissioned) account to freeze and unfreeze unique items within a
37
+
collection or the entire collection.
38
+
* Allow the owner of an item to delegate the ability to transfer the item to some
35
39
named third-party.
36
40
37
41
## Interface
38
42
39
43
### 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.
44
+
*`create`: Create a new collection by placing a deposit.
45
+
*`transfer`: Transfer an item to a new owner.
46
+
*`redeposit`: Update the deposit amount of an item, potentially freeing funds.
43
47
*`approve_transfer`: Name a delegate who may authorise a transfer.
44
48
*`cancel_approval`: Revert the effects of a previous `approve_transfer`.
45
49
46
50
### 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
+
*`destroy`: Destroy a collection.
52
+
*`mint`: Mint a new item within a collection.
53
+
*`burn`: Burn an item within a collection.
54
+
*`freeze`: Prevent an individual item from being transferred.
51
55
*`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
+
*`freeze_collection`: Prevent all items within a collection from being transferred.
57
+
*`thaw_collection`: Revert the effects of a previous `freeze_collection`.
58
+
*`transfer_ownership`: Alter the owner of a collection, moving all associated deposits.
59
+
*`set_team`: Alter the permissioned accounts of a collection.
56
60
57
61
### 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.
62
+
*`set_attribute`: Set an attribute of an item or collection.
63
+
*`clear_attribute`: Remove an attribute of an item or collection.
64
+
*`set_metadata`: Set general metadata of an item.
65
+
*`clear_metadata`: Remove general metadata of an item.
66
+
*`set_collection_metadata`: Set general metadata of a collection.
67
+
*`clear_collection_metadata`: Remove general metadata of a collection.
64
68
65
69
### 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.
70
+
*`force_create`: Create a new collection.
71
+
*`force_asset_status`: Alter the underlying characteristics of a collection.
68
72
69
73
Please refer to the [`Call`](https://paritytech.github.io/substrate/master/pallet_uniques/pallet/enum.Call.html) enum
70
74
and its associated variants for documentation on each function.
0 commit comments