git.delta.rocks / unique-network / refs/commits / d1f105e686c1

difftreelog

doc: add requested code review changes

Grigoriy Simonov2022-07-21parent: #ce4a2a5.patch.diff
in: master

2 files changed

modifiedpallets/nonfungible/src/erc.rsdiffbeforeafterboth
137 /// @dev Throws error if key not found137 /// @dev Throws error if key not found
138 /// @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 bytes
140 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)
modifiedpallets/nonfungible/src/lib.rsdiffbeforeafterboth
86//!86//!
87//! ## Assumptions87//! ## Assumptions
88//!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.
9190
92#![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 depth
850 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 configured
944 /// 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 reached
946 /// 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 the
949 /// corresponging tokens.
947 /// - `nesting_budget`: Limit for token nesting depth950 /// - `nesting_budget`: Limit for token nesting depth
948 pub fn create_multiple_items(951 pub fn create_multiple_items(
949 collection: &NonfungibleHandle<T>,952 collection: &NonfungibleHandle<T>,