difftreelog
doc: adjust semantics
in: master
1 file changed
pallets/unique/src/lib.rsdiffbeforeafterboth27//! The Unique pallet's purpose is to be the primary interface between27//! The Unique pallet's purpose is to be the primary interface between28//! external users and the inner structure of the Unique chains.28//! external users and the inner structure of the Unique chains.29//!29//!30//! It also contains an implementation of [`CollectionHelpers`](eth),30//! It also contains an implementation of [`CollectionHelpers`][`eth`],31//! an Ethereum contract dealing with collection operations.31//! an Ethereum contract dealing with collection operations.32//!32//!33//! ## Interface33//! ## Interface292 0292 0293 }293 }294294295 /// DEPRECATED - use createCollectionEx. Create a Collection of tokens.295 /// 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 bytes298 /// of certain length. The initial owner of the collection is set298 /// of certain length. The initial owner of the collection is set299 /// to the address that signed the transaction and can be changed later.299 /// to the address that signed the transaction and can be changed later.300 ///300 ///301 /// Prefer [`create_collection_ex`](Call::create_collection_ex) instead.301 /// Deprecated! Prefer [`create_collection_ex`][`Pallet::create_collection_ex`] instead.302 ///302 ///303 /// # Permissions303 /// # Permissions304 ///304 ///305 /// * Anyone - becomes the owner of the new collection.305 /// * Anyone - becomes the owner of the new collection.306 ///306 ///307 /// # Arguments307 /// # Arguments308 ///308 ///309 /// * `collection_name`: UTF-16 string with collection name (limit 64 characters),309 /// * `collection_name`: Wide-character string with collection name310 /// will be stored as zero-terminated.310 /// (limit [`MAX_COLLECTION_NAME_LENGTH`]).311 /// * `collection_description`: UTF-16 string with collection description (limit 256 characters),311 /// * `collection_description`: Wide-character string with collection description312 /// will be stored as zero-terminated.312 /// (limit [`MAX_COLLECTION_DESCRIPTION_LENGTH`]).313 /// * `token_prefix`: UTF-8 string with token prefix.313 /// * `token_prefix`: Byte string containing the token prefix to mark a collection314 /// to which a token belongs (limit [`MAX_TOKEN_PREFIX_LENGTH`]).314 /// * `mode`: [`CollectionMode`] and type dependent data.315 /// * `mode`: Type of items stored in the collection and type dependent data.315 // returns collection ID316 // returns collection ID316 #[weight = <SelfWeightOf<T>>::create_collection()]317 #[weight = <SelfWeightOf<T>>::create_collection()]317 #[transactional]318 #[transactional]334 }335 }335336336 /// Create a collection with explicit parameters.337 /// Create a collection with explicit parameters.338 ///337 /// Prefer it to the deprecated [`create_collection`](Call::create_collection) method.339 /// Prefer it to the deprecated [`create_collection`][`Pallet::create_collection`] method.338 ///340 ///339 /// # Permissions341 /// # Permissions340 ///342 ///544 }546 }545547546 /// Set (invite) a new collection sponsor.548 /// Set (invite) a new collection sponsor.549 ///547 /// If successful, confirmation from the sponsor-to-be will be pending.550 /// If successful, confirmation from the sponsor-to-be will be pending.548 ///551 ///549 /// # Permissions552 /// # Permissions575 }578 }576579577 /// Confirm own sponsorship of a collection, becoming the sponsor.580 /// Confirm own sponsorship of a collection, becoming the sponsor.578 /// An invitation must be pending, see [`set_collection_sponsor`](Call::set_collection_sponsor).579 ///581 ///582 /// An invitation must be pending, see [`set_collection_sponsor`][`Pallet::set_collection_sponsor`].580 /// Sponsor can pay the fees of a transaction instead of the sender,583 /// Sponsor can pay the fees of a transaction instead of the sender,581 /// but only within specified limits.584 /// but only within specified limits.582 ///585 ///607 target_collection.save()610 target_collection.save()608 }611 }609612610 /// Remove a sponsor from a collection, making everyone pay for their own transactions.613 /// Remove a collection's a sponsor, making everyone pay for their own transactions.611 ///614 ///612 /// # Permissions615 /// # Permissions613 ///616 ///635638636 /// Mint an item within a collection.639 /// Mint an item within a collection.637 ///640 ///638 /// A collection must exist first, see [`create_collection_ex`](Call::create_collection_ex).641 /// A collection must exist first, see [`create_collection_ex`][`Pallet::create_collection_ex`].639 ///642 ///640 /// # Permissions643 /// # Permissions641 ///644 ///644 /// * Anyone if647 /// * Anyone if645 /// * Allow List is enabled, and648 /// * Allow List is enabled, and646 /// * Address is added to allow list, and649 /// * Address is added to allow list, and647 /// * MintPermission is enabled (see [`set_collection_permissions`](Call::set_collection_permissions))650 /// * MintPermission is enabled (see [`set_collection_permissions`][`Pallet::set_collection_permissions`])648 ///651 ///649 /// # Arguments652 /// # Arguments650 ///653 ///662665663 /// Create multiple items within a collection.666 /// Create multiple items within a collection.664 ///667 ///665 /// A collection must exist first, see [`create_collection_ex`](Call::create_collection_ex).668 /// A collection must exist first, see [`create_collection_ex`][`Pallet::create_collection_ex`].666 ///669 ///667 /// # Permissions670 /// # Permissions668 ///671 ///671 /// * Anyone if674 /// * Anyone if672 /// * Allow List is enabled, and675 /// * Allow List is enabled, and673 /// * Address is added to the allow list, and676 /// * Address is added to the allow list, and674 /// * MintPermission is enabled (see [`set_collection_permissions`](Call::set_collection_permissions))677 /// * MintPermission is enabled (see [`set_collection_permissions`][`Pallet::set_collection_permissions`])675 ///678 ///676 /// # Arguments679 /// # Arguments677 ///680 ///750 /// * Collection admin753 /// * Collection admin751 /// * Token owner754 /// * Token owner752 ///755 ///753 /// See [`set_token_property_permissions`](Call::set_token_property_permissions).756 /// See [`set_token_property_permissions`][`Pallet::set_token_property_permissions`].754 ///757 ///755 /// # Arguments758 /// # Arguments756 ///759 ///843 /// * Anyone if846 /// * Anyone if844 /// * Allow List is enabled, and847 /// * Allow List is enabled, and845 /// * Address is added to allow list, and848 /// * Address is added to allow list, and846 /// * MintPermission is enabled (see [`set_collection_permissions`](Call::set_collection_permissions))849 /// * MintPermission is enabled (see [`set_collection_permissions`][`Pallet::set_collection_permissions`])847 ///850 ///848 /// # Arguments851 /// # Arguments849 ///852 ///915 }918 }916919917 /// Destroy a token on behalf of the owner as a non-owner account.920 /// Destroy a token on behalf of the owner as a non-owner account.921 ///918 /// See also: [`approve`](Call::approve).922 /// See also: [`approve`][`Pallet::approve`].919 ///923 ///920 /// After this method executes, one approval is removed from the total so that924 /// After this method executes, one approval is removed from the total so that921 /// the approved address will not be able to transfer this item again from this owner.925 /// the approved address will not be able to transfer this item again from this owner.999 }1003 }100010041001 /// Change ownership of an item on behalf of the owner as a non-owner account.1005 /// Change ownership of an item on behalf of the owner as a non-owner account.1006 ///1002 /// See the [`approve`](Call::approve) method for additional information.1007 /// See the [`approve`][`Pallet::approve`] method for additional information.1003 ///1008 ///1004 /// After this method executes, one approval is removed from the total so that1009 /// After this method executes, one approval is removed from the total so that1005 /// the approved address will not be able to transfer this item again from this owner.1010 /// the approved address will not be able to transfer this item again from this owner.