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

difftreelog

source

pallets/unique/src/weights.rs11.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: 20, 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=2022// --output=./pallets/unique/src/weights.rs2324#![cfg_attr(rustfmt, rustfmt_skip)]25#![allow(unused_parens)]26#![allow(unused_imports)]27#![allow(clippy::unnecessary_cast)]2829use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};30use sp_std::marker::PhantomData;3132/// Weight functions needed for pallet_unique.33pub trait WeightInfo {34	fn create_collection() -> Weight;35	fn destroy_collection() -> Weight;36	fn add_to_allow_list() -> Weight;37	fn remove_from_allow_list() -> Weight;38	fn set_public_access_mode() -> Weight;39	fn set_mint_permission() -> Weight;40	fn change_collection_owner() -> Weight;41	fn add_collection_admin() -> Weight;42	fn remove_collection_admin() -> Weight;43	fn set_collection_sponsor() -> Weight;44	fn confirm_sponsorship() -> Weight;45	fn remove_collection_sponsor() -> Weight;46	fn set_transfers_enabled_flag() -> Weight;47	fn set_offchain_schema(b: u32, ) -> Weight;48	fn set_const_on_chain_schema(b: u32, ) -> Weight;49	fn set_variable_on_chain_schema(b: u32, ) -> Weight;50	fn set_schema_version() -> Weight;51	fn set_collection_limits() -> Weight;52	fn set_meta_update_permission_flag() -> Weight;53}5455/// Weights for pallet_unique using the Substrate node and recommended hardware.56pub struct SubstrateWeight<T>(PhantomData<T>);57impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {58	// Storage: Common CreatedCollectionCount (r:1 w:1)59	// Storage: Common DestroyedCollectionCount (r:1 w:0)60	// Storage: System Account (r:2 w:2)61	// Storage: Common CollectionById (r:0 w:1)62	fn create_collection() -> Weight {63		(28_864_000 as Weight)64			.saturating_add(T::DbWeight::get().reads(4 as Weight))65			.saturating_add(T::DbWeight::get().writes(4 as Weight))66	}67	// Storage: Common CollectionById (r:1 w:1)68	// Storage: Common DestroyedCollectionCount (r:1 w:1)69	// Storage: Nonfungible TokensMinted (r:0 w:1)70	// Storage: Nonfungible TokensBurnt (r:0 w:1)71	// Storage: Common AdminAmount (r:0 w:1)72	fn destroy_collection() -> Weight {73		(39_196_000 as Weight)74			.saturating_add(T::DbWeight::get().reads(2 as Weight))75			.saturating_add(T::DbWeight::get().writes(5 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		(15_161_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		(17_224_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		(14_557_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		(14_835_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		(15_587_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:1 w:1)111	// Storage: Common AdminAmount (r:1 w:1)112	fn add_collection_admin() -> Weight {113		(24_447_000 as Weight)114			.saturating_add(T::DbWeight::get().reads(3 as Weight))115			.saturating_add(T::DbWeight::get().writes(2 as Weight))116	}117	// Storage: Common CollectionById (r:1 w:0)118	// Storage: Common IsAdmin (r:1 w:1)119	// Storage: Common AdminAmount (r:1 w:1)120	fn remove_collection_admin() -> Weight {121		(22_141_000 as Weight)122			.saturating_add(T::DbWeight::get().reads(3 as Weight))123			.saturating_add(T::DbWeight::get().writes(2 as Weight))124	}125	// Storage: Common CollectionById (r:1 w:1)126	fn set_collection_sponsor() -> Weight {127		(15_407_000 as Weight)128			.saturating_add(T::DbWeight::get().reads(1 as Weight))129			.saturating_add(T::DbWeight::get().writes(1 as Weight))130	}131	// Storage: Common CollectionById (r:1 w:1)132	fn confirm_sponsorship() -> Weight {133		(14_939_000 as Weight)134			.saturating_add(T::DbWeight::get().reads(1 as Weight))135			.saturating_add(T::DbWeight::get().writes(1 as Weight))136	}137	// Storage: Common CollectionById (r:1 w:1)138	fn remove_collection_sponsor() -> Weight {139		(14_504_000 as Weight)140			.saturating_add(T::DbWeight::get().reads(1 as Weight))141			.saturating_add(T::DbWeight::get().writes(1 as Weight))142	}143	// Storage: Common CollectionById (r:1 w:1)144	fn set_transfers_enabled_flag() -> Weight {145		(7_218_000 as Weight)146			.saturating_add(T::DbWeight::get().reads(1 as Weight))147			.saturating_add(T::DbWeight::get().writes(1 as Weight))148	}149	// Storage: Common CollectionById (r:1 w:1)150	fn set_offchain_schema(_b: u32, ) -> Weight {151		(15_040_000 as Weight)152			.saturating_add(T::DbWeight::get().reads(1 as Weight))153			.saturating_add(T::DbWeight::get().writes(1 as Weight))154	}155	// Storage: Common CollectionById (r:1 w:1)156	fn set_const_on_chain_schema(_b: u32, ) -> Weight {157		(14_932_000 as Weight)158			.saturating_add(T::DbWeight::get().reads(1 as Weight))159			.saturating_add(T::DbWeight::get().writes(1 as Weight))160	}161	// Storage: Common CollectionById (r:1 w:1)162	fn set_variable_on_chain_schema(_b: u32, ) -> Weight {163		(15_291_000 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		(14_725_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		(15_222_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		(7_270_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		(28_864_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	// Storage: Common AdminAmount (r:0 w:1)203	fn destroy_collection() -> Weight {204		(39_196_000 as Weight)205			.saturating_add(RocksDbWeight::get().reads(2 as Weight))206			.saturating_add(RocksDbWeight::get().writes(5 as Weight))207	}208	// Storage: Common CollectionById (r:1 w:0)209	// Storage: Common Allowlist (r:0 w:1)210	fn add_to_allow_list() -> Weight {211		(15_161_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:0)216	// Storage: Common Allowlist (r:0 w:1)217	fn remove_from_allow_list() -> Weight {218		(17_224_000 as Weight)219			.saturating_add(RocksDbWeight::get().reads(1 as Weight))220			.saturating_add(RocksDbWeight::get().writes(1 as Weight))221	}222	// Storage: Common CollectionById (r:1 w:1)223	fn set_public_access_mode() -> Weight {224		(14_557_000 as Weight)225			.saturating_add(RocksDbWeight::get().reads(1 as Weight))226			.saturating_add(RocksDbWeight::get().writes(1 as Weight))227	}228	// Storage: Common CollectionById (r:1 w:1)229	fn set_mint_permission() -> Weight {230		(14_835_000 as Weight)231			.saturating_add(RocksDbWeight::get().reads(1 as Weight))232			.saturating_add(RocksDbWeight::get().writes(1 as Weight))233	}234	// Storage: Common CollectionById (r:1 w:1)235	fn change_collection_owner() -> Weight {236		(15_587_000 as Weight)237			.saturating_add(RocksDbWeight::get().reads(1 as Weight))238			.saturating_add(RocksDbWeight::get().writes(1 as Weight))239	}240	// Storage: Common CollectionById (r:1 w:0)241	// Storage: Common IsAdmin (r:1 w:1)242	// Storage: Common AdminAmount (r:1 w:1)243	fn add_collection_admin() -> Weight {244		(24_447_000 as Weight)245			.saturating_add(RocksDbWeight::get().reads(3 as Weight))246			.saturating_add(RocksDbWeight::get().writes(2 as Weight))247	}248	// Storage: Common CollectionById (r:1 w:0)249	// Storage: Common IsAdmin (r:1 w:1)250	// Storage: Common AdminAmount (r:1 w:1)251	fn remove_collection_admin() -> Weight {252		(22_141_000 as Weight)253			.saturating_add(RocksDbWeight::get().reads(3 as Weight))254			.saturating_add(RocksDbWeight::get().writes(2 as Weight))255	}256	// Storage: Common CollectionById (r:1 w:1)257	fn set_collection_sponsor() -> Weight {258		(15_407_000 as Weight)259			.saturating_add(RocksDbWeight::get().reads(1 as Weight))260			.saturating_add(RocksDbWeight::get().writes(1 as Weight))261	}262	// Storage: Common CollectionById (r:1 w:1)263	fn confirm_sponsorship() -> Weight {264		(14_939_000 as Weight)265			.saturating_add(RocksDbWeight::get().reads(1 as Weight))266			.saturating_add(RocksDbWeight::get().writes(1 as Weight))267	}268	// Storage: Common CollectionById (r:1 w:1)269	fn remove_collection_sponsor() -> Weight {270		(14_504_000 as Weight)271			.saturating_add(RocksDbWeight::get().reads(1 as Weight))272			.saturating_add(RocksDbWeight::get().writes(1 as Weight))273	}274	// Storage: Common CollectionById (r:1 w:1)275	fn set_transfers_enabled_flag() -> Weight {276		(7_218_000 as Weight)277			.saturating_add(RocksDbWeight::get().reads(1 as Weight))278			.saturating_add(RocksDbWeight::get().writes(1 as Weight))279	}280	// Storage: Common CollectionById (r:1 w:1)281	fn set_offchain_schema(_b: u32, ) -> Weight {282		(15_040_000 as Weight)283			.saturating_add(RocksDbWeight::get().reads(1 as Weight))284			.saturating_add(RocksDbWeight::get().writes(1 as Weight))285	}286	// Storage: Common CollectionById (r:1 w:1)287	fn set_const_on_chain_schema(_b: u32, ) -> Weight {288		(14_932_000 as Weight)289			.saturating_add(RocksDbWeight::get().reads(1 as Weight))290			.saturating_add(RocksDbWeight::get().writes(1 as Weight))291	}292	// Storage: Common CollectionById (r:1 w:1)293	fn set_variable_on_chain_schema(_b: u32, ) -> Weight {294		(15_291_000 as Weight)295			.saturating_add(RocksDbWeight::get().reads(1 as Weight))296			.saturating_add(RocksDbWeight::get().writes(1 as Weight))297	}298	// Storage: Common CollectionById (r:1 w:1)299	fn set_schema_version() -> Weight {300		(14_725_000 as Weight)301			.saturating_add(RocksDbWeight::get().reads(1 as Weight))302			.saturating_add(RocksDbWeight::get().writes(1 as Weight))303	}304	// Storage: Common CollectionById (r:1 w:1)305	fn set_collection_limits() -> Weight {306		(15_222_000 as Weight)307			.saturating_add(RocksDbWeight::get().reads(1 as Weight))308			.saturating_add(RocksDbWeight::get().writes(1 as Weight))309	}310	// Storage: Common CollectionById (r:1 w:1)311	fn set_meta_update_permission_flag() -> Weight {312		(7_270_000 as Weight)313			.saturating_add(RocksDbWeight::get().reads(1 as Weight))314			.saturating_add(RocksDbWeight::get().writes(1 as Weight))315	}316}