difftreelog
fix weights for `mint_with_token_uri`, `mint_bulk_with_token_uri`
in: master
2 files changed
pallets/nonfungible/src/erc.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/erc.rs
+++ b/pallets/nonfungible/src/erc.rs
@@ -590,7 +590,7 @@
/// @param tokenUri Token URI that would be stored in the NFT properties
/// @return uint256 The id of the newly minted token
#[solidity(rename_selector = "mintWithTokenURI")]
- #[weight(<SelfWeightOf<T>>::create_item())]
+ #[weight(<SelfWeightOf<T>>::create_item() + <SelfWeightOf<T>>::set_token_properties(1))]
fn mint_with_token_uri(
&mut self,
caller: Caller,
@@ -612,7 +612,7 @@
/// @param tokenId ID of the minted NFT
/// @param tokenUri Token URI that would be stored in the NFT properties
#[solidity(hide, rename_selector = "mintWithTokenURI")]
- #[weight(<SelfWeightOf<T>>::create_item())]
+ #[weight(<SelfWeightOf<T>>::create_item() + <SelfWeightOf<T>>::set_token_properties(1))]
fn mint_with_token_uri_check_id(
&mut self,
caller: Caller,
@@ -943,7 +943,7 @@
/// @param to The new owner
/// @param tokens array of pairs of token ID and token URI for minted tokens
#[solidity(hide, rename_selector = "mintBulkWithTokenURI")]
- #[weight(<SelfWeightOf<T>>::create_multiple_items(tokens.len() as u32))]
+ #[weight(<SelfWeightOf<T>>::create_multiple_items(tokens.len() as u32) + <SelfWeightOf<T>>::set_token_properties(tokens.len() as u32))]
fn mint_bulk_with_token_uri(
&mut self,
caller: Caller,
pallets/refungible/src/erc.rsdiffbeforeafterboth629 /// @param tokenUri Token URI that would be stored in the NFT properties629 /// @param tokenUri Token URI that would be stored in the NFT properties630 /// @return uint256 The id of the newly minted token630 /// @return uint256 The id of the newly minted token631 #[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 RFT652 /// @param tokenUri Token URI that would be stored in the RFT properties652 /// @param tokenUri Token URI that would be stored in the RFT properties653 #[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 owner995 /// @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 tokens996 #[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,