difftreelog
doc: modify properties fns
in: master
3 files changed
pallets/common/src/lib.rsdiffbeforeafterboth1198 Ok(())1198 Ok(())1199 }1199 }120012001201 /// This function sets or removes a collection properties according to1202 /// `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 reverted1208 /// 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,pallets/nonfungible/src/lib.rsdiffbeforeafterboth577 })577 })578 }578 }579579580 /// 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 to582 /// 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` permission591 /// 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 reverted596 /// 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>,pallets/refungible/src/lib.rsdiffbeforeafterboth515 Ok(())515 Ok(())516 }516 }517517518 /// A batch operation to add, edit or remove properties for a token.519 /// It sets or removes a token's properties according to520 /// `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` permission529 /// 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 reverted534 /// 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>,