git.delta.rocks / unique-network / refs/commits / 6f21087c7545

difftreelog

doc: fix misinterpretations

Farhad Hakimov2022-07-18parent: #e1f4714.patch.diff
in: master

1 file changed

modifiedpallets/unique/src/lib.rsdiffbeforeafterboth
34//!34//!
35//! ### Dispatchables35//! ### Dispatchables
36//!36//!
37//! - `create_collection` - Create a collection of tokens. **Deprecated**, use `create_collection_ex`.37//! - `create_collection` - Create a collection of tokens. **Deprecated**, use `createCollectionEx`.
38//! - `create_collection_ex` - Create a collection of tokens with explicit parameters.38//! - `create_collection_ex` - Create a collection of tokens with explicit parameters.
39//! - `destroy_collection` - Destroy a collection if no tokens exist within.39//! - `destroy_collection` - Destroy a collection if no tokens exist within.
40//! - `add_to_allow_list` - Add an address to allow list.40//! - `add_to_allow_list` - Add an address to allow list.
292 0292 0
293 }293 }
294294
295 /// DEPRECATED - use create_collection_ex. Create a Collection of tokens.295 /// DEPRECATED - use createCollectionEx. Create a Collection of tokens.
296 ///296 ///
297 /// Each Token may have multiple properties encoded as an array of bytes297 /// Each Token may have multiple properties encoded as an array of bytes
298 /// of certain length. The initial owner of the collection is set298 /// of certain length. The initial owner of the collection is set
894 ///894 ///
895 /// * `collection_id`: ID of the collection to which the item belongs.895 /// * `collection_id`: ID of the collection to which the item belongs.
896 /// * `item_id`: ID of item to burn.896 /// * `item_id`: ID of item to burn.
897 /// * `value`: Number of parts of the item to destroy.897 /// * `value`: Number of pieces of the item to destroy.
898 /// * Non-Fungible Mode: There is always 1 NFT.898 /// * Non-Fungible Mode: An NFT is indivisible, there is always 1 corresponding to an ID.
899 /// * Fungible Mode: The desired number of parts to burn.899 /// * Fungible Mode: The desired number of pieces to burn.
900 /// * Re-Fungible Mode: The desired number of parts to burn.900 /// * Re-Fungible Mode: The desired number of pieces to burn.
901 #[weight = T::CommonWeightInfo::burn_item()]901 #[weight = T::CommonWeightInfo::burn_item()]
902 #[transactional]902 #[transactional]
903 pub fn burn_item(origin, collection_id: CollectionId, item_id: TokenId, value: u128) -> DispatchResultWithPostInfo {903 pub fn burn_item(origin, collection_id: CollectionId, item_id: TokenId, value: u128) -> DispatchResultWithPostInfo {
932 /// * `from`: The owner of the burning item.932 /// * `from`: The owner of the burning item.
933 /// * `collection_id`: ID of the collection to which the item belongs.933 /// * `collection_id`: ID of the collection to which the item belongs.
934 /// * `item_id`: ID of item to burn.934 /// * `item_id`: ID of item to burn.
935 /// * `value`: Number of parts to burn.935 /// * `value`: Number of pieces to burn.
936 /// * Non-Fungible Mode: There is always 1 NFT.936 /// * Non-Fungible Mode: An NFT is indivisible, there is always 1 corresponding to an ID.
937 /// * Fungible Mode: The desired number of parts to burn.937 /// * Fungible Mode: The desired number of pieces to burn.
938 /// * Re-Fungible Mode: The desired number of parts to burn.938 /// * Re-Fungible Mode: The desired number of pieces to burn.
939 #[weight = T::CommonWeightInfo::burn_from()]939 #[weight = T::CommonWeightInfo::burn_from()]
940 #[transactional]940 #[transactional]
941 pub fn burn_from(origin, collection_id: CollectionId, from: T::CrossAccountId, item_id: TokenId, value: u128) -> DispatchResultWithPostInfo {941 pub fn burn_from(origin, collection_id: CollectionId, from: T::CrossAccountId, item_id: TokenId, value: u128) -> DispatchResultWithPostInfo {
963 /// * Re-Fungible Mode: Required.963 /// * Re-Fungible Mode: Required.
964 ///964 ///
965 /// * `value`: Amount to transfer.965 /// * `value`: Amount to transfer.
966 /// * Non-Fungible Mode: There is always 1 NFT.966 /// * Non-Fungible Mode: An NFT is indivisible, there is always 1 corresponding to an ID.
967 /// * Fungible Mode: The desired number of parts to transfer.967 /// * Fungible Mode: The desired number of pieces to transfer.
968 /// * Re-Fungible Mode: The desired number of parts to transfer.968 /// * Re-Fungible Mode: The desired number of pieces to transfer.
969 #[weight = T::CommonWeightInfo::transfer()]969 #[weight = T::CommonWeightInfo::transfer()]
970 #[transactional]970 #[transactional]
971 pub fn transfer(origin, recipient: T::CrossAccountId, collection_id: CollectionId, item_id: TokenId, value: u128) -> DispatchResultWithPostInfo {971 pub fn transfer(origin, recipient: T::CrossAccountId, collection_id: CollectionId, item_id: TokenId, value: u128) -> DispatchResultWithPostInfo {
988 /// * `spender`: Account to be approved to make specific transactions on non-owned tokens.988 /// * `spender`: Account to be approved to make specific transactions on non-owned tokens.
989 /// * `collection_id`: ID of the collection the item belongs to.989 /// * `collection_id`: ID of the collection the item belongs to.
990 /// * `item_id`: ID of the item transactions on which are now approved.990 /// * `item_id`: ID of the item transactions on which are now approved.
991 /// * `amount`: Number of approved transactions overwriting the current number,991 /// * `amount`: Number of pieces of the item approved for a transaction (maximum of 1 for NFTs).
992 /// e.g. set to `0` to remove approval.992 /// Set to 0 to revoke the approval.
993 #[weight = T::CommonWeightInfo::approve()]993 #[weight = T::CommonWeightInfo::approve()]
994 #[transactional]994 #[transactional]
995 pub fn approve(origin, spender: T::CrossAccountId, collection_id: CollectionId, item_id: TokenId, amount: u128) -> DispatchResultWithPostInfo {995 pub fn approve(origin, spender: T::CrossAccountId, collection_id: CollectionId, item_id: TokenId, amount: u128) -> DispatchResultWithPostInfo {
1017 /// * `recipient`: Address of the new token-owner-to-be.1017 /// * `recipient`: Address of the new token-owner-to-be.
1018 /// * `collection_id`: ID of the collection the item.1018 /// * `collection_id`: ID of the collection the item.
1019 /// * `item_id`: ID of the item to be transferred.1019 /// * `item_id`: ID of the item to be transferred.
1020 /// * `value`: Amount of parts to transfer.1020 /// * `value`: Amount to transfer.
1021 /// * Non-Fungible Mode: There is always 1 NFT.1021 /// * Non-Fungible Mode: An NFT is indivisible, there is always 1 corresponding to an ID.
1022 /// * Fungible Mode: The desired number of parts to transfer.1022 /// * Fungible Mode: The desired number of pieces to transfer.
1023 /// * Re-Fungible Mode: The desired number of parts to transfer.1023 /// * Re-Fungible Mode: The desired number of pieces to transfer.
1024 #[weight = T::CommonWeightInfo::transfer_from()]1024 #[weight = T::CommonWeightInfo::transfer_from()]
1025 #[transactional]1025 #[transactional]
1026 pub fn transfer_from(origin, from: T::CrossAccountId, recipient: T::CrossAccountId, collection_id: CollectionId, item_id: TokenId, value: u128 ) -> DispatchResultWithPostInfo {1026 pub fn transfer_from(origin, from: T::CrossAccountId, recipient: T::CrossAccountId, collection_id: CollectionId, item_id: TokenId, value: u128 ) -> DispatchResultWithPostInfo {
1040 /// # Arguments1040 /// # Arguments
1041 ///1041 ///
1042 /// * `collection_id`: ID of the modified collection.1042 /// * `collection_id`: ID of the modified collection.
1043 /// * `new_limit`: New limits of the collection. They will overwrite the current ones.1043 /// * `new_limit`: New limits of the collection. Fields that are not set (None)
1044 /// will not overwrite the old ones.
1044 #[weight = <SelfWeightOf<T>>::set_collection_limits()]1045 #[weight = <SelfWeightOf<T>>::set_collection_limits()]
1045 #[transactional]1046 #[transactional]
1046 pub fn set_collection_limits(1047 pub fn set_collection_limits(
1073 /// # Arguments1074 /// # Arguments
1074 ///1075 ///
1075 /// * `collection_id`: ID of the modified collection.1076 /// * `collection_id`: ID of the modified collection.
1076 /// * `new_permission`: New permissions of the collection. They will overwrite the current ones.1077 /// * `new_permission`: New permissions of the collection. Fields that are not set (None)
1078 /// will not overwrite the old ones.
1077 #[weight = <SelfWeightOf<T>>::set_collection_limits()]1079 #[weight = <SelfWeightOf<T>>::set_collection_limits()]
1078 #[transactional]1080 #[transactional]
1079 pub fn set_collection_permissions(1081 pub fn set_collection_permissions(
1096 target_collection.save()1098 target_collection.save()
1097 }1099 }
10981100
1099 /// Re-partition a refungible token, while owning all of its parts.1101 /// Re-partition a refungible token, while owning all of its parts/pieces.
1100 ///1102 ///
1101 /// # Permissions1103 /// # Permissions
1102 ///1104 ///
1106 ///1108 ///
1107 /// * `collection_id`: ID of the collection the RFT belongs to.1109 /// * `collection_id`: ID of the collection the RFT belongs to.
1108 /// * `token_id`: ID of the RFT.1110 /// * `token_id`: ID of the RFT.
1109 /// * `amount`: New number of parts into which the token shall be partitioned.1111 /// * `amount`: New number of parts/pieces into which the token shall be partitioned.
1110 #[weight = T::RefungibleExtensionsWeightInfo::repartition()]1112 #[weight = T::RefungibleExtensionsWeightInfo::repartition()]
1111 #[transactional]1113 #[transactional]
1112 pub fn repartition(1114 pub fn repartition(