git.delta.rocks / unique-network / refs/commits / 4edeec7b110a

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)]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		(23_803_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	fn destroy_collection() -> Weight {72		(27_831_000 as Weight)73			.saturating_add(T::DbWeight::get().reads(2 as Weight))74			.saturating_add(T::DbWeight::get().writes(4 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		(6_629_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		(6_596_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		(6_338_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		(6_383_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		(6_493_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:0 w:1)110	fn add_collection_admin() -> Weight {111		(6_850_000 as Weight)112			.saturating_add(T::DbWeight::get().reads(1 as Weight))113			.saturating_add(T::DbWeight::get().writes(1 as Weight))114	}115	// Storage: Common CollectionById (r:1 w:0)116	// Storage: Common IsAdmin (r:0 w:1)117	fn remove_collection_admin() -> Weight {118		(6_615_000 as Weight)119			.saturating_add(T::DbWeight::get().reads(1 as Weight))120			.saturating_add(T::DbWeight::get().writes(1 as Weight))121	}122	// Storage: Common CollectionById (r:1 w:1)123	fn set_collection_sponsor() -> Weight {124		(6_430_000 as Weight)125			.saturating_add(T::DbWeight::get().reads(1 as Weight))126			.saturating_add(T::DbWeight::get().writes(1 as Weight))127	}128	// Storage: Common CollectionById (r:1 w:1)129	fn confirm_sponsorship() -> Weight {130		(6_125_000 as Weight)131			.saturating_add(T::DbWeight::get().reads(1 as Weight))132			.saturating_add(T::DbWeight::get().writes(1 as Weight))133	}134	// Storage: Common CollectionById (r:1 w:1)135	fn remove_collection_sponsor() -> Weight {136		(6_236_000 as Weight)137			.saturating_add(T::DbWeight::get().reads(1 as Weight))138			.saturating_add(T::DbWeight::get().writes(1 as Weight))139	}140	// Storage: Common CollectionById (r:1 w:1)141	fn set_transfers_enabled_flag() -> Weight {142		(6_500_000 as Weight)143			.saturating_add(T::DbWeight::get().reads(1 as Weight))144			.saturating_add(T::DbWeight::get().writes(1 as Weight))145	}146	// Storage: Common CollectionById (r:1 w:1)147	fn set_offchain_schema(_b: u32, ) -> Weight {148		(6_538_000 as Weight)149			.saturating_add(T::DbWeight::get().reads(1 as Weight))150			.saturating_add(T::DbWeight::get().writes(1 as Weight))151	}152	// Storage: Common CollectionById (r:1 w:1)153	fn set_const_on_chain_schema(_b: u32, ) -> Weight {154		(6_542_000 as Weight)155			.saturating_add(T::DbWeight::get().reads(1 as Weight))156			.saturating_add(T::DbWeight::get().writes(1 as Weight))157	}158	// Storage: Common CollectionById (r:1 w:1)159	fn set_variable_on_chain_schema(b: u32, ) -> Weight {160		(6_092_000 as Weight)161			// Standard Error: 0162			.saturating_add((2_000 as Weight).saturating_mul(b 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_schema_version() -> Weight {168		(6_470_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	// Storage: Common CollectionById (r:1 w:1)173	fn set_collection_limits() -> Weight {174		(6_841_000 as Weight)175			.saturating_add(T::DbWeight::get().reads(1 as Weight))176			.saturating_add(T::DbWeight::get().writes(1 as Weight))177	}178	// Storage: Common CollectionById (r:1 w:1)179	fn set_meta_update_permission_flag() -> Weight {180		(6_278_000 as Weight)181			.saturating_add(T::DbWeight::get().reads(1 as Weight))182			.saturating_add(T::DbWeight::get().writes(1 as Weight))183	}184}185186// For backwards compatibility and tests187impl WeightInfo for () {188	// Storage: Common CreatedCollectionCount (r:1 w:1)189	// Storage: Common DestroyedCollectionCount (r:1 w:0)190	// Storage: System Account (r:2 w:2)191	// Storage: Common CollectionById (r:0 w:1)192	fn create_collection() -> Weight {193		(23_803_000 as Weight)194			.saturating_add(RocksDbWeight::get().reads(4 as Weight))195			.saturating_add(RocksDbWeight::get().writes(4 as Weight))196	}197	// Storage: Common CollectionById (r:1 w:1)198	// Storage: Common DestroyedCollectionCount (r:1 w:1)199	// Storage: Nonfungible TokensMinted (r:0 w:1)200	// Storage: Nonfungible TokensBurnt (r:0 w:1)201	fn destroy_collection() -> Weight {202		(27_831_000 as Weight)203			.saturating_add(RocksDbWeight::get().reads(2 as Weight))204			.saturating_add(RocksDbWeight::get().writes(4 as Weight))205	}206	// Storage: Common CollectionById (r:1 w:0)207	// Storage: Common Allowlist (r:0 w:1)208	fn add_to_allow_list() -> Weight {209		(6_629_000 as Weight)210			.saturating_add(RocksDbWeight::get().reads(1 as Weight))211			.saturating_add(RocksDbWeight::get().writes(1 as Weight))212	}213	// Storage: Common CollectionById (r:1 w:0)214	// Storage: Common Allowlist (r:0 w:1)215	fn remove_from_allow_list() -> Weight {216		(6_596_000 as Weight)217			.saturating_add(RocksDbWeight::get().reads(1 as Weight))218			.saturating_add(RocksDbWeight::get().writes(1 as Weight))219	}220	// Storage: Common CollectionById (r:1 w:1)221	fn set_public_access_mode() -> Weight {222		(6_338_000 as Weight)223			.saturating_add(RocksDbWeight::get().reads(1 as Weight))224			.saturating_add(RocksDbWeight::get().writes(1 as Weight))225	}226	// Storage: Common CollectionById (r:1 w:1)227	fn set_mint_permission() -> Weight {228		(6_383_000 as Weight)229			.saturating_add(RocksDbWeight::get().reads(1 as Weight))230			.saturating_add(RocksDbWeight::get().writes(1 as Weight))231	}232	// Storage: Common CollectionById (r:1 w:1)233	fn change_collection_owner() -> Weight {234		(6_493_000 as Weight)235			.saturating_add(RocksDbWeight::get().reads(1 as Weight))236			.saturating_add(RocksDbWeight::get().writes(1 as Weight))237	}238	// Storage: Common CollectionById (r:1 w:0)239	// Storage: Common IsAdmin (r:0 w:1)240	fn add_collection_admin() -> Weight {241		(6_850_000 as Weight)242			.saturating_add(RocksDbWeight::get().reads(1 as Weight))243			.saturating_add(RocksDbWeight::get().writes(1 as Weight))244	}245	// Storage: Common CollectionById (r:1 w:0)246	// Storage: Common IsAdmin (r:0 w:1)247	fn remove_collection_admin() -> Weight {248		(6_615_000 as Weight)249			.saturating_add(RocksDbWeight::get().reads(1 as Weight))250			.saturating_add(RocksDbWeight::get().writes(1 as Weight))251	}252	// Storage: Common CollectionById (r:1 w:1)253	fn set_collection_sponsor() -> Weight {254		(6_430_000 as Weight)255			.saturating_add(RocksDbWeight::get().reads(1 as Weight))256			.saturating_add(RocksDbWeight::get().writes(1 as Weight))257	}258	// Storage: Common CollectionById (r:1 w:1)259	fn confirm_sponsorship() -> Weight {260		(6_125_000 as Weight)261			.saturating_add(RocksDbWeight::get().reads(1 as Weight))262			.saturating_add(RocksDbWeight::get().writes(1 as Weight))263	}264	// Storage: Common CollectionById (r:1 w:1)265	fn remove_collection_sponsor() -> Weight {266		(6_236_000 as Weight)267			.saturating_add(RocksDbWeight::get().reads(1 as Weight))268			.saturating_add(RocksDbWeight::get().writes(1 as Weight))269	}270	// Storage: Common CollectionById (r:1 w:1)271	fn set_transfers_enabled_flag() -> Weight {272		(6_500_000 as Weight)273			.saturating_add(RocksDbWeight::get().reads(1 as Weight))274			.saturating_add(RocksDbWeight::get().writes(1 as Weight))275	}276	// Storage: Common CollectionById (r:1 w:1)277	fn set_offchain_schema(_b: u32, ) -> Weight {278		(6_538_000 as Weight)279			.saturating_add(RocksDbWeight::get().reads(1 as Weight))280			.saturating_add(RocksDbWeight::get().writes(1 as Weight))281	}282	// Storage: Common CollectionById (r:1 w:1)283	fn set_const_on_chain_schema(_b: u32, ) -> Weight {284		(6_542_000 as Weight)285			.saturating_add(RocksDbWeight::get().reads(1 as Weight))286			.saturating_add(RocksDbWeight::get().writes(1 as Weight))287	}288	// Storage: Common CollectionById (r:1 w:1)289	fn set_variable_on_chain_schema(b: u32, ) -> Weight {290		(6_092_000 as Weight)291			// Standard Error: 0292			.saturating_add((2_000 as Weight).saturating_mul(b as Weight))293			.saturating_add(RocksDbWeight::get().reads(1 as Weight))294			.saturating_add(RocksDbWeight::get().writes(1 as Weight))295	}296	// Storage: Common CollectionById (r:1 w:1)297	fn set_schema_version() -> Weight {298		(6_470_000 as Weight)299			.saturating_add(RocksDbWeight::get().reads(1 as Weight))300			.saturating_add(RocksDbWeight::get().writes(1 as Weight))301	}302	// Storage: Common CollectionById (r:1 w:1)303	fn set_collection_limits() -> Weight {304		(6_841_000 as Weight)305			.saturating_add(RocksDbWeight::get().reads(1 as Weight))306			.saturating_add(RocksDbWeight::get().writes(1 as Weight))307	}308	// Storage: Common CollectionById (r:1 w:1)309	fn set_meta_update_permission_flag() -> Weight {310		(6_278_000 as Weight)311			.saturating_add(RocksDbWeight::get().reads(1 as Weight))312			.saturating_add(RocksDbWeight::get().writes(1 as Weight))313	}314}