git.delta.rocks / unique-network / refs/commits / 9b4da675e61d

difftreelog

doc: minor fixes + typos

Farhad Hakimov2022-07-11parent: #6035f8d.patch.diff
in: master

7 files changed

modifiedclient/rpc/src/lib.rsdiffbeforeafterboth
--- a/client/rpc/src/lib.rs
+++ b/client/rpc/src/lib.rs
@@ -50,6 +50,7 @@
 		account: CrossAccountId,
 		at: Option<BlockHash>,
 	) -> Result<Vec<TokenId>>;
+
 	/// Get tokens contained in collection
 	#[method(name = "unique_collectionTokens")]
 	fn collection_tokens(
@@ -57,6 +58,7 @@
 		collection: CollectionId,
 		at: Option<BlockHash>,
 	) -> Result<Vec<TokenId>>;
+
 	/// Check if token exists
 	#[method(name = "unique_tokenExists")]
 	fn token_exists(
@@ -65,6 +67,7 @@
 		token: TokenId,
 		at: Option<BlockHash>,
 	) -> Result<bool>;
+
 	/// Get token owner
 	#[method(name = "unique_tokenOwner")]
 	fn token_owner(
@@ -73,6 +76,7 @@
 		token: TokenId,
 		at: Option<BlockHash>,
 	) -> Result<Option<CrossAccountId>>;
+
 	/// Get token owner, in case of nested token - find the parent recursively
 	#[method(name = "unique_topmostTokenOwner")]
 	fn topmost_token_owner(
@@ -81,6 +85,7 @@
 		token: TokenId,
 		at: Option<BlockHash>,
 	) -> Result<Option<CrossAccountId>>;
+
 	/// Get tokens nested directly into the token
 	#[method(name = "unique_tokenChildren")]
 	fn token_children(
@@ -89,6 +94,7 @@
 		token: TokenId,
 		at: Option<BlockHash>,
 	) -> Result<Vec<TokenChild>>;
+
 	/// Get collection properties
 	#[method(name = "unique_collectionProperties")]
 	fn collection_properties(
@@ -97,6 +103,7 @@
 		keys: Option<Vec<String>>,
 		at: Option<BlockHash>,
 	) -> Result<Vec<Property>>;
+
 	/// Get token properties
 	#[method(name = "unique_tokenProperties")]
 	fn token_properties(
@@ -106,6 +113,7 @@
 		keys: Option<Vec<String>>,
 		at: Option<BlockHash>,
 	) -> Result<Vec<Property>>;
+
 	/// Get property permissions
 	#[method(name = "unique_propertyPermissions")]
 	fn property_permissions(
@@ -114,6 +122,7 @@
 		keys: Option<Vec<String>>,
 		at: Option<BlockHash>,
 	) -> Result<Vec<PropertyKeyPermission>>;
+
 	/// Get token data
 	#[method(name = "unique_tokenData")]
 	fn token_data(
@@ -123,9 +132,11 @@
 		keys: Option<Vec<String>>,
 		at: Option<BlockHash>,
 	) -> Result<TokenData<CrossAccountId>>;
+
 	/// Get amount of unique collection tokens
 	#[method(name = "unique_totalSupply")]
 	fn total_supply(&self, collection: CollectionId, at: Option<BlockHash>) -> Result<u32>;
+
 	/// Get owned amount of any user tokens
 	#[method(name = "unique_accountBalance")]
 	fn account_balance(
@@ -134,6 +145,7 @@
 		account: CrossAccountId,
 		at: Option<BlockHash>,
 	) -> Result<u32>;
+
 	/// Get owned amount of specific account token
 	#[method(name = "unique_balance")]
 	fn balance(
@@ -143,6 +155,7 @@
 		token: TokenId,
 		at: Option<BlockHash>,
 	) -> Result<String>;
+
 	/// Get allowed amount
 	#[method(name = "unique_allowance")]
 	fn allowance(
@@ -153,6 +166,7 @@
 		token: TokenId,
 		at: Option<BlockHash>,
 	) -> Result<String>;
+
 	/// Get admin list
 	#[method(name = "unique_adminlist")]
 	fn adminlist(
@@ -160,6 +174,7 @@
 		collection: CollectionId,
 		at: Option<BlockHash>,
 	) -> Result<Vec<CrossAccountId>>;
+
 	/// Get allowlist
 	#[method(name = "unique_allowlist")]
 	fn allowlist(
@@ -167,6 +182,7 @@
 		collection: CollectionId,
 		at: Option<BlockHash>,
 	) -> Result<Vec<CrossAccountId>>;
+
 	/// Check if user is allowed to use collection
 	#[method(name = "unique_allowed")]
 	fn allowed(
@@ -175,9 +191,11 @@
 		user: CrossAccountId,
 		at: Option<BlockHash>,
 	) -> Result<bool>;
+
 	/// Get last token ID created in a collection
 	#[method(name = "unique_lastTokenId")]
 	fn last_token_id(&self, collection: CollectionId, at: Option<BlockHash>) -> Result<TokenId>;
+
 	/// Get collection by specified ID
 	#[method(name = "unique_collectionById")]
 	fn collection_by_id(
@@ -185,9 +203,11 @@
 		collection: CollectionId,
 		at: Option<BlockHash>,
 	) -> Result<Option<RpcCollection<AccountId>>>;
+
 	/// Get collection stats
 	#[method(name = "unique_collectionStats")]
 	fn collection_stats(&self, at: Option<BlockHash>) -> Result<CollectionStats>;
+
 	/// Get number of blocks when sponsored transaction is available
 	#[method(name = "unique_nextSponsored")]
 	fn next_sponsored(
@@ -197,6 +217,7 @@
 		token: TokenId,
 		at: Option<BlockHash>,
 	) -> Result<Option<u64>>;
+
 	/// Get effective collection limits
 	#[method(name = "unique_effectiveCollectionLimits")]
 	fn effective_collection_limits(
@@ -204,6 +225,7 @@
 		collection_id: CollectionId,
 		at: Option<BlockHash>,
 	) -> Result<Option<CollectionLimits>>;
+
 	/// Get total pieces of token
 	#[method(name = "unique_totalPieces")]
 	fn total_pieces(
modifiedpallets/common/src/lib.rsdiffbeforeafterboth
--- a/pallets/common/src/lib.rs
+++ b/pallets/common/src/lib.rs
@@ -334,7 +334,7 @@
 		///
 		/// * collection_id: ID of the collection to which the item belongs.
 		///
-		/// * item_id: ID of the item trasnferred.
+		/// * item_id: ID of the item transferred.
 		///
 		/// * sender: Original owner of the item.
 		///
modifiedpallets/fungible/src/lib.rsdiffbeforeafterboth
--- a/pallets/fungible/src/lib.rs
+++ b/pallets/fungible/src/lib.rs
@@ -58,13 +58,13 @@
 	pub enum Error<T> {
 		/// Not Fungible item data used to mint in Fungible collection.
 		NotFungibleDataUsedToMintFungibleCollectionToken,
-		/// Not default id passed as TokenId argument
+		/// Not default id passed as TokenId argument.
 		FungibleItemsHaveNoId,
-		/// Tried to set data for fungible item
+		/// Tried to set data for fungible item.
 		FungibleItemsDontHaveData,
-		/// Fungible token does not support nested
+		/// Fungible token does not support nesting.
 		FungibleDisallowsNesting,
-		/// Setting item properties is not allowed
+		/// Setting item properties is not allowed.
 		SettingPropertiesNotAllowed,
 	}
 
modifiedpallets/nonfungible/src/lib.rsdiffbeforeafterboth
171 QueryKind = ValueQuery,171 QueryKind = ValueQuery,
172 >;172 >;
173173
174 /// Amount of tokens owned in a collection.s174 /// Amount of tokens owned in a collection.
175 #[pallet::storage]175 #[pallet::storage]
176 pub type AccountBalance<T: Config> = StorageNMap<176 pub type AccountBalance<T: Config> = StorageNMap<
177 Key = (177 Key = (
182 QueryKind = ValueQuery,182 QueryKind = ValueQuery,
183 >;183 >;
184184
185 /// todo doc185 /// todo:doc
186 #[pallet::storage]186 #[pallet::storage]
187 pub type Allowance<T: Config> = StorageNMap<187 pub type Allowance<T: Config> = StorageNMap<
188 Key = (Key<Twox64Concat, CollectionId>, Key<Twox64Concat, TokenId>),188 Key = (Key<Twox64Concat, CollectionId>, Key<Twox64Concat, TokenId>),
modifiedpallets/refungible/src/lib.rsdiffbeforeafterboth
--- a/pallets/refungible/src/lib.rs
+++ b/pallets/refungible/src/lib.rs
@@ -64,13 +64,13 @@
 	pub enum Error<T> {
 		/// Not Refungible item data used to mint in Refungible collection.
 		NotRefungibleDataUsedToMintFungibleCollectionToken,
-		/// Maximum refungibility exceeded
+		/// Maximum refungibility exceeded.
 		WrongRefungiblePieces,
-		/// Refungible token can't be repartitioned by user who isn't owns all pieces
+		/// Refungible token can't be repartitioned by user who isn't owns all pieces.
 		RepartitionWhileNotOwningAllPieces,
-		/// Refungible token can't nest other tokens
+		/// Refungible token can't nest other tokens.
 		RefungibleDisallowsNesting,
-		/// Setting item properties is not allowed
+		/// Setting item properties is not allowed.
 		SettingPropertiesNotAllowed,
 	}
 
@@ -605,7 +605,6 @@
 		Ok(())
 	}
 
-	/// todo:doc oh look, a precedent. not pub, too. but it has an unclear use-case.
 	/// Returns allowance, which should be set after transaction
 	fn check_allowed(
 		collection: &RefungibleHandle<T>,
modifiedpallets/structure/src/lib.rsdiffbeforeafterboth
--- a/pallets/structure/src/lib.rs
+++ b/pallets/structure/src/lib.rs
@@ -31,7 +31,7 @@
 		DepthLimit,
 		/// While iterating over children, reached the breadth limit.
 		BreadthLimit,
-		/// Couldn't find the token owner that is a token. Perhaps, it does not yet exist. todo:doc? rephrase?
+		/// Couldn't find the token owner that is itself a token.
 		TokenNotFound,
 	}
 
modifiedprimitives/data-structs/src/lib.rsdiffbeforeafterboth
--- a/primitives/data-structs/src/lib.rs
+++ b/primitives/data-structs/src/lib.rs
@@ -286,7 +286,7 @@
 	}
 }
 
-/// Collection parameters, used in storage (see [`RpcCollection`] for the RPC version)
+/// Collection parameters, used in storage (see [`RpcCollection`] for the RPC version).
 #[struct_versioning::versioned(version = 2, upper)]
 #[derive(Encode, Decode, Clone, PartialEq, TypeInfo, MaxEncodedLen)]
 pub struct Collection<AccountId> {
@@ -327,7 +327,7 @@
 	pub meta_update_permission: MetaUpdatePermission,
 }
 
-/// Collection parameters, used in RPC calls (see [`Collection`] for the storage version)
+/// Collection parameters, used in RPC calls (see [`Collection`] for the storage version).
 #[derive(Encode, Decode, Clone, PartialEq, TypeInfo)]
 #[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
 pub struct RpcCollection<AccountId> {
@@ -568,7 +568,7 @@
 	ReFungible(CreateReFungibleData),
 }
 
-/// Explicit NFT creation data with meta parameters
+/// Explicit NFT creation data with meta parameters.
 #[derive(Encode, Decode, MaxEncodedLen, PartialEq, Clone, TypeInfo, Derivative)]
 #[derivative(Debug)]
 pub struct CreateNftExData<CrossAccountId> {
@@ -577,7 +577,7 @@
 	pub owner: CrossAccountId,
 }
 
-/// Explicit RFT creation data with meta parameters
+/// Explicit RFT creation data with meta parameters.
 #[derive(Encode, Decode, MaxEncodedLen, PartialEq, Clone, TypeInfo, Derivative)]
 #[derivative(Debug(bound = "CrossAccountId: fmt::Debug + Ord"))]
 pub struct CreateRefungibleExData<CrossAccountId> {
@@ -587,7 +587,7 @@
 	pub users: BoundedBTreeMap<CrossAccountId, u128, ConstU32<MAX_ITEMS_PER_BATCH>>,
 }
 
-/// Explicit item creation data with meta parameters, namely the owner
+/// Explicit item creation data with meta parameters, namely the owner.
 #[derive(Encode, Decode, MaxEncodedLen, PartialEq, Clone, TypeInfo, Derivative)]
 #[derivative(Debug(bound = "CrossAccountId: fmt::Debug + Ord"))]
 pub enum CreateItemExData<CrossAccountId> {
@@ -635,7 +635,7 @@
 	}
 }
 
-/// Token's address, dictated by its collection and token IDs
+/// Token's address, dictated by its collection and token IDs.
 #[derive(Encode, Decode, MaxEncodedLen, PartialEq, Clone, Debug, TypeInfo)]
 #[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
 // todo possibly rename to be used generally as an address pair