difftreelog
fix benchmarks
in: master
5 files changed
pallets/common/src/benchmarking.rsdiffbeforeafterboth--- a/pallets/common/src/benchmarking.rs
+++ b/pallets/common/src/benchmarking.rs
@@ -33,7 +33,7 @@
MAX_COLLECTION_NAME_LENGTH, MAX_PROPERTIES_PER_ITEM, MAX_TOKEN_PREFIX_LENGTH,
};
-use crate::{BenchmarkPropertyWriter, CollectionHandle, Config, Pallet};
+use crate::{BenchmarkPropertyWriter, CollectionHandle, CollectionIssuer, Config, Pallet};
const SEED: u32 = 1;
@@ -121,7 +121,7 @@
owner,
CollectionMode::NFT,
|owner: T::CrossAccountId, data| {
- <Pallet<T>>::init_collection(owner.clone(), Some(owner), false, data)
+ <Pallet<T>>::init_collection(owner.clone(), CollectionIssuer::User(owner), data)
},
|h| h,
)
pallets/fungible/src/benchmarking.rsdiffbeforeafterboth161617use frame_benchmarking::{account, v2::*};17use frame_benchmarking::{account, v2::*};18use pallet_common::{bench_init, benchmarking::create_collection_raw, Pallet as PalletCommon};18use pallet_common::{19 bench_init, benchmarking::create_collection_raw, CollectionIssuer, Pallet as PalletCommon,20};19use sp_std::prelude::*;21use sp_std::prelude::*;20use up_data_structs::{budget::Unlimited, CollectionMode, MAX_ITEMS_PER_BATCH};22use up_data_structs::{budget::Unlimited, CollectionMode, MAX_ITEMS_PER_BATCH};31 owner,33 owner,32 CollectionMode::Fungible(0),34 CollectionMode::Fungible(0),33 |owner: T::CrossAccountId, data| {35 |owner: T::CrossAccountId, data| {34 <PalletCommon<T>>::init_collection(owner.clone(), Some(owner), false, data)36 <PalletCommon<T>>::init_collection(owner.clone(), CollectionIssuer::User(owner), data)35 },37 },36 FungibleHandle::cast,38 FungibleHandle::cast,37 )39 )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()