difftreelog
doc: add requested code review changes
in: master
2 files changed
pallets/nonfungible/src/erc.rsdiffbeforeafterboth137 /// @dev Throws error if key not found137 /// @dev Throws error if key not found138 /// @param tokenId ID of the token.138 /// @param tokenId ID of the token.139 /// @param key Property key.139 /// @param key Property key.140 /// @return Property value bytes140 fn property(&self, token_id: uint256, key: string) -> Result<bytes> {141 fn property(&self, token_id: uint256, key: string) -> Result<bytes> {141 let token_id: u32 = token_id.try_into().map_err(|_| "token id overflow")?;142 let token_id: u32 = token_id.try_into().map_err(|_| "token id overflow")?;142 let key = <Vec<u8>>::from(key)143 let key = <Vec<u8>>::from(key)pallets/nonfungible/src/lib.rsdiffbeforeafterboth86//!86//!87//! ## Assumptions87//! ## Assumptions88//!88//!89//! * Total number of tokens of all types shouldn't be greater than `up_data_structs::MAX_TOKEN_PREFIX_LENGTH`.90//! * Sender should be in collection's allow list to perform operations on tokens.89//! * Sender should be in collection's allow list to perform operations on tokens.919092#![cfg_attr(not(feature = "std"), no_std)]91#![cfg_attr(not(feature = "std"), no_std)]845 /// If `to` is token than `to` becomes owner of the token and the token become nested.844 /// If `to` is token than `to` becomes owner of the token and the token become nested.846 /// Unnests token from previous parent if it was nested before.845 /// Unnests token from previous parent if it was nested before.847 /// Removes allowance for the token if there was any.846 /// Removes allowance for the token if there was any.847 /// Throws if transfers aren't allowed for collection or if receiver reached token ownership limit.848 ///848 ///849 /// - `nesting_budget`: Limit for token nesting depth849 /// - `nesting_budget`: Limit for token nesting depth850 pub fn transfer(850 pub fn transfer(942 ///942 ///943 /// The sender should be the owner/admin of the collection or collection should be configured943 /// The sender should be the owner/admin of the collection or collection should be configured944 /// to allow public minting.944 /// to allow public minting.945 /// Throws if amount of tokens reached it's limit for the collection or if caller reached946 /// token ownership limit.945 ///947 ///946 /// - `data`: Contains list of token properties and users who will become the owners of the corresponging tokens.948 /// - `data`: Contains list of token properties and users who will become the owners of the949 /// corresponging tokens.947 /// - `nesting_budget`: Limit for token nesting depth950 /// - `nesting_budget`: Limit for token nesting depth948 pub fn create_multiple_items(951 pub fn create_multiple_items(949 collection: &NonfungibleHandle<T>,952 collection: &NonfungibleHandle<T>,