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.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.rsdiffbeforeafterboth20use pallet_common::{20use pallet_common::{21 bench_init,21 bench_init,22 benchmarking::{create_collection_raw, property_key, property_value},22 benchmarking::{create_collection_raw, property_key, property_value},23 Pallet as PalletCommon,23 CollectionIssuer, Pallet as PalletCommon,24};24};25use sp_std::prelude::*;25use sp_std::prelude::*;26use up_data_structs::{26use up_data_structs::{63 owner,63 owner,64 CollectionMode::ReFungible,64 CollectionMode::ReFungible,65 |owner: T::CrossAccountId, data| {65 |owner: T::CrossAccountId, data| {66 <PalletCommon<T>>::init_collection(owner.clone(), Some(owner), false, data)66 <PalletCommon<T>>::init_collection(owner.clone(), CollectionIssuer::User(owner), data)67 },67 },68 RefungibleHandle::cast,68 RefungibleHandle::cast,69 )69 )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()