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

difftreelog

fix weights for `mint_with_token_uri`, `mint_bulk_with_token_uri`

PraetorP2023-01-23parent: #befa82f.patch.diff
in: master

2 files changed

modifiedpallets/nonfungible/src/erc.rsdiffbeforeafterboth
590 /// @param tokenUri Token URI that would be stored in the NFT properties590 /// @param tokenUri Token URI that would be stored in the NFT properties
591 /// @return uint256 The id of the newly minted token591 /// @return uint256 The id of the newly minted token
592 #[solidity(rename_selector = "mintWithTokenURI")]592 #[solidity(rename_selector = "mintWithTokenURI")]
593 #[weight(<SelfWeightOf<T>>::create_item())]593 #[weight(<SelfWeightOf<T>>::create_item() + <SelfWeightOf<T>>::set_token_properties(1))]
594 fn mint_with_token_uri(594 fn mint_with_token_uri(
595 &mut self,595 &mut self,
596 caller: Caller,596 caller: Caller,
612 /// @param tokenId ID of the minted NFT612 /// @param tokenId ID of the minted NFT
613 /// @param tokenUri Token URI that would be stored in the NFT properties613 /// @param tokenUri Token URI that would be stored in the NFT properties
614 #[solidity(hide, rename_selector = "mintWithTokenURI")]614 #[solidity(hide, rename_selector = "mintWithTokenURI")]
615 #[weight(<SelfWeightOf<T>>::create_item())]615 #[weight(<SelfWeightOf<T>>::create_item() + <SelfWeightOf<T>>::set_token_properties(1))]
616 fn mint_with_token_uri_check_id(616 fn mint_with_token_uri_check_id(
617 &mut self,617 &mut self,
618 caller: Caller,618 caller: Caller,
943 /// @param to The new owner943 /// @param to The new owner
944 /// @param tokens array of pairs of token ID and token URI for minted tokens944 /// @param tokens array of pairs of token ID and token URI for minted tokens
945 #[solidity(hide, rename_selector = "mintBulkWithTokenURI")]945 #[solidity(hide, rename_selector = "mintBulkWithTokenURI")]
946 #[weight(<SelfWeightOf<T>>::create_multiple_items(tokens.len() as u32))]946 #[weight(<SelfWeightOf<T>>::create_multiple_items(tokens.len() as u32) + <SelfWeightOf<T>>::set_token_properties(tokens.len() as u32))]
947 fn mint_bulk_with_token_uri(947 fn mint_bulk_with_token_uri(
948 &mut self,948 &mut self,
949 caller: Caller,949 caller: Caller,
modifiedpallets/refungible/src/erc.rsdiffbeforeafterboth
629 /// @param tokenUri Token URI that would be stored in the NFT properties629 /// @param tokenUri Token URI that would be stored in the NFT properties
630 /// @return uint256 The id of the newly minted token630 /// @return uint256 The id of the newly minted token
631 #[solidity(rename_selector = "mintWithTokenURI")]631 #[solidity(rename_selector = "mintWithTokenURI")]
632 #[weight(<SelfWeightOf<T>>::create_item())]632 #[weight(<SelfWeightOf<T>>::create_item() + <SelfWeightOf<T>>::set_token_properties(1))]
633 fn mint_with_token_uri(633 fn mint_with_token_uri(
634 &mut self,634 &mut self,
635 caller: Caller,635 caller: Caller,
651 /// @param tokenId ID of the minted RFT651 /// @param tokenId ID of the minted RFT
652 /// @param tokenUri Token URI that would be stored in the RFT properties652 /// @param tokenUri Token URI that would be stored in the RFT properties
653 #[solidity(hide, rename_selector = "mintWithTokenURI")]653 #[solidity(hide, rename_selector = "mintWithTokenURI")]
654 #[weight(<SelfWeightOf<T>>::create_item())]654 #[weight(<SelfWeightOf<T>>::create_item() + <SelfWeightOf<T>>::set_token_properties(1))]
655 fn mint_with_token_uri_check_id(655 fn mint_with_token_uri_check_id(
656 &mut self,656 &mut self,
657 caller: Caller,657 caller: Caller,
994 /// @param to The new owner994 /// @param to The new owner
995 /// @param tokens array of pairs of token ID and token URI for minted tokens995 /// @param tokens array of pairs of token ID and token URI for minted tokens
996 #[solidity(hide, rename_selector = "mintBulkWithTokenURI")]996 #[solidity(hide, rename_selector = "mintBulkWithTokenURI")]
997 #[weight(<SelfWeightOf<T>>::create_multiple_items(tokens.len() as u32))]997 #[weight(<SelfWeightOf<T>>::create_multiple_items(tokens.len() as u32) + <SelfWeightOf<T>>::set_token_properties(tokens.len() as u32))]
998 fn mint_bulk_with_token_uri(998 fn mint_bulk_with_token_uri(
999 &mut self,999 &mut self,
1000 caller: Caller,1000 caller: Caller,