git.delta.rocks / unique-network / refs/commits / 91e514bdbb72

difftreelog

doc: modify properties fns

Daniel Shiposha2023-01-13parent: #5906b72.patch.diff
in: master

3 files changed

modifiedpallets/common/src/lib.rsdiffbeforeafterboth
1198 Ok(())1198 Ok(())
1199 }1199 }
12001200
1201 /// This function sets or removes a collection properties according to
1202 /// `properties_updates` contents:
1203 /// * sets a property under the <key> with the value provided `(<key>, Some(<value>))`
1204 /// * removes a property under the <key> if the value is `None` `(<key>, None)`.
1205 ///
1206 /// This function fires an event for each property change.
1207 /// In case of an error, all the changes (including the events) will be reverted
1208 /// since the function is transactional.
1209 #[transactional]
1201 fn modify_collection_properties(1210 fn modify_collection_properties(
1202 collection: &CollectionHandle<T>,1211 collection: &CollectionHandle<T>,
1203 sender: &T::CrossAccountId,1212 sender: &T::CrossAccountId,
1297 /// * `collection` - Collection handler.1306 /// * `collection` - Collection handler.
1298 /// * `sender` - The owner or administrator of the collection.1307 /// * `sender` - The owner or administrator of the collection.
1299 /// * `properties` - The properties to set.1308 /// * `properties` - The properties to set.
1300 #[transactional]
1301 pub fn set_collection_properties(1309 pub fn set_collection_properties(
1302 collection: &CollectionHandle<T>,1310 collection: &CollectionHandle<T>,
1303 sender: &T::CrossAccountId,1311 sender: &T::CrossAccountId,
1328 /// * `collection` - Collection handler.1336 /// * `collection` - Collection handler.
1329 /// * `sender` - The owner or administrator of the collection.1337 /// * `sender` - The owner or administrator of the collection.
1330 /// * `properties` - The properties to delete.1338 /// * `properties` - The properties to delete.
1331 #[transactional]
1332 pub fn delete_collection_properties(1339 pub fn delete_collection_properties(
1333 collection: &CollectionHandle<T>,1340 collection: &CollectionHandle<T>,
1334 sender: &T::CrossAccountId,1341 sender: &T::CrossAccountId,
modifiedpallets/nonfungible/src/lib.rsdiffbeforeafterboth
577 })577 })
578 }578 }
579579
580 /// Batch operation to add, edit or remove properties for the token580 /// A batch operation to add, edit or remove properties for a token.
581 ///581 /// It sets or removes a token's properties according to
582 /// All affected properties should have mutable permission and sender should have582 /// `properties_updates` contents:
583 /// permission to edit those properties.583 /// * sets a property under the <key> with the value provided `(<key>, Some(<value>))`
584 /// * removes a property under the <key> if the value is `None` `(<key>, None)`.
584 ///585 ///
585 /// - `nesting_budget`: Limit for searching parents in depth to check ownership.586 /// - `nesting_budget`: Limit for searching parents in-depth to check ownership.
586 /// - `is_token_create`: Indicates that method is called during token initialization.587 /// - `is_token_create`: Indicates that method is called during token initialization.
587 /// Allows to bypass ownership check.588 /// Allows to bypass ownership check.
589 ///
590 /// All affected properties should have `mutable` permission
591 /// to be **deleted** or to be **set more than once**,
592 /// and the sender should have permission to edit those properties.
593 ///
594 /// This function fires an event for each property change.
595 /// In case of an error, all the changes (including the events) will be reverted
596 /// since the function is transactional.
588 #[transactional]597 #[transactional]
589 fn modify_token_properties(598 fn modify_token_properties(
590 collection: &NonfungibleHandle<T>,599 collection: &NonfungibleHandle<T>,
modifiedpallets/refungible/src/lib.rsdiffbeforeafterboth
515 Ok(())515 Ok(())
516 }516 }
517517
518 /// A batch operation to add, edit or remove properties for a token.
519 /// It sets or removes a token's properties according to
520 /// `properties_updates` contents:
521 /// * sets a property under the <key> with the value provided `(<key>, Some(<value>))`
522 /// * removes a property under the <key> if the value is `None` `(<key>, None)`.
523 ///
524 /// - `nesting_budget`: Limit for searching parents in-depth to check ownership.
525 /// - `is_token_create`: Indicates that method is called during token initialization.
526 /// Allows to bypass ownership check.
527 ///
528 /// All affected properties should have `mutable` permission
529 /// to be **deleted** or to be **set more than once**,
530 /// and the sender should have permission to edit those properties.
531 ///
532 /// This function fires an event for each property change.
533 /// In case of an error, all the changes (including the events) will be reverted
534 /// since the function is transactional.
518 #[transactional]535 #[transactional]
519 fn modify_token_properties(536 fn modify_token_properties(
520 collection: &RefungibleHandle<T>,537 collection: &RefungibleHandle<T>,