difftreelog
fix(refungible) name/symbol should be always callable
in: master
1 file changed
pallets/refungible/src/erc.rsdiffbeforeafterboth195195196#[solidity_interface(name = ERC721Metadata)]196#[solidity_interface(name = ERC721Metadata)]197impl<T: Config> RefungibleHandle<T> {197impl<T: Config> RefungibleHandle<T> {198 /// @notice A descriptive name for a collection of RFTs in this contract198 /// @notice A descriptive name for a collection of NFTs in this contract199 /// @dev real implementation of this function lies in `ERC721UniqueExtensions`200 #[solidity(hide, rename_selector = "name")]199 fn name(&self) -> Result<string> {201 fn name_proxy(&self) -> Result<string> {200 Ok(decode_utf16(self.name.iter().copied())202 self.name()201 .map(|r| r.unwrap_or(REPLACEMENT_CHARACTER))202 .collect::<string>())203 }203 }204204205 /// @notice An abbreviated name for RFTs in this contract205 /// @notice An abbreviated name for NFTs in this contract206 /// @dev real implementation of this function lies in `ERC721UniqueExtensions`207 #[solidity(hide, rename_selector = "symbol")]206 fn symbol(&self) -> Result<string> {208 fn symbol_proxy(&self) -> Result<string> {207 Ok(string::from_utf8_lossy(&self.token_prefix).into())209 self.symbol()208 }210 }209211210 /// @notice A distinct Uniform Resource Identifier (URI) for a given asset.212 /// @notice A distinct Uniform Resource Identifier (URI) for a given asset.596/// @title Unique extensions for ERC721.598/// @title Unique extensions for ERC721.597#[solidity_interface(name = ERC721UniqueExtensions)]599#[solidity_interface(name = ERC721UniqueExtensions)]598impl<T: Config> RefungibleHandle<T> {600impl<T: Config> RefungibleHandle<T> {601 /// @notice A descriptive name for a collection of NFTs in this contract602 fn name(&self) -> Result<string> {603 Ok(decode_utf16(self.name.iter().copied())604 .map(|r| r.unwrap_or(REPLACEMENT_CHARACTER))605 .collect::<string>())606 }607608 /// @notice An abbreviated name for NFTs in this contract609 fn symbol(&self) -> Result<string> {610 Ok(string::from_utf8_lossy(&self.token_prefix).into())611 }612599 /// @notice Transfer ownership of an RFT613 /// @notice Transfer ownership of an RFT600 /// @dev Throws unless `msg.sender` is the current owner. Throws if `to`614 /// @dev Throws unless `msg.sender` is the current owner. Throws if `to`