git.delta.rocks / unique-network / refs/commits / 01c2c9e3dbbd

difftreelog

doc(rmrk): style + minor revisions

Farhad Hakimov2022-07-22parent: #0e74039.patch.diff
in: master

3 files changed

modifiedpallets/proxy-rmrk-core/src/lib.rsdiffbeforeafterboth
49//! - FAQ: <https://coda.io/@rmrk/faq>49//! - FAQ: <https://coda.io/@rmrk/faq>
50//! - Substrate code repository: <https://github.com/rmrk-team/rmrk-substrate>50//! - Substrate code repository: <https://github.com/rmrk-team/rmrk-substrate>
51//! - RMRK specification repository: <https://github.com/rmrk-team/rmrk-spec>51//! - RMRK specification repository: <https://github.com/rmrk-team/rmrk-spec>
52//! 52//!
53//! ## Terminology53//! ## Terminology
54//! 54//!
55//! For more information on RMRK, see RMRK's own documentation.55//! For more information on RMRK, see RMRK's own documentation.
56//! 56//!
57//! ### Intro to RMRK57//! ### Intro to RMRK
58//! 58//!
59//! - **Resource:** Additional piece of metadata of an NFT usually serving to add 59//! - **Resource:** Additional piece of metadata of an NFT usually serving to add
60//! a piece of media on top of the root metadata (NFT's own), be it a different wing 60//! a piece of media on top of the root metadata (NFT's own), be it a different wing
61//! on the root template bird or something entirely unrelated.61//! on the root template bird or something entirely unrelated.
62//! 62//!
63//! - **Base:** A list of possible "components" - Parts, a combination of which can 63//! - **Base:** A list of possible "components" - Parts, a combination of which can
64//! be appended/equipped to/on an NFT.64//! be appended/equipped to/on an NFT.
65//! 65//!
66//! - **Part:** Something that, together with other Parts, can constitute an NFT. 66//! - **Part:** Something that, together with other Parts, can constitute an NFT.
67//! Parts are defined in the Base to which they belong. Parts can be either 67//! Parts are defined in the Base to which they belong. Parts can be either
68//! of the `slot` type or `fixed` type. Slots are intended for equippables.68//! of the `slot` type or `fixed` type. Slots are intended for equippables.
69//! Note that "part of something" and "Part of a Base" can be easily confused, 69//! Note that "part of something" and "Part of a Base" can be easily confused,
70//! and in this documentation these words are distinguished by the capital letter.70//! and in this documentation these words are distinguished by the capital letter.
71//! 71//!
72//! - **Theme:** Named objects of variable => value pairs which get interpolated into 72//! - **Theme:** Named objects of variable => value pairs which get interpolated into
73//! the Base's `themable` Parts. Themes can hold any value, but are often represented 73//! the Base's `themable` Parts. Themes can hold any value, but are often represented
74//! in RMRK's examples as colors applied to visible Parts.74//! in RMRK's examples as colors applied to visible Parts.
75//! 75//!
76//! ### Peculiarities in Unique76//! ### Peculiarities in Unique
77//! 77//!
78//! - **Scoped properties:** Properties that are normally obscured from users. 78//! - **Scoped properties:** Properties that are normally obscured from users.
79//! Their purpose is to contain structured metadata that was not included in the Unique standard 79//! Their purpose is to contain structured metadata that was not included in the Unique standard
80//! for collections and tokens, meant to be operated on by proxies and other outliers. 80//! for collections and tokens, meant to be operated on by proxies and other outliers.
81//! Scoped properties are prefixed with `some-scope:`, where `some-scope` is 81//! Scoped properties are prefixed with `some-scope:`, where `some-scope` is
82//! an arbitrary keyword, like "rmrk", and `:` is an unacceptable symbol in user-defined 82//! an arbitrary keyword, like "rmrk", and `:` is an unacceptable symbol in user-defined
83//! properties, which, along with other safeguards, makes them impossible to tamper with.83//! properties, which, along with other safeguards, makes them impossible to tamper with.
84//! 84//!
85//! - **Auxiliary properties:** A slightly different structure of properties, 85//! - **Auxiliary properties:** A slightly different structure of properties,
86//! trading universality of use for more convenient storage, writes and access. 86//! trading universality of use for more convenient storage, writes and access.
87//! Meant to be inaccessible to end users.87//! Meant to be inaccessible to end users.
88//!88//!
89//! ## Proxy Implementation89//! ## Proxy Implementation
118//! RMRK introduces the concept of a Base, which is a catalgoue of Parts,118//! RMRK introduces the concept of a Base, which is a catalgoue of Parts,
119//! possible components of an NFT. Due to its similarity with the functionality119//! possible components of an NFT. Due to its similarity with the functionality
120//! of a token collection, a Base is stored and handled as one, and the Base's Parts and Themes120//! of a token collection, a Base is stored and handled as one, and the Base's Parts and Themes
121//! are the collection's NFTs. See [`CollectionType`](pallet_rmrk_core::misc::CollectionType) and121//! are the collection's NFTs. See [`CollectionType`] and [`NftType`].
122//! [`NftType`](pallet_rmrk_core::misc::NftType).
123//! 122//!
124//! ## Interface123//! ## Interface
125//!124//!
126//! ### Dispatchables125//! ### Dispatchables
788787
789 /// Accept an NFT sent from another account to self or an owned NFT.788 /// Accept an NFT sent from another account to self or an owned NFT.
790 ///789 ///
791 /// The NFT in question must be pending, and, thus, be [sent](`crate::pallet::Call::send`) first.790 /// The NFT in question must be pending, and, thus, be [sent](`Pallet::send`) first.
792 ///791 ///
793 /// # Permissions:792 /// # Permissions:
794 /// - Token-owner-to-be793 /// - Token-owner-to-be
880 /// Reject an NFT sent from another account to self or owned NFT.879 /// Reject an NFT sent from another account to self or owned NFT.
881 /// The NFT in question will not be sent back and burnt instead.880 /// The NFT in question will not be sent back and burnt instead.
882 ///881 ///
883 /// The NFT in question must be pending, and, thus, be [sent](`crate::pallet::Call::send`) first.882 /// The NFT in question must be pending, and, thus, be [sent](`Pallet::send`) first.
884 ///883 ///
885 /// # Permissions:884 /// # Permissions:
886 /// - Token-owner-to-be-not885 /// - Token-owner-to-be-not
945 ///944 ///
946 /// This transaction is needed when a resource is created and assigned to an NFT945 /// This transaction is needed when a resource is created and assigned to an NFT
947 /// by a non-owner, i.e. the collection issuer, with one of the946 /// by a non-owner, i.e. the collection issuer, with one of the
948 /// [`add_...` transactions](crate::pallet::Call::add_basic_resource).947 /// [`add_...` transactions](Pallet::add_basic_resource).
949 ///948 ///
950 /// # Permissions:949 /// # Permissions:
951 /// - Token owner950 /// - Token owner
999 /// Accept the removal of a removal-pending resource from an NFT.998 /// Accept the removal of a removal-pending resource from an NFT.
1000 ///999 ///
1001 /// This transaction is needed when a non-owner, i.e. the collection issuer,1000 /// This transaction is needed when a non-owner, i.e. the collection issuer,
1002 /// requests a [removal](`crate::pallet::Call::remove_resource`) of a resource from an NFT.1001 /// requests a [removal](`Pallet::remove_resource`) of a resource from an NFT.
1003 ///1002 ///
1004 /// # Permissions:1003 /// # Permissions:
1005 /// - Token owner1004 /// - Token owner
1207 ///1206 ///
1208 /// # Permissions:1207 /// # Permissions:
1209 /// - Collection issuer - if not the token owner, adding the resource will warrant1208 /// - Collection issuer - if not the token owner, adding the resource will warrant
1210 /// the owner's [acceptance](crate::pallet::Call::accept_resource).1209 /// the owner's [acceptance](Pallet::accept_resource).
1211 ///1210 ///
1212 /// # Arguments:1211 /// # Arguments:
1213 /// - `rmrk_collection_id`: RMRK collection ID of the NFT.1212 /// - `rmrk_collection_id`: RMRK collection ID of the NFT.
1249 ///1248 ///
1250 /// # Permissions:1249 /// # Permissions:
1251 /// - Collection issuer - if not the token owner, adding the resource will warrant1250 /// - Collection issuer - if not the token owner, adding the resource will warrant
1252 /// the owner's [acceptance](crate::pallet::Call::accept_resource).1251 /// the owner's [acceptance](Pallet::accept_resource).
1253 ///1252 ///
1254 /// # Arguments:1253 /// # Arguments:
1255 /// - `rmrk_collection_id`: RMRK collection ID of the NFT.1254 /// - `rmrk_collection_id`: RMRK collection ID of the NFT.
1311 ///1310 ///
1312 /// # Permissions:1311 /// # Permissions:
1313 /// - Collection issuer - if not the token owner, adding the resource will warrant1312 /// - Collection issuer - if not the token owner, adding the resource will warrant
1314 /// the owner's [acceptance](crate::pallet::Call::accept_resource).1313 /// the owner's [acceptance](Pallet::accept_resource).
1315 ///1314 ///
1316 /// # Arguments:1315 /// # Arguments:
1317 /// - `rmrk_collection_id`: RMRK collection ID of the NFT.1316 /// - `rmrk_collection_id`: RMRK collection ID of the NFT.
1349 /// Remove and erase a resource from an NFT.1348 /// Remove and erase a resource from an NFT.
1350 ///1349 ///
1351 /// If the sender does not own the NFT, then it will be pending confirmation,1350 /// If the sender does not own the NFT, then it will be pending confirmation,
1352 /// and will have to be [accepted](crate::pallet::Call::accept_resource_removal) by the token owner.1351 /// and will have to be [accepted](Pallet::accept_resource_removal) by the token owner.
1353 ///1352 ///
1354 /// # Permissions1353 /// # Permissions
1355 /// - Collection issuer1354 /// - Collection issuer
16001599
1601 /// Get incremented resource ID from within an NFT's properties and store the new latest ID.1600 /// Get incremented resource ID from within an NFT's properties and store the new latest ID.
1602 /// Thus, the returned resource ID should be used.1601 /// Thus, the returned resource ID should be used.
1603 /// 1602 ///
1604 /// Resource IDs are unique only across an NFT.1603 /// Resource IDs are unique only across an NFT.
1605 fn acquire_next_resource_id(1604 fn acquire_next_resource_id(
1606 collection_id: CollectionId,1605 collection_id: CollectionId,
1720 Ok(())1719 Ok(())
1721 }1720 }
17221721
1723 /// Remove a Base ID from an NFT if they are associated. 1722 /// Remove a Base ID from an NFT if they are associated.
1724 /// The Base itself is deleted if the number of associated NFTs reaches 0.1723 /// The Base itself is deleted if the number of associated NFTs reaches 0.
1725 fn remove_associated_base_id(1724 fn remove_associated_base_id(
1726 collection_id: CollectionId,1725 collection_id: CollectionId,
modifiedpallets/proxy-rmrk-equip/src/lib.rsdiffbeforeafterboth
--- a/pallets/proxy-rmrk-equip/src/lib.rs
+++ b/pallets/proxy-rmrk-equip/src/lib.rs
@@ -52,41 +52,41 @@
 //! - FAQ: <https://coda.io/@rmrk/faq>
 //! - Substrate code repository: <https://github.com/rmrk-team/rmrk-substrate>
 //! - RMRK spec repository: <https://github.com/rmrk-team/rmrk-spec>
-//! 
+//!
 //! ## Terminology
-//! 
+//!
 //! For more information on RMRK, see RMRK's own documentation.
-//! 
+//!
 //! ### Intro to RMRK
-//! 
-//! - **Resource:** Additional piece of metadata of an NFT usually serving to add 
-//! a piece of media on top of the root metadata (NFT's own), be it a different wing 
+//!
+//! - **Resource:** Additional piece of metadata of an NFT usually serving to add
+//! a piece of media on top of the root metadata (NFT's own), be it a different wing
 //! on the root template bird or something entirely unrelated.
-//! 
-//! - **Base:** A list of possible "components" - Parts, a combination of which can 
+//!
+//! - **Base:** A list of possible "components" - Parts, a combination of which can
 //! be appended/equipped to/on an NFT.
-//! 
-//! - **Part:** Something that, together with other Parts, can constitute an NFT. 
-//! Parts are defined in the Base to which they belong. Parts can be either 
+//!
+//! - **Part:** Something that, together with other Parts, can constitute an NFT.
+//! Parts are defined in the Base to which they belong. Parts can be either
 //! of the `slot` type or `fixed` type. Slots are intended for equippables.
-//! Note that "part of something" and "Part of a Base" can be easily confused, 
+//! Note that "part of something" and "Part of a Base" can be easily confused,
 //! and in this documentation these words are distinguished by the capital letter.
-//! 
-//! - **Theme:** Named objects of variable => value pairs which get interpolated into 
-//! the Base's `themable` Parts. Themes can hold any value, but are often represented 
+//!
+//! - **Theme:** Named objects of variable => value pairs which get interpolated into
+//! the Base's `themable` Parts. Themes can hold any value, but are often represented
 //! in RMRK's examples as colors applied to visible Parts.
-//! 
+//!
 //! ### Peculiarities in Unique
-//! 
-//! - **Scoped properties:** Properties that are normally obscured from users. 
-//! Their purpose is to contain structured metadata that was not included in the Unique standard 
-//! for collections and tokens, meant to be operated on by proxies and other outliers. 
-//! Scoped properties are prefixed with `some-scope:`, where `some-scope` is 
-//! an arbitrary keyword, like "rmrk", and `:` is an unacceptable symbol in user-defined 
+//!
+//! - **Scoped properties:** Properties that are normally obscured from users.
+//! Their purpose is to contain structured metadata that was not included in the Unique standard
+//! for collections and tokens, meant to be operated on by proxies and other outliers.
+//! Scoped properties are prefixed with `some-scope:`, where `some-scope` is
+//! an arbitrary keyword, like "rmrk", and `:` is an unacceptable symbol in user-defined
 //! properties, which, along with other safeguards, makes them impossible to tamper with.
-//! 
-//! - **Auxiliary properties:** A slightly different structure of properties, 
-//! trading universality of use for more convenient storage, writes and access. 
+//!
+//! - **Auxiliary properties:** A slightly different structure of properties,
+//! trading universality of use for more convenient storage, writes and access.
 //! Meant to be inaccessible to end users.
 //!
 //! ## Proxy Implementation
@@ -121,8 +121,7 @@
 //! RMRK introduces the concept of a Base, which is a catalgoue of Parts,
 //! possible components of an NFT. Due to its similarity with the functionality
 //! of a token collection, a Base is stored and handled as one, and the Base's Parts and Themes
-//! are the collection's NFTs. See [`CollectionType`](pallet_rmrk_core::misc::CollectionType) and
-//! [`NftType`](pallet_rmrk_core::misc::NftType).
+//! are the collection's NFTs. See [`CollectionType`] and [`NftType`].
 //!
 //! ## Interface
 //!
@@ -415,7 +414,7 @@
 }
 
 impl<T: Config> Pallet<T> {
-	/// Create or renew an NFT serving as a Part.
+	/// Create or renew an NFT serving as a Part inside a collection serving as a Base.
 	fn create_part(
 		sender: &T::CrossAccountId,
 		collection: &NonfungibleHandle<T>,
modifiedprimitives/rmrk-traits/src/resource.rsdiffbeforeafterboth
--- a/primitives/rmrk-traits/src/resource.rs
+++ b/primitives/rmrk-traits/src/resource.rs
@@ -151,8 +151,8 @@
 		"#)
 )]
 pub struct ResourceInfo<BoundedString, BoundedParts> {
-	/// ID a unique identifier for a resource across all those of a single NFT.
-	/// The combination of a collection ID, an NFT ID, and the resource ID must be 
+	/// ID is a unique identifier for a resource across all those of a single NFT.
+	/// The combination of a collection ID, an NFT ID, and the resource ID must be
 	/// unique across the entire RMRK ecosystem.
 	//#[cfg_attr(feature = "std", serde(with = "serialize::vec"))]
 	pub id: ResourceId,