git.delta.rocks / unique-network / refs/commits / 1893e990ecfb

difftreelog

source

pallets/unique/src/weights.rs10.8 KiBsourcehistory
1// Template adopted from https://github.com/paritytech/substrate/blob/master/.maintain/frame-weight-template.hbs23//! Autogenerated weights for pallet_unique4//!5//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev6//! DATE: 2022-03-01, STEPS: `50`, REPEAT: 200, LOW RANGE: `[]`, HIGH RANGE: `[]`7//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 102489// Executed Command:10// target/release/unique-collator11// benchmark12// --pallet13// pallet-unique14// --wasm-execution15// compiled16// --extrinsic17// *18// --template19// .maintain/frame-weight-template.hbs20// --steps=5021// --repeat=20022// --heap-pages=409623// --output=./pallets/unique/src/weights.rs2425#![cfg_attr(rustfmt, rustfmt_skip)]26#![allow(unused_parens)]27#![allow(unused_imports)]28#![allow(clippy::unnecessary_cast)]2930use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};31use sp_std::marker::PhantomData;3233/// Weight functions needed for pallet_unique.34pub trait WeightInfo {35	fn create_collection() -> Weight;36	fn destroy_collection() -> Weight;37	fn add_to_allow_list() -> Weight;38	fn remove_from_allow_list() -> Weight;39	fn set_public_access_mode() -> Weight;40	fn set_mint_permission() -> Weight;41	fn change_collection_owner() -> Weight;42	fn add_collection_admin() -> Weight;43	fn remove_collection_admin() -> Weight;44	fn set_collection_sponsor() -> Weight;45	fn confirm_sponsorship() -> Weight;46	fn remove_collection_sponsor() -> Weight;47	fn set_transfers_enabled_flag() -> Weight;48	fn set_offchain_schema(b: u32, ) -> Weight;49	fn set_const_on_chain_schema(b: u32, ) -> Weight;50	fn set_schema_version() -> Weight;51	fn set_collection_limits() -> Weight;52}5354/// Weights for pallet_unique using the Substrate node and recommended hardware.55pub struct SubstrateWeight<T>(PhantomData<T>);56impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {57	// Storage: Common CreatedCollectionCount (r:1 w:1)58	// Storage: Common DestroyedCollectionCount (r:1 w:0)59	// Storage: System Account (r:2 w:2)60	// Storage: Common CollectionById (r:0 w:1)61	fn create_collection() -> Weight {62		(28_929_000 as Weight)63			.saturating_add(T::DbWeight::get().reads(4 as Weight))64			.saturating_add(T::DbWeight::get().writes(4 as Weight))65	}66	// Storage: Common CollectionById (r:1 w:1)67	// Storage: Common DestroyedCollectionCount (r:1 w:1)68	// Storage: Nonfungible TokensMinted (r:0 w:1)69	// Storage: Nonfungible TokensBurnt (r:0 w:1)70	// Storage: Common AdminAmount (r:0 w:1)71	fn destroy_collection() -> Weight {72		(40_303_000 as Weight)73			.saturating_add(T::DbWeight::get().reads(2 as Weight))74			.saturating_add(T::DbWeight::get().writes(5 as Weight))75	}76	// Storage: Common CollectionById (r:1 w:0)77	// Storage: Common Allowlist (r:0 w:1)78	fn add_to_allow_list() -> Weight {79		(15_989_000 as Weight)80			.saturating_add(T::DbWeight::get().reads(1 as Weight))81			.saturating_add(T::DbWeight::get().writes(1 as Weight))82	}83	// Storage: Common CollectionById (r:1 w:0)84	// Storage: Common Allowlist (r:0 w:1)85	fn remove_from_allow_list() -> Weight {86		(15_582_000 as Weight)87			.saturating_add(T::DbWeight::get().reads(1 as Weight))88			.saturating_add(T::DbWeight::get().writes(1 as Weight))89	}90	// Storage: Common CollectionById (r:1 w:1)91	fn set_public_access_mode() -> Weight {92		(14_846_000 as Weight)93			.saturating_add(T::DbWeight::get().reads(1 as Weight))94			.saturating_add(T::DbWeight::get().writes(1 as Weight))95	}96	// Storage: Common CollectionById (r:1 w:1)97	fn set_mint_permission() -> Weight {98		(14_534_000 as Weight)99			.saturating_add(T::DbWeight::get().reads(1 as Weight))100			.saturating_add(T::DbWeight::get().writes(1 as Weight))101	}102	// Storage: Common CollectionById (r:1 w:1)103	fn change_collection_owner() -> Weight {104		(14_990_000 as Weight)105			.saturating_add(T::DbWeight::get().reads(1 as Weight))106			.saturating_add(T::DbWeight::get().writes(1 as Weight))107	}108	// Storage: Common CollectionById (r:1 w:0)109	// Storage: Common IsAdmin (r:1 w:1)110	// Storage: Common AdminAmount (r:1 w:1)111	fn add_collection_admin() -> Weight {112		(19_957_000 as Weight)113			.saturating_add(T::DbWeight::get().reads(3 as Weight))114			.saturating_add(T::DbWeight::get().writes(2 as Weight))115	}116	// Storage: Common CollectionById (r:1 w:0)117	// Storage: Common IsAdmin (r:1 w:1)118	// Storage: Common AdminAmount (r:1 w:1)119	fn remove_collection_admin() -> Weight {120		(21_209_000 as Weight)121			.saturating_add(T::DbWeight::get().reads(3 as Weight))122			.saturating_add(T::DbWeight::get().writes(2 as Weight))123	}124	// Storage: Common CollectionById (r:1 w:1)125	fn set_collection_sponsor() -> Weight {126		(14_963_000 as Weight)127			.saturating_add(T::DbWeight::get().reads(1 as Weight))128			.saturating_add(T::DbWeight::get().writes(1 as Weight))129	}130	// Storage: Common CollectionById (r:1 w:1)131	fn confirm_sponsorship() -> Weight {132		(14_478_000 as Weight)133			.saturating_add(T::DbWeight::get().reads(1 as Weight))134			.saturating_add(T::DbWeight::get().writes(1 as Weight))135	}136	// Storage: Common CollectionById (r:1 w:1)137	fn remove_collection_sponsor() -> Weight {138		(14_393_000 as Weight)139			.saturating_add(T::DbWeight::get().reads(1 as Weight))140			.saturating_add(T::DbWeight::get().writes(1 as Weight))141	}142	// Storage: Common CollectionById (r:1 w:1)143	fn set_transfers_enabled_flag() -> Weight {144		(7_309_000 as Weight)145			.saturating_add(T::DbWeight::get().reads(1 as Weight))146			.saturating_add(T::DbWeight::get().writes(1 as Weight))147	}148	// Storage: Common CollectionById (r:1 w:1)149	fn set_offchain_schema(_b: u32, ) -> Weight {150		(15_220_000 as Weight)151			.saturating_add(T::DbWeight::get().reads(1 as Weight))152			.saturating_add(T::DbWeight::get().writes(1 as Weight))153	}154	// Storage: Common CollectionById (r:1 w:1)155	fn set_const_on_chain_schema(_b: u32, ) -> Weight {156		(14_984_000 as Weight)157			.saturating_add(T::DbWeight::get().reads(1 as Weight))158			.saturating_add(T::DbWeight::get().writes(1 as Weight))159	}160	// Storage: Common CollectionById (r:1 w:1)161	fn set_schema_version() -> Weight {162		(14_596_000 as Weight)163			.saturating_add(T::DbWeight::get().reads(1 as Weight))164			.saturating_add(T::DbWeight::get().writes(1 as Weight))165	}166	// Storage: Common CollectionById (r:1 w:1)167	fn set_collection_limits() -> Weight {168		(15_339_000 as Weight)169			.saturating_add(T::DbWeight::get().reads(1 as Weight))170			.saturating_add(T::DbWeight::get().writes(1 as Weight))171	}172}173174// For backwards compatibility and tests175impl WeightInfo for () {176	// Storage: Common CreatedCollectionCount (r:1 w:1)177	// Storage: Common DestroyedCollectionCount (r:1 w:0)178	// Storage: System Account (r:2 w:2)179	// Storage: Common CollectionById (r:0 w:1)180	fn create_collection() -> Weight {181		(28_929_000 as Weight)182			.saturating_add(RocksDbWeight::get().reads(4 as Weight))183			.saturating_add(RocksDbWeight::get().writes(4 as Weight))184	}185	// Storage: Common CollectionById (r:1 w:1)186	// Storage: Common DestroyedCollectionCount (r:1 w:1)187	// Storage: Nonfungible TokensMinted (r:0 w:1)188	// Storage: Nonfungible TokensBurnt (r:0 w:1)189	// Storage: Common AdminAmount (r:0 w:1)190	fn destroy_collection() -> Weight {191		(40_303_000 as Weight)192			.saturating_add(RocksDbWeight::get().reads(2 as Weight))193			.saturating_add(RocksDbWeight::get().writes(5 as Weight))194	}195	// Storage: Common CollectionById (r:1 w:0)196	// Storage: Common Allowlist (r:0 w:1)197	fn add_to_allow_list() -> Weight {198		(15_989_000 as Weight)199			.saturating_add(RocksDbWeight::get().reads(1 as Weight))200			.saturating_add(RocksDbWeight::get().writes(1 as Weight))201	}202	// Storage: Common CollectionById (r:1 w:0)203	// Storage: Common Allowlist (r:0 w:1)204	fn remove_from_allow_list() -> Weight {205		(15_582_000 as Weight)206			.saturating_add(RocksDbWeight::get().reads(1 as Weight))207			.saturating_add(RocksDbWeight::get().writes(1 as Weight))208	}209	// Storage: Common CollectionById (r:1 w:1)210	fn set_public_access_mode() -> Weight {211		(14_846_000 as Weight)212			.saturating_add(RocksDbWeight::get().reads(1 as Weight))213			.saturating_add(RocksDbWeight::get().writes(1 as Weight))214	}215	// Storage: Common CollectionById (r:1 w:1)216	fn set_mint_permission() -> Weight {217		(14_534_000 as Weight)218			.saturating_add(RocksDbWeight::get().reads(1 as Weight))219			.saturating_add(RocksDbWeight::get().writes(1 as Weight))220	}221	// Storage: Common CollectionById (r:1 w:1)222	fn change_collection_owner() -> Weight {223		(14_990_000 as Weight)224			.saturating_add(RocksDbWeight::get().reads(1 as Weight))225			.saturating_add(RocksDbWeight::get().writes(1 as Weight))226	}227	// Storage: Common CollectionById (r:1 w:0)228	// Storage: Common IsAdmin (r:1 w:1)229	// Storage: Common AdminAmount (r:1 w:1)230	fn add_collection_admin() -> Weight {231		(19_957_000 as Weight)232			.saturating_add(RocksDbWeight::get().reads(3 as Weight))233			.saturating_add(RocksDbWeight::get().writes(2 as Weight))234	}235	// Storage: Common CollectionById (r:1 w:0)236	// Storage: Common IsAdmin (r:1 w:1)237	// Storage: Common AdminAmount (r:1 w:1)238	fn remove_collection_admin() -> Weight {239		(21_209_000 as Weight)240			.saturating_add(RocksDbWeight::get().reads(3 as Weight))241			.saturating_add(RocksDbWeight::get().writes(2 as Weight))242	}243	// Storage: Common CollectionById (r:1 w:1)244	fn set_collection_sponsor() -> Weight {245		(14_963_000 as Weight)246			.saturating_add(RocksDbWeight::get().reads(1 as Weight))247			.saturating_add(RocksDbWeight::get().writes(1 as Weight))248	}249	// Storage: Common CollectionById (r:1 w:1)250	fn confirm_sponsorship() -> Weight {251		(14_478_000 as Weight)252			.saturating_add(RocksDbWeight::get().reads(1 as Weight))253			.saturating_add(RocksDbWeight::get().writes(1 as Weight))254	}255	// Storage: Common CollectionById (r:1 w:1)256	fn remove_collection_sponsor() -> Weight {257		(14_393_000 as Weight)258			.saturating_add(RocksDbWeight::get().reads(1 as Weight))259			.saturating_add(RocksDbWeight::get().writes(1 as Weight))260	}261	// Storage: Common CollectionById (r:1 w:1)262	fn set_transfers_enabled_flag() -> Weight {263		(7_309_000 as Weight)264			.saturating_add(RocksDbWeight::get().reads(1 as Weight))265			.saturating_add(RocksDbWeight::get().writes(1 as Weight))266	}267	// Storage: Common CollectionById (r:1 w:1)268	fn set_offchain_schema(_b: u32, ) -> Weight {269		(15_220_000 as Weight)270			.saturating_add(RocksDbWeight::get().reads(1 as Weight))271			.saturating_add(RocksDbWeight::get().writes(1 as Weight))272	}273	// Storage: Common CollectionById (r:1 w:1)274	fn set_const_on_chain_schema(_b: u32, ) -> Weight {275		(14_984_000 as Weight)276			.saturating_add(RocksDbWeight::get().reads(1 as Weight))277			.saturating_add(RocksDbWeight::get().writes(1 as Weight))278	}279	// Storage: Common CollectionById (r:1 w:1)280	fn set_schema_version() -> Weight {281		(14_596_000 as Weight)282			.saturating_add(RocksDbWeight::get().reads(1 as Weight))283			.saturating_add(RocksDbWeight::get().writes(1 as Weight))284	}285	// Storage: Common CollectionById (r:1 w:1)286	fn set_collection_limits() -> Weight {287		(15_339_000 as Weight)288			.saturating_add(RocksDbWeight::get().reads(1 as Weight))289			.saturating_add(RocksDbWeight::get().writes(1 as Weight))290	}291}