difftreelog
fix benchmarks
in: master
5 files changed
pallets/common/src/benchmarking.rsdiffbeforeafterboth33 MAX_COLLECTION_NAME_LENGTH, MAX_PROPERTIES_PER_ITEM, MAX_TOKEN_PREFIX_LENGTH,33 MAX_COLLECTION_NAME_LENGTH, MAX_PROPERTIES_PER_ITEM, MAX_TOKEN_PREFIX_LENGTH,34};34};353536use crate::{BenchmarkPropertyWriter, CollectionHandle, Config, Pallet};36use crate::{BenchmarkPropertyWriter, CollectionHandle, CollectionIssuer, Config, Pallet};373738const SEED: u32 = 1;38const SEED: u32 = 1;3939121 owner,121 owner,122 CollectionMode::NFT,122 CollectionMode::NFT,123 |owner: T::CrossAccountId, data| {123 |owner: T::CrossAccountId, data| {124 <Pallet<T>>::init_collection(owner.clone(), Some(owner), false, data)124 <Pallet<T>>::init_collection(owner.clone(), CollectionIssuer::User(owner), data)125 },125 },126 |h| h,126 |h| h,127 )127 )pallets/fungible/src/benchmarking.rsdiffbeforeafterboth--- a/pallets/fungible/src/benchmarking.rs
+++ b/pallets/fungible/src/benchmarking.rs
@@ -15,7 +15,9 @@
// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
use frame_benchmarking::{account, v2::*};
-use pallet_common::{bench_init, benchmarking::create_collection_raw, Pallet as PalletCommon};
+use pallet_common::{
+ bench_init, benchmarking::create_collection_raw, CollectionIssuer, Pallet as PalletCommon,
+};
use sp_std::prelude::*;
use up_data_structs::{budget::Unlimited, CollectionMode, MAX_ITEMS_PER_BATCH};
@@ -31,7 +33,7 @@
owner,
CollectionMode::Fungible(0),
|owner: T::CrossAccountId, data| {
- <PalletCommon<T>>::init_collection(owner.clone(), Some(owner), false, data)
+ <PalletCommon<T>>::init_collection(owner.clone(), CollectionIssuer::User(owner), data)
},
FungibleHandle::cast,
)
pallets/nonfungible/src/benchmarking.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/benchmarking.rs
+++ b/pallets/nonfungible/src/benchmarking.rs
@@ -18,7 +18,7 @@
use pallet_common::{
bench_init,
benchmarking::{create_collection_raw, property_key, property_value},
- Pallet as PalletCommon,
+ CollectionIssuer, Pallet as PalletCommon,
};
use sp_std::prelude::*;
use up_data_structs::{
@@ -58,7 +58,7 @@
owner,
CollectionMode::NFT,
|owner: T::CrossAccountId, data| {
- <PalletCommon<T>>::init_collection(owner.clone(), Some(owner), false, data)
+ <PalletCommon<T>>::init_collection(owner.clone(), CollectionIssuer::User(owner), data)
},
NonfungibleHandle::cast,
)
pallets/refungible/src/benchmarking.rsdiffbeforeafterboth--- a/pallets/refungible/src/benchmarking.rs
+++ b/pallets/refungible/src/benchmarking.rs
@@ -20,7 +20,7 @@
use pallet_common::{
bench_init,
benchmarking::{create_collection_raw, property_key, property_value},
- Pallet as PalletCommon,
+ CollectionIssuer, Pallet as PalletCommon,
};
use sp_std::prelude::*;
use up_data_structs::{
@@ -63,7 +63,7 @@
owner,
CollectionMode::ReFungible,
|owner: T::CrossAccountId, data| {
- <PalletCommon<T>>::init_collection(owner.clone(), Some(owner), false, data)
+ <PalletCommon<T>>::init_collection(owner.clone(), CollectionIssuer::User(owner), data)
},
RefungibleHandle::cast,
)
pallets/structure/src/benchmarking.rsdiffbeforeafterboth--- a/pallets/structure/src/benchmarking.rs
+++ b/pallets/structure/src/benchmarking.rs
@@ -16,7 +16,7 @@
use frame_benchmarking::v2::{account, benchmarks, BenchmarkError};
use frame_support::traits::{fungible::Balanced, tokens::Precision, Get};
-use pallet_common::Config as CommonConfig;
+use pallet_common::{CollectionIssuer, Config as CommonConfig};
use pallet_evm::account::CrossAccountId;
use sp_std::vec;
use up_data_structs::{
@@ -44,7 +44,7 @@
.unwrap();
T::CollectionDispatch::create(
caller_cross.clone(),
- Some(caller_cross.clone()),
+ CollectionIssuer::User(caller_cross.clone()),
CreateCollectionData {
mode: CollectionMode::NFT,
..Default::default()