From ce4a2a5245a84cbe26118da1faf83297a2e73545 Mon Sep 17 00:00:00 2001 From: Grigoriy Simonov Date: Thu, 21 Jul 2022 09:07:44 +0000 Subject: [PATCH] chore: fix formatting --- --- a/pallets/nonfungible/src/erc.rs +++ b/pallets/nonfungible/src/erc.rs @@ -15,7 +15,7 @@ // along with Unique Network. If not, see . //! # Nonfungible Pallet EVM API -//! +//! //! Provides ERC-721 standart support implementation and EVM API for unique extensions for Nonfungible Pallet. //! Method implementations are mostly doing parameter conversion and calling Nonfungible Pallet methods. @@ -46,7 +46,7 @@ }; /// @title A contract that allows to set and delete token properties and change token property permissions. -/// +/// #[solidity_interface(name = "TokenProperties")] impl NonfungibleHandle { /// @notice Set permissions for token property. @@ -212,9 +212,9 @@ } /// @notice A distinct Uniform Resource Identifier (URI) for a given asset. - /// @dev Throws if `tokenId` is not a valid NFT. URIs are defined in RFC - /// 3986. The URI may point to a JSON file that conforms to the "ERC721 - /// Metadata JSON Schema". + /// @dev Throws if `tokenId` is not a valid NFT. URIs are defined in RFC + /// 3986. The URI may point to a JSON file that conforms to the "ERC721 + /// Metadata JSON Schema". /// @return token's const_metadata #[solidity(rename_selector = "tokenURI")] fn token_uri(&self, token_id: uint256) -> Result { @@ -241,9 +241,9 @@ #[solidity_interface(name = "ERC721Enumerable")] impl NonfungibleHandle { /// @notice Enumerate valid NFTs - /// @param index A counter less than `totalSupply()` - /// @return The token identifier for the `index`th NFT, - /// (sort order not specified) + /// @param index A counter less than `totalSupply()` + /// @return The token identifier for the `index`th NFT, + /// (sort order not specified) fn token_by_index(&self, index: uint256) -> Result { Ok(index) } @@ -255,8 +255,8 @@ } /// @notice Count NFTs tracked by this contract - /// @return A count of valid NFTs tracked by this contract, where each one of - /// them has an assigned and queryable owner not equal to the zero address + /// @return A count of valid NFTs tracked by this contract, where each one of + /// them has an assigned and queryable owner not equal to the zero address fn total_supply(&self) -> Result { self.consume_store_reads(1)?; Ok(>::total_supply(self).into()) --- a/pallets/nonfungible/src/lib.rs +++ b/pallets/nonfungible/src/lib.rs @@ -48,11 +48,11 @@ //! //! - **Burning:** The process of “deleting” a token from a collection and from //! an account balance of the owner. -//! +//! //! - **Nesting:** Setting up parent-child relationship between tokens. Nested tokens are inhereting //! owner from their parent. There could be multiple levels of nesting. Token couldn't be nested in //! it's child token i.e. parent-child relationship graph shouldn't have cycles. -//! +//! //! - **Properties:** Key-Values pairs. Token properties are attached to a token. Collection properties are //! attached to a collection. Set of permissions could be defined for each property. //! @@ -83,7 +83,7 @@ //! - `delete_collection_properties` - Remove properties from the collection. //! - `set_property_permission` - Set collection property permission. //! - `set_token_property_permissions` - Set token property permissions. -//! +//! //! ## Assumptions //! //! * Total number of tokens of all types shouldn't be greater than `up_data_structs::MAX_TOKEN_PREFIX_LENGTH`. @@ -369,7 +369,7 @@ } /// Set the token property with the scope. - /// + /// /// - `property`: Contains key-value pair. pub fn set_scoped_token_property( collection_id: CollectionId, @@ -401,7 +401,7 @@ } /// Add or edit auxiliary data for the property. - /// + /// /// - `f`: function that adds or edits auxiliary data. pub fn try_mutate_token_aux_property( collection_id: CollectionId, @@ -424,7 +424,7 @@ } /// Get all auxiliary data in a given scope. - /// + /// /// Returns iterator over Property Key - Data pairs. pub fn iterate_token_aux_properties( collection_id: CollectionId, @@ -565,7 +565,7 @@ /// /// - `self_budget`: Limit for searching children in depth. /// - `breadth_budget`: Limit of breadth of searching children. - /// + /// /// [`burn`]: struct.Pallet.html#method.burn #[transactional] pub fn burn_recursively( @@ -607,10 +607,10 @@ } /// Batch operation to add, edit or remove properties for the token - /// + /// /// All affected properties should have mutable permission and sender should have - /// permission to edit those properties. - /// + /// permission to edit those properties. + /// /// - `nesting_budget`: Limit for searching parents in depth to check ownership. /// - `is_token_create`: Indicates that method is called during token initialization. /// Allows to bypass ownership check. @@ -708,9 +708,9 @@ } /// Batch operation to add or edit properties for the token - /// + /// /// Same as [`modify_token_properties`] but doesn't allow to remove properties - /// + /// /// [`modify_token_properties`]: struct.Pallet.html#method.modify_token_properties pub fn set_token_properties( collection: &NonfungibleHandle, @@ -731,9 +731,9 @@ } /// Add or edit single property for the token - /// + /// /// Calls [`set_token_properties`] internally - /// + /// /// [`set_token_properties`]: struct.Pallet.html#method.set_token_properties pub fn set_token_property( collection: &NonfungibleHandle, @@ -755,9 +755,9 @@ } /// Batch operation to remove properties from the token - /// + /// /// Same as [`modify_token_properties`] but doesn't allow to add or edit properties - /// + /// /// [`modify_token_properties`]: struct.Pallet.html#method.modify_token_properties pub fn delete_token_properties( collection: &NonfungibleHandle, @@ -779,9 +779,9 @@ } /// Remove single property from the token - /// + /// /// Calls [`delete_token_properties`] internally - /// + /// /// [`delete_token_properties`]: struct.Pallet.html#method.delete_token_properties pub fn delete_token_property( collection: &NonfungibleHandle, @@ -818,7 +818,7 @@ } /// Set property permissions for the token. - /// + /// /// Sender should be the owner or admin of token's collection. pub fn set_token_property_permissions( collection: &CollectionHandle, @@ -829,7 +829,7 @@ } /// Set property permissions for the collection. - /// + /// /// Sender should be the owner or admin of the collection. pub fn set_property_permission( collection: &CollectionHandle, @@ -1250,7 +1250,7 @@ } /// Check that `from` token could be nested in `under` token. - /// + /// pub fn check_nesting( handle: &NonfungibleHandle, sender: T::CrossAccountId, @@ -1321,7 +1321,7 @@ } /// Mint single NFT token. - /// + /// /// Delegated to [`create_multiple_items`] /// /// [`create_multiple_items`]: struct.Pallet.html#method.create_multiple_items -- gitstuff