git.delta.rocks / unique-network / refs/commits / eebd5d8677d8

difftreelog

source

pallets/unique/src/weights.rs11.7 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: 2021-10-21, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`7//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 12889// 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=2022// --output=./pallets/unique/src/weights.rs232425#![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_variable_on_chain_schema(b: u32, ) -> Weight;51	fn set_schema_version() -> Weight;52	fn set_collection_limits() -> Weight;53	fn set_meta_update_permission_flag() -> Weight;54}5556/// Weights for pallet_unique using the Substrate node and recommended hardware.57pub struct SubstrateWeight<T>(PhantomData<T>);58impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {59	// Storage: Common CreatedCollectionCount (r:1 w:1)60	// Storage: Common DestroyedCollectionCount (r:1 w:0)61	// Storage: System Account (r:2 w:2)62	// Storage: Common CollectionById (r:0 w:1)63	fn create_collection() -> Weight {64		(23_803_000 as Weight)65			.saturating_add(T::DbWeight::get().reads(4 as Weight))66			.saturating_add(T::DbWeight::get().writes(4 as Weight))67	}68	// Storage: Common CollectionById (r:1 w:1)69	// Storage: Common DestroyedCollectionCount (r:1 w:1)70	// Storage: Nonfungible TokensMinted (r:0 w:1)71	// Storage: Nonfungible TokensBurnt (r:0 w:1)72	fn destroy_collection() -> Weight {73		(27_831_000 as Weight)74			.saturating_add(T::DbWeight::get().reads(2 as Weight))75			.saturating_add(T::DbWeight::get().writes(4 as Weight))76	}77	// Storage: Common CollectionById (r:1 w:0)78	// Storage: Common Allowlist (r:0 w:1)79	fn add_to_allow_list() -> Weight {80		(6_629_000 as Weight)81			.saturating_add(T::DbWeight::get().reads(1 as Weight))82			.saturating_add(T::DbWeight::get().writes(1 as Weight))83	}84	// Storage: Common CollectionById (r:1 w:0)85	// Storage: Common Allowlist (r:0 w:1)86	fn remove_from_allow_list() -> Weight {87		(6_596_000 as Weight)88			.saturating_add(T::DbWeight::get().reads(1 as Weight))89			.saturating_add(T::DbWeight::get().writes(1 as Weight))90	}91	// Storage: Common CollectionById (r:1 w:1)92	fn set_public_access_mode() -> Weight {93		(6_338_000 as Weight)94			.saturating_add(T::DbWeight::get().reads(1 as Weight))95			.saturating_add(T::DbWeight::get().writes(1 as Weight))96	}97	// Storage: Common CollectionById (r:1 w:1)98	fn set_mint_permission() -> Weight {99		(6_383_000 as Weight)100			.saturating_add(T::DbWeight::get().reads(1 as Weight))101			.saturating_add(T::DbWeight::get().writes(1 as Weight))102	}103	// Storage: Common CollectionById (r:1 w:1)104	fn change_collection_owner() -> Weight {105		(6_493_000 as Weight)106			.saturating_add(T::DbWeight::get().reads(1 as Weight))107			.saturating_add(T::DbWeight::get().writes(1 as Weight))108	}109	// Storage: Common CollectionById (r:1 w:0)110	// Storage: Common IsAdmin (r:0 w:1)111	fn add_collection_admin() -> Weight {112		(6_850_000 as Weight)113			.saturating_add(T::DbWeight::get().reads(1 as Weight))114			.saturating_add(T::DbWeight::get().writes(1 as Weight))115	}116	// Storage: Common CollectionById (r:1 w:0)117	// Storage: Common IsAdmin (r:0 w:1)118	fn remove_collection_admin() -> Weight {119		(6_615_000 as Weight)120			.saturating_add(T::DbWeight::get().reads(1 as Weight))121			.saturating_add(T::DbWeight::get().writes(1 as Weight))122	}123	// Storage: Common CollectionById (r:1 w:1)124	fn set_collection_sponsor() -> Weight {125		(6_430_000 as Weight)126			.saturating_add(T::DbWeight::get().reads(1 as Weight))127			.saturating_add(T::DbWeight::get().writes(1 as Weight))128	}129	// Storage: Common CollectionById (r:1 w:1)130	fn confirm_sponsorship() -> Weight {131		(6_125_000 as Weight)132			.saturating_add(T::DbWeight::get().reads(1 as Weight))133			.saturating_add(T::DbWeight::get().writes(1 as Weight))134	}135	// Storage: Common CollectionById (r:1 w:1)136	fn remove_collection_sponsor() -> Weight {137		(6_236_000 as Weight)138			.saturating_add(T::DbWeight::get().reads(1 as Weight))139			.saturating_add(T::DbWeight::get().writes(1 as Weight))140	}141	// Storage: Common CollectionById (r:1 w:1)142	fn set_transfers_enabled_flag() -> Weight {143		(6_500_000 as Weight)144			.saturating_add(T::DbWeight::get().reads(1 as Weight))145			.saturating_add(T::DbWeight::get().writes(1 as Weight))146	}147	// Storage: Common CollectionById (r:1 w:1)148	fn set_offchain_schema(_b: u32, ) -> Weight {149		(6_538_000 as Weight)150			.saturating_add(T::DbWeight::get().reads(1 as Weight))151			.saturating_add(T::DbWeight::get().writes(1 as Weight))152	}153	// Storage: Common CollectionById (r:1 w:1)154	fn set_const_on_chain_schema(_b: u32, ) -> Weight {155		(6_542_000 as Weight)156			.saturating_add(T::DbWeight::get().reads(1 as Weight))157			.saturating_add(T::DbWeight::get().writes(1 as Weight))158	}159	// Storage: Common CollectionById (r:1 w:1)160	fn set_variable_on_chain_schema(b: u32, ) -> Weight {161		(6_092_000 as Weight)162			// Standard Error: 0163			.saturating_add((2_000 as Weight).saturating_mul(b as Weight))164			.saturating_add(T::DbWeight::get().reads(1 as Weight))165			.saturating_add(T::DbWeight::get().writes(1 as Weight))166	}167	// Storage: Common CollectionById (r:1 w:1)168	fn set_schema_version() -> Weight {169		(6_470_000 as Weight)170			.saturating_add(T::DbWeight::get().reads(1 as Weight))171			.saturating_add(T::DbWeight::get().writes(1 as Weight))172	}173	// Storage: Common CollectionById (r:1 w:1)174	fn set_collection_limits() -> Weight {175		(6_841_000 as Weight)176			.saturating_add(T::DbWeight::get().reads(1 as Weight))177			.saturating_add(T::DbWeight::get().writes(1 as Weight))178	}179	// Storage: Common CollectionById (r:1 w:1)180	fn set_meta_update_permission_flag() -> Weight {181		(6_278_000 as Weight)182			.saturating_add(T::DbWeight::get().reads(1 as Weight))183			.saturating_add(T::DbWeight::get().writes(1 as Weight))184	}185}186187// For backwards compatibility and tests188impl WeightInfo for () {189	// Storage: Common CreatedCollectionCount (r:1 w:1)190	// Storage: Common DestroyedCollectionCount (r:1 w:0)191	// Storage: System Account (r:2 w:2)192	// Storage: Common CollectionById (r:0 w:1)193	fn create_collection() -> Weight {194		(23_803_000 as Weight)195			.saturating_add(RocksDbWeight::get().reads(4 as Weight))196			.saturating_add(RocksDbWeight::get().writes(4 as Weight))197	}198	// Storage: Common CollectionById (r:1 w:1)199	// Storage: Common DestroyedCollectionCount (r:1 w:1)200	// Storage: Nonfungible TokensMinted (r:0 w:1)201	// Storage: Nonfungible TokensBurnt (r:0 w:1)202	fn destroy_collection() -> Weight {203		(27_831_000 as Weight)204			.saturating_add(RocksDbWeight::get().reads(2 as Weight))205			.saturating_add(RocksDbWeight::get().writes(4 as Weight))206	}207	// Storage: Common CollectionById (r:1 w:0)208	// Storage: Common Allowlist (r:0 w:1)209	fn add_to_allow_list() -> Weight {210		(6_629_000 as Weight)211			.saturating_add(RocksDbWeight::get().reads(1 as Weight))212			.saturating_add(RocksDbWeight::get().writes(1 as Weight))213	}214	// Storage: Common CollectionById (r:1 w:0)215	// Storage: Common Allowlist (r:0 w:1)216	fn remove_from_allow_list() -> Weight {217		(6_596_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 set_public_access_mode() -> Weight {223		(6_338_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:1)228	fn set_mint_permission() -> Weight {229		(6_383_000 as Weight)230			.saturating_add(RocksDbWeight::get().reads(1 as Weight))231			.saturating_add(RocksDbWeight::get().writes(1 as Weight))232	}233	// Storage: Common CollectionById (r:1 w:1)234	fn change_collection_owner() -> Weight {235		(6_493_000 as Weight)236			.saturating_add(RocksDbWeight::get().reads(1 as Weight))237			.saturating_add(RocksDbWeight::get().writes(1 as Weight))238	}239	// Storage: Common CollectionById (r:1 w:0)240	// Storage: Common IsAdmin (r:0 w:1)241	fn add_collection_admin() -> Weight {242		(6_850_000 as Weight)243			.saturating_add(RocksDbWeight::get().reads(1 as Weight))244			.saturating_add(RocksDbWeight::get().writes(1 as Weight))245	}246	// Storage: Common CollectionById (r:1 w:0)247	// Storage: Common IsAdmin (r:0 w:1)248	fn remove_collection_admin() -> Weight {249		(6_615_000 as Weight)250			.saturating_add(RocksDbWeight::get().reads(1 as Weight))251			.saturating_add(RocksDbWeight::get().writes(1 as Weight))252	}253	// Storage: Common CollectionById (r:1 w:1)254	fn set_collection_sponsor() -> Weight {255		(6_430_000 as Weight)256			.saturating_add(RocksDbWeight::get().reads(1 as Weight))257			.saturating_add(RocksDbWeight::get().writes(1 as Weight))258	}259	// Storage: Common CollectionById (r:1 w:1)260	fn confirm_sponsorship() -> Weight {261		(6_125_000 as Weight)262			.saturating_add(RocksDbWeight::get().reads(1 as Weight))263			.saturating_add(RocksDbWeight::get().writes(1 as Weight))264	}265	// Storage: Common CollectionById (r:1 w:1)266	fn remove_collection_sponsor() -> Weight {267		(6_236_000 as Weight)268			.saturating_add(RocksDbWeight::get().reads(1 as Weight))269			.saturating_add(RocksDbWeight::get().writes(1 as Weight))270	}271	// Storage: Common CollectionById (r:1 w:1)272	fn set_transfers_enabled_flag() -> Weight {273		(6_500_000 as Weight)274			.saturating_add(RocksDbWeight::get().reads(1 as Weight))275			.saturating_add(RocksDbWeight::get().writes(1 as Weight))276	}277	// Storage: Common CollectionById (r:1 w:1)278	fn set_offchain_schema(_b: u32, ) -> Weight {279		(6_538_000 as Weight)280			.saturating_add(RocksDbWeight::get().reads(1 as Weight))281			.saturating_add(RocksDbWeight::get().writes(1 as Weight))282	}283	// Storage: Common CollectionById (r:1 w:1)284	fn set_const_on_chain_schema(_b: u32, ) -> Weight {285		(6_542_000 as Weight)286			.saturating_add(RocksDbWeight::get().reads(1 as Weight))287			.saturating_add(RocksDbWeight::get().writes(1 as Weight))288	}289	// Storage: Common CollectionById (r:1 w:1)290	fn set_variable_on_chain_schema(b: u32, ) -> Weight {291		(6_092_000 as Weight)292			// Standard Error: 0293			.saturating_add((2_000 as Weight).saturating_mul(b as Weight))294			.saturating_add(RocksDbWeight::get().reads(1 as Weight))295			.saturating_add(RocksDbWeight::get().writes(1 as Weight))296	}297	// Storage: Common CollectionById (r:1 w:1)298	fn set_schema_version() -> Weight {299		(6_470_000 as Weight)300			.saturating_add(RocksDbWeight::get().reads(1 as Weight))301			.saturating_add(RocksDbWeight::get().writes(1 as Weight))302	}303	// Storage: Common CollectionById (r:1 w:1)304	fn set_collection_limits() -> Weight {305		(6_841_000 as Weight)306			.saturating_add(RocksDbWeight::get().reads(1 as Weight))307			.saturating_add(RocksDbWeight::get().writes(1 as Weight))308	}309	// Storage: Common CollectionById (r:1 w:1)310	fn set_meta_update_permission_flag() -> Weight {311		(6_278_000 as Weight)312			.saturating_add(RocksDbWeight::get().reads(1 as Weight))313			.saturating_add(RocksDbWeight::get().writes(1 as Weight))314	}315}