difftreelog
Merge pull request #778 from UniqueNetwork/fix/add-weight-to-nft-and-rft-evm-methods
in: master
2 files changed
pallets/nonfungible/src/erc.rsdiffbeforeafterboth59 /// @param isMutable Permission to mutate property.59 /// @param isMutable Permission to mutate property.60 /// @param collectionAdmin Permission to mutate property by collection admin if property is mutable.60 /// @param collectionAdmin Permission to mutate property by collection admin if property is mutable.61 /// @param tokenOwner Permission to mutate property by token owner if property is mutable.61 /// @param tokenOwner Permission to mutate property by token owner if property is mutable.62 #[weight(<SelfWeightOf<T>>::set_token_property_permissions(1))]62 fn set_token_property_permission(63 fn set_token_property_permission(63 &mut self,64 &mut self,64 caller: caller,65 caller: caller,91 /// @param key Property key.92 /// @param key Property key.92 /// @param value Property value.93 /// @param value Property value.93 #[solidity(hide)]94 #[solidity(hide)]95 #[weight(<SelfWeightOf<T>>::set_token_properties(1))]94 fn set_property(96 fn set_property(95 &mut self,97 &mut self,96 caller: caller,98 caller: caller,166 /// @param tokenId ID of the token.168 /// @param tokenId ID of the token.167 /// @param key Property key.169 /// @param key Property key.168 #[solidity(hide)]170 #[solidity(hide)]171 #[weight(<SelfWeightOf<T>>::delete_token_properties(1))]169 fn delete_property(&mut self, token_id: uint256, caller: caller, key: string) -> Result<()> {172 fn delete_property(&mut self, token_id: uint256, caller: caller, key: string) -> Result<()> {170 let caller = T::CrossAccountId::from_eth(caller);173 let caller = T::CrossAccountId::from_eth(caller);171 let token_id: u32 = token_id.try_into().map_err(|_| "token id overflow")?;174 let token_id: u32 = token_id.try_into().map_err(|_| "token id overflow")?;185 /// @dev Throws error if `msg.sender` has no permission to edit the property.188 /// @dev Throws error if `msg.sender` has no permission to edit the property.186 /// @param tokenId ID of the token.189 /// @param tokenId ID of the token.187 /// @param keys Properties key.190 /// @param keys Properties key.191 #[weight(<SelfWeightOf<T>>::delete_token_properties(keys.len() as u32))]188 fn delete_properties(192 fn delete_properties(189 &mut self,193 &mut self,190 token_id: uint256,194 token_id: uint256,pallets/refungible/src/erc.rsdiffbeforeafterboth62 /// @param isMutable Permission to mutate property.62 /// @param isMutable Permission to mutate property.63 /// @param collectionAdmin Permission to mutate property by collection admin if property is mutable.63 /// @param collectionAdmin Permission to mutate property by collection admin if property is mutable.64 /// @param tokenOwner Permission to mutate property by token owner if property is mutable.64 /// @param tokenOwner Permission to mutate property by token owner if property is mutable.65 #[weight(<SelfWeightOf<T>>::set_token_property_permissions(1))]65 fn set_token_property_permission(66 fn set_token_property_permission(66 &mut self,67 &mut self,67 caller: caller,68 caller: caller,94 /// @param key Property key.95 /// @param key Property key.95 /// @param value Property value.96 /// @param value Property value.96 #[solidity(hide)]97 #[solidity(hide)]98 #[weight(<SelfWeightOf<T>>::set_token_properties(1))]97 fn set_property(99 fn set_property(98 &mut self,100 &mut self,99 caller: caller,101 caller: caller,126 /// @dev Throws error if `msg.sender` has no permission to edit the property.128 /// @dev Throws error if `msg.sender` has no permission to edit the property.127 /// @param tokenId ID of the token.129 /// @param tokenId ID of the token.128 /// @param properties settable properties130 /// @param properties settable properties131 #[weight(<SelfWeightOf<T>>::set_token_properties(properties.len() as u32))]129 fn set_properties(132 fn set_properties(130 &mut self,133 &mut self,131 caller: caller,134 caller: caller,168 /// @param tokenId ID of the token.171 /// @param tokenId ID of the token.169 /// @param key Property key.172 /// @param key Property key.170 #[solidity(hide)]173 #[solidity(hide)]174 #[weight(<SelfWeightOf<T>>::delete_token_properties(1))]171 fn delete_property(&mut self, token_id: uint256, caller: caller, key: string) -> Result<()> {175 fn delete_property(&mut self, token_id: uint256, caller: caller, key: string) -> Result<()> {172 let caller = T::CrossAccountId::from_eth(caller);176 let caller = T::CrossAccountId::from_eth(caller);173 let token_id: u32 = token_id.try_into().map_err(|_| "token id overflow")?;177 let token_id: u32 = token_id.try_into().map_err(|_| "token id overflow")?;187 /// @dev Throws error if `msg.sender` has no permission to edit the property.191 /// @dev Throws error if `msg.sender` has no permission to edit the property.188 /// @param tokenId ID of the token.192 /// @param tokenId ID of the token.189 /// @param keys Properties key.193 /// @param keys Properties key.194 #[weight(<SelfWeightOf<T>>::delete_token_properties(keys.len() as u32))]190 fn delete_properties(195 fn delete_properties(191 &mut self,196 &mut self,192 token_id: uint256,197 token_id: uint256,