--- a/pallets/nonfungible/src/common.rs +++ b/pallets/nonfungible/src/common.rs @@ -110,12 +110,16 @@ } } +/// Weight of minting tokens with properties +/// * `create_no_data_weight` -- the weight of minting without properties +/// * `token_properties_nums` -- number of properties of each token +#[inline] pub(crate) fn mint_with_props_weight( create_no_data_weight: Weight, - tokens: impl Iterator + Clone, + token_properties_nums: impl Iterator + Clone, ) -> Weight { create_no_data_weight.saturating_add(write_token_properties_total_weight::( - tokens, + token_properties_nums, >::write_token_properties, )) } --- a/pallets/refungible/src/common.rs +++ b/pallets/refungible/src/common.rs @@ -130,12 +130,16 @@ } } +/// Weight of minting tokens with properties +/// * `create_no_data_weight` -- the weight of minting without properties +/// * `token_properties_nums` -- number of properties of each token +#[inline] pub(crate) fn mint_with_props_weight( create_no_data_weight: Weight, - tokens: impl Iterator + Clone, + token_properties_nums: impl Iterator + Clone, ) -> Weight { create_no_data_weight.saturating_add(write_token_properties_total_weight::( - tokens, + token_properties_nums, >::write_token_properties, )) }