git.delta.rocks / unique-network / refs/commits / ff0ca4cea892

difftreelog

doc: adjust documentation style

Farhad Hakimov2022-07-11parent: #9b4da67.patch.diff
in: master

2 files changed

modifiedpallets/common/src/lib.rsdiffbeforeafterboth
288 ///288 ///
289 /// # Arguments289 /// # Arguments
290 ///290 ///
291 /// * collection_id: Globally unique identifier of newly created collection.291 /// * collection_id - Globally unique identifier of newly created collection.
292 ///
293 /// * mode: [CollectionMode] converted into u8.292 /// * mode - [CollectionMode] converted into u8.
294 ///
295 /// * account_id: Collection owner.293 /// * account_id - Collection owner.
296 CollectionCreated(CollectionId, u8, T::AccountId),294 CollectionCreated(CollectionId, u8, T::AccountId),
297295
298 /// New collection was destroyed296 /// New collection was destroyed
299 ///297 ///
300 /// # Arguments298 /// # Arguments
301 ///299 ///
302 /// * collection_id: Globally unique identifier of collection that has been destroyed.300 /// * collection_id - Globally unique identifier of collection that has been destroyed.
303 CollectionDestroyed(CollectionId),301 CollectionDestroyed(CollectionId),
304302
305 /// New item was created.303 /// New item was created.
306 ///304 ///
307 /// # Arguments305 /// # Arguments
308 ///306 ///
309 /// * collection_id: ID of the collection where the item was created.307 /// * collection_id - ID of the collection where the item was created.
310 ///
311 /// * item_id: ID of the item. Unique within the collection.308 /// * item_id - ID of the item. Unique within the collection.
312 ///
313 /// * recipient: Owner of the newly created item.309 /// * recipient - Owner of the newly created item.
314 ///
315 /// * amount: The amount of tokens that were created (always 1 for NFT).310 /// * amount - The amount of tokens that were created (always 1 for NFT).
316 ItemCreated(CollectionId, TokenId, T::CrossAccountId, u128),311 ItemCreated(CollectionId, TokenId, T::CrossAccountId, u128),
317312
318 /// Collection item was burned.313 /// Collection item was burned.
319 ///314 ///
320 /// # Arguments315 /// # Arguments
321 ///316 ///
322 /// * collection_id: Identifier of the collection to which the burned NFT belonged.317 /// * collection_id - Identifier of the collection to which the burned NFT belonged.
323 ///
324 /// * item_id: Identifier of burned NFT.318 /// * item_id - Identifier of burned NFT.
325 ///
326 /// * owner: Which user has destroyed their tokens.319 /// * owner - Which user has destroyed their tokens.
327 ///
328 /// * amount: The amount of tokens that were destroyed (always 1 for NFT).320 /// * amount - Amount of tokens that were destroyed (always 1 for NFT).
329 ItemDestroyed(CollectionId, TokenId, T::CrossAccountId, u128),321 ItemDestroyed(CollectionId, TokenId, T::CrossAccountId, u128),
330322
331 /// Item was transferred.323 /// Item was transferred.
332 ///324 ///
333 /// # Arguments325 /// # Arguments
334 ///326 ///
335 /// * collection_id: ID of the collection to which the item belongs.327 /// * collection_id - ID of the collection to which the item belongs.
336 ///
337 /// * item_id: ID of the item transferred.328 /// * item_id - ID of the item transferred.
338 ///
339 /// * sender: Original owner of the item.329 /// * sender - Original owner of the item.
340 ///
341 /// * recipient: New owner of the item.330 /// * recipient - New owner of the item.
342 ///
343 /// * amount: The amount of tokens that were transferred (always 1 for NFT).331 /// * amount - Amount of tokens that were transferred (always 1 for NFT).
344 Transfer(332 Transfer(
345 CollectionId,333 CollectionId,
346 TokenId,334 TokenId,
353 ///341 ///
354 /// # Arguments342 /// # Arguments
355 ///343 ///
356 /// * collection_id344 /// * collection_id - todo:doc flesh out
357 ///
358 /// * item_id345 /// * item_id
359 ///
360 /// * sender346 /// * sender
361 ///
362 /// * spender347 /// * spender
363 ///
364 /// * amount348 /// * amount
365 Approved(349 Approved(
366 CollectionId,350 CollectionId,
374 ///358 ///
375 /// # Arguments359 /// # Arguments
376 ///360 ///
377 /// * collection_id: ID of the collection, whose property was just set.361 /// * collection_id - ID of the collection, whose property was just set.
378 ///
379 /// * property_key: Key of the property that was just set.362 /// * property_key - Key of the property that was just set.
380 CollectionPropertySet(CollectionId, PropertyKey),363 CollectionPropertySet(CollectionId, PropertyKey),
381364
382 /// Collection property was deleted.365 /// Collection property was deleted.
383 ///366 ///
384 /// # Arguments367 /// # Arguments
385 ///368 ///
386 /// * collection_id: ID of the collection, whose property was just deleted.369 /// * collection_id - ID of the collection, whose property was just deleted.
387 ///
388 /// * property_key: Key of the property that was just deleted.370 /// * property_key - Key of the property that was just deleted.
389 CollectionPropertyDeleted(CollectionId, PropertyKey),371 CollectionPropertyDeleted(CollectionId, PropertyKey),
390372
391 /// Item property was added or edited.373 /// Item property was added or edited.
392 ///374 ///
393 /// # Arguments375 /// # Arguments
394 ///376 ///
395 /// * collection_id: ID of the collection, whose token's property was just set.377 /// * collection_id - ID of the collection, whose token's property was just set.
396 ///
397 /// * item_id: ID of the item, whose property was just set.378 /// * item_id - ID of the item, whose property was just set.
398 ///
399 /// * property_key: Key of the property that was just set.379 /// * property_key - Key of the property that was just set.
400 TokenPropertySet(CollectionId, TokenId, PropertyKey),380 TokenPropertySet(CollectionId, TokenId, PropertyKey),
401381
402 /// Item property was deleted.382 /// Item property was deleted.
403 ///383 ///
404 /// # Arguments384 /// # Arguments
405 ///385 ///
406 /// * collection_id: ID of the collection, whose token's property was just deleted.386 /// * collection_id - ID of the collection, whose token's property was just deleted.
407 ///
408 /// * item_id: ID of the item, whose property was just deleted.387 /// * item_id - ID of the item, whose property was just deleted.
409 ///
410 /// * property_key: Key of the property that was just deleted.388 /// * property_key - Key of the property that was just deleted.
411 TokenPropertyDeleted(CollectionId, TokenId, PropertyKey),389 TokenPropertyDeleted(CollectionId, TokenId, PropertyKey),
412390
413 /// Token property permission was added or updated for a collection.391 /// Token property permission was added or updated for a collection.
414 ///392 ///
415 /// # Arguments393 /// # Arguments
416 ///394 ///
417 /// * collection_id: ID of the collection, whose permissions were just set/updated.395 /// * collection_id - ID of the collection, whose permissions were just set/updated.
418 ///
419 /// * property_key: Key of the property of the set/updated permission.396 /// * property_key - Key of the property of the set/updated permission.
420 PropertyPermissionSet(CollectionId, PropertyKey),397 PropertyPermissionSet(CollectionId, PropertyKey),
421 }398 }
422399
modifiedpallets/unique/src/lib.rsdiffbeforeafterboth
--- a/pallets/unique/src/lib.rs
+++ b/pallets/unique/src/lib.rs
@@ -261,12 +261,9 @@
 		/// # Arguments
 		///
 		/// * collection_name: UTF-16 string with collection name (limit 64 characters), will be stored as zero-terminated.
-		///
-		/// * collection_description: UTF-16 string with collection description (limit 256 characters), will be stored as zero-terminated.
-		///
-		/// * token_prefix: UTF-8 string with token prefix.
-		///
-		/// * mode: [CollectionMode] collection type and type dependent data.
+		/// * collection_description - UTF-16 string with collection description (limit 256 characters), will be stored as zero-terminated.
+		/// * token_prefix - UTF-8 string with token prefix.
+		/// * mode - [CollectionMode] collection type and type dependent data.
 		// returns collection ID
 		#[weight = <SelfWeightOf<T>>::create_collection()]
 		#[transactional]
@@ -316,7 +313,7 @@
 		///
 		/// # Arguments
 		///
-		/// * collection_id: collection to destroy.
+		/// * collection_id - collection to destroy.
 		#[weight = <SelfWeightOf<T>>::destroy_collection()]
 		#[transactional]
 		pub fn destroy_collection(origin, collection_id: CollectionId) -> DispatchResult {
@@ -349,7 +346,6 @@
 		/// # Arguments
 		///
 		/// * collection_id.
-		///
 		/// * address.
 		#[weight = <SelfWeightOf<T>>::add_to_allow_list()]
 		#[transactional]
@@ -384,7 +380,6 @@
 		/// # Arguments
 		///
 		/// * collection_id.
-		///
 		/// * address.
 		#[weight = <SelfWeightOf<T>>::remove_from_allow_list()]
 		#[transactional]
@@ -418,7 +413,6 @@
 		/// # Arguments
 		///
 		/// * collection_id.
-		///
 		/// * new_owner.
 		#[weight = <SelfWeightOf<T>>::change_collection_owner()]
 		#[transactional]
@@ -448,10 +442,9 @@
 		/// * Collection Admin
 		///
 		/// # Arguments
-		///
-		/// * collection_id: ID of the Collection to add admin for.
 		///
-		/// * new_admin: Address of new admin to add.
+		/// * collection_id - ID of the Collection to add admin for.
+		/// * new_admin - Address of new admin to add.
 		#[weight = <SelfWeightOf<T>>::add_collection_admin()]
 		#[transactional]
 		pub fn add_collection_admin(origin, collection_id: CollectionId, new_admin: T::CrossAccountId) -> DispatchResult {
@@ -476,9 +469,8 @@
 		///
 		/// # Arguments
 		///
-		/// * collection_id: ID of the Collection to remove admin for.
-		///
-		/// * account_id: Address of admin to remove.
+		/// * collection_id - ID of the Collection to remove admin for.
+		/// * account_id - Address of admin to remove.
 		#[weight = <SelfWeightOf<T>>::remove_collection_admin()]
 		#[transactional]
 		pub fn remove_collection_admin(origin, collection_id: CollectionId, account_id: T::CrossAccountId) -> DispatchResult {
@@ -504,7 +496,6 @@
 		/// # Arguments
 		///
 		/// * collection_id.
-		///
 		/// * new_sponsor.
 		#[weight = <SelfWeightOf<T>>::set_collection_sponsor()]
 		#[transactional]
@@ -529,7 +520,7 @@
 		///
 		/// # Permissions
 		///
-		/// * The sponsor to-be
+		/// * Sponsor-to-be
 		///
 		/// # Arguments
 		///
@@ -593,11 +584,9 @@
 		///
 		/// # Arguments
 		///
-		/// * collection_id: ID of the collection.
-		///
-		/// * owner: Address, initial owner of the NFT.
-		///
-		/// * data: Token data to store on chain.
+		/// * collection_id - ID of the collection.
+		/// * owner - Address, initial owner of the NFT.
+		/// * data - Token data to store on chain.
 		#[weight = T::CommonWeightInfo::create_item()]
 		#[transactional]
 		pub fn create_item(origin, collection_id: CollectionId, owner: T::CrossAccountId, data: CreateItemData) -> DispatchResultWithPostInfo {
@@ -620,11 +609,9 @@
 		///
 		/// # Arguments
 		///
-		/// * collection_id: ID of the collection.
-		///
-		/// * itemsData: Array items properties. Each property is an array of bytes itself, see [create_item].
-		///
-		/// * owner: Address, initial owner of the NFT.
+		/// * collection_id - ID of the collection.
+		/// * owner - Address, initial owner of the NFT.
+		/// * items_data - Array items properties. Each property is an array of bytes itself, see [`create_item`].
 		#[weight = T::CommonWeightInfo::create_multiple_items(&items_data)]
 		#[transactional]
 		pub fn create_multiple_items(origin, collection_id: CollectionId, owner: T::CrossAccountId, items_data: Vec<CreateItemData>) -> DispatchResultWithPostInfo {
@@ -645,8 +632,7 @@
 		/// # Arguments
 		///
 		/// * collection_id.
-		///
-		/// * properties: a vector of key-value pairs stored as the collection's metadata. Keys support Latin letters, '-', '_', and '.' as symbols.
+		/// * properties - Vector of key-value pairs stored as the collection's metadata. Keys support Latin letters, '-', '_', and '.' as symbols.
 		#[weight = T::CommonWeightInfo::set_collection_properties(properties.len() as u32)]
 		#[transactional]
 		pub fn set_collection_properties(
@@ -671,8 +657,7 @@
 		/// # Arguments
 		///
 		/// * collection_id.
-		///
-		/// * property_keys: a vector of keys of the properties to be deleted.
+		/// * property_keys - Vector of keys of the properties to be deleted.
 		#[weight = T::CommonWeightInfo::delete_collection_properties(property_keys.len() as u32)]
 		#[transactional]
 		pub fn delete_collection_properties(
@@ -699,10 +684,8 @@
 		/// # Arguments
 		///
 		/// * collection_id.
-		///
 		/// * token_id.
-		///
-		/// * properties: a vector of key-value pairs stored as the token's metadata. Keys support Latin letters, '-', '_', and '.' as symbols.
+		/// * properties - Vector of key-value pairs stored as the token's metadata. Keys support Latin letters, `-`, `_`, and `.` as symbols.
 		#[weight = T::CommonWeightInfo::set_token_properties(properties.len() as u32)]
 		#[transactional]
 		pub fn set_token_properties(
@@ -731,10 +714,8 @@
 		/// # Arguments
 		///
 		/// * collection_id.
-		///
 		/// * token_id.
-		///
-		/// * property_keys: a vector of keys of the properties to be deleted.
+		/// * property_keys - Vector of keys of the properties to be deleted.
 		#[weight = T::CommonWeightInfo::delete_token_properties(property_keys.len() as u32)]
 		#[transactional]
 		pub fn delete_token_properties(
@@ -761,8 +742,7 @@
 		/// # Arguments
 		///
 		/// * collection_id.
-		///
-		/// * property_permissions: a vector of permissions for property keys. Keys support Latin letters, '-', '_', and '.' as symbols.
+		/// * property_permissions - Vector of permissions for property keys. Keys support Latin letters, `-`, `_`, and `.` as symbols.
 		#[weight = T::CommonWeightInfo::set_token_property_permissions(property_permissions.len() as u32)]
 		#[transactional]
 		pub fn set_token_property_permissions(
@@ -789,10 +769,9 @@
 		///     * MintPermission is enabled (see SetMintPermission method)
 		///
 		/// # Arguments
-		///
-		/// * collection_id: ID of the collection.
 		///
-		/// * data: explicit item creation data.
+		/// * collection_id - ID of the collection.
+		/// * data - Explicit item creation data.
 		#[weight = T::CommonWeightInfo::create_multiple_items_ex(&data)]
 		#[transactional]
 		pub fn create_multiple_items_ex(origin, collection_id: CollectionId, data: CreateItemExData<T::CrossAccountId>) -> DispatchResultWithPostInfo {
@@ -810,9 +789,8 @@
 		///
 		/// # Arguments
 		///
-		/// * collection_id: ID of the collection.
-		///
-		/// * value: New flag value.
+		/// * collection_id - ID of the collection.
+		/// * value - New flag value.
 		#[weight = <SelfWeightOf<T>>::set_transfers_enabled_flag()]
 		#[transactional]
 		pub fn set_transfers_enabled_flag(origin, collection_id: CollectionId, value: bool) -> DispatchResult {
@@ -837,9 +815,8 @@
 		///
 		/// # Arguments
 		///
-		/// * collection_id: ID of the collection.
-		///
-		/// * item_id: ID of NFT to burn.
+		/// * collection_id - ID of the collection.
+		/// * item_id - ID of NFT to burn.
 		#[weight = T::CommonWeightInfo::burn_item()]
 		#[transactional]
 		pub fn burn_item(origin, collection_id: CollectionId, item_id: TokenId, value: u128) -> DispatchResultWithPostInfo {
@@ -866,12 +843,10 @@
 		/// * Current NFT Owner.
 		///
 		/// # Arguments
-		///
-		/// * collection_id: ID of the collection.
 		///
-		/// * item_id: ID of NFT to burn.
-		///
-		/// * from: owner of item
+		/// * collection_id - ID of the collection.
+		/// * item_id - ID of NFT to burn.
+		/// * from - The owner of the item from whom it is taken away.
 		#[weight = T::CommonWeightInfo::burn_from()]
 		#[transactional]
 		pub fn burn_from(origin, collection_id: CollectionId, from: T::CrossAccountId, item_id: TokenId, value: u128) -> DispatchResultWithPostInfo {
@@ -891,16 +866,16 @@
 		///
 		/// # Arguments
 		///
-		/// * recipient: Address of token recipient.
+		/// * recipient - Address of token recipient.
 		///
 		/// * collection_id.
 		///
-		/// * item_id: ID of the item
+		/// * item_id - ID of the item
 		///     * Non-Fungible Mode: Required.
 		///     * Fungible Mode: Ignored.
 		///     * Re-Fungible Mode: Required.
 		///
-		/// * value: Amount to transfer.
+		/// * value - Amount to transfer.
 		///     * Non-Fungible Mode: Ignored
 		///     * Fungible Mode: Must specify transferred amount
 		///     * Re-Fungible Mode: Must specify transferred portion (between 0 and 1)
@@ -923,11 +898,9 @@
 		///
 		/// # Arguments
 		///
-		/// * approved: Address that is approved to transfer this NFT or zero (if needed to remove approval).
-		///
+		/// * approved - Address that is approved to transfer this NFT or zero (if needed to remove approval).
 		/// * collection_id.
-		///
-		/// * item_id: ID of the item.
+		/// * item_id - ID of the item.
 		#[weight = T::CommonWeightInfo::approve()]
 		#[transactional]
 		pub fn approve(origin, spender: T::CrossAccountId, collection_id: CollectionId, item_id: TokenId, amount: u128) -> DispatchResultWithPostInfo {
@@ -947,15 +920,11 @@
 		///
 		/// # Arguments
 		///
-		/// * from: Address that owns token.
-		///
-		/// * recipient: Address of token recipient.
-		///
+		/// * from - Address that currently owns the token.
+		/// * recipient - Address of the new token-owner-to-be.
 		/// * collection_id.
-		///
-		/// * item_id: ID of the item.
-		///
-		/// * value: Amount to transfer.
+		/// * item_id - ID of the item to be transferred.
+		/// * value - Amount to transfer.
 		#[weight = T::CommonWeightInfo::transfer_from()]
 		#[transactional]
 		pub fn transfer_from(origin, from: T::CrossAccountId, recipient: T::CrossAccountId, collection_id: CollectionId, item_id: TokenId, value: u128 ) -> DispatchResultWithPostInfo {
@@ -966,7 +935,7 @@
 		}
 
 		/// Set specific limits of a collection. Empty, or None fields mean chain default.
-		///.
+		///
 		/// # Permissions
 		///
 		/// * Collection Owner
@@ -975,8 +944,7 @@
 		/// # Arguments
 		///
 		/// * collection_id.
-		///
-		/// * new_limit: The new limits of the collection. They will overwrite the current ones.
+		/// * new_limit - New limits of the collection. They will overwrite the current ones.
 		#[weight = <SelfWeightOf<T>>::set_collection_limits()]
 		#[transactional]
 		pub fn set_collection_limits(
@@ -1009,8 +977,7 @@
 		/// # Arguments
 		///
 		/// * collection_id.
-		///
-		/// * new_permission: The new permissions of the collection. They will overwrite the current ones.
+		/// * new_permission - New permissions of the collection. They will overwrite the current ones.
 		#[weight = <SelfWeightOf<T>>::set_collection_limits()]
 		#[transactional]
 		pub fn set_collection_permissions(
@@ -1042,16 +1009,14 @@
 		/// # Arguments
 		///
 		/// * collection_id.
-		///
-		/// * token: the ID of the RFT.
-		///
-		/// * amount: The new number of parts into which the token shall be partitioned.
+		/// * token_id - ID of the RFT.
+		/// * amount - New number of parts into which the token shall be partitioned.
 		#[weight = T::RefungibleExtensionsWeightInfo::repartition()]
 		#[transactional]
 		pub fn repartition(
 			origin,
 			collection_id: CollectionId,
-			token: TokenId,
+			token_id: TokenId,
 			amount: u128,
 		) -> DispatchResultWithPostInfo {
 			let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);