git.delta.rocks / unique-network / refs/commits / 465cfefa64e5

difftreelog

source

pallets/refungible/src/weights.rs19.0 KiBsourcehistory
1// Template adopted from https://github.com/paritytech/substrate/blob/master/.maintain/frame-weight-template.hbs23//! Autogenerated weights for pallet_refungible4//!5//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev6//! DATE: 2022-08-15, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`7//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 102489// Executed Command:10// target/release/unique-collator11// benchmark12// pallet13// --pallet14// pallet-refungible15// --wasm-execution16// compiled17// --extrinsic18// *19// --template20// .maintain/frame-weight-template.hbs21// --steps=5022// --repeat=8023// --heap-pages=409624// --output=./pallets/refungible/src/weights.rs2526#![cfg_attr(rustfmt, rustfmt_skip)]27#![allow(unused_parens)]28#![allow(unused_imports)]29#![allow(clippy::unnecessary_cast)]3031use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};32use sp_std::marker::PhantomData;3334/// Weight functions needed for pallet_refungible.35pub trait WeightInfo {36	fn create_item() -> Weight;37	fn create_multiple_items(b: u32, ) -> Weight;38	fn create_multiple_items_ex_multiple_items(b: u32, ) -> Weight;39	fn create_multiple_items_ex_multiple_owners(b: u32, ) -> Weight;40	fn burn_item_partial() -> Weight;41	fn burn_item_fully() -> Weight;42	fn transfer_normal() -> Weight;43	fn transfer_creating() -> Weight;44	fn transfer_removing() -> Weight;45	fn transfer_creating_removing() -> Weight;46	fn approve() -> Weight;47	fn transfer_from_normal() -> Weight;48	fn transfer_from_creating() -> Weight;49	fn transfer_from_removing() -> Weight;50	fn transfer_from_creating_removing() -> Weight;51	fn burn_from() -> Weight;52	fn set_token_property_permissions(b: u32, ) -> Weight;53	fn set_token_properties(b: u32, ) -> Weight;54	fn delete_token_properties(b: u32, ) -> Weight;55	fn repartition_item() -> Weight;56	fn token_owner() -> Weight;57}5859/// Weights for pallet_refungible using the Substrate node and recommended hardware.60pub struct SubstrateWeight<T>(PhantomData<T>);61impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {62	// Storage: Refungible TokensMinted (r:1 w:1)63	// Storage: Refungible AccountBalance (r:1 w:1)64	// Storage: Refungible Balance (r:0 w:1)65	// Storage: Refungible TotalSupply (r:0 w:1)66	// Storage: Refungible Owned (r:0 w:1)67	fn create_item() -> Weight {68		Weight::from_ref_time(29_527_000)69			.saturating_add(T::DbWeight::get().reads(2 as u64))70			.saturating_add(T::DbWeight::get().writes(5 as u64))71	}72	// Storage: Refungible TokensMinted (r:1 w:1)73	// Storage: Refungible AccountBalance (r:1 w:1)74	// Storage: Refungible Balance (r:0 w:4)75	// Storage: Refungible TotalSupply (r:0 w:4)76	// Storage: Refungible Owned (r:0 w:4)77	fn create_multiple_items(b: u32, ) -> Weight {78		Weight::from_ref_time(28_541_000)79			// Standard Error: 4_00080			.saturating_add(Weight::from_ref_time(6_671_000).saturating_mul(b as u64))81			.saturating_add(T::DbWeight::get().reads(2 as u64))82			.saturating_add(T::DbWeight::get().writes(2 as u64))83			.saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(b as u64)))84	}85	// Storage: Refungible TokensMinted (r:1 w:1)86	// Storage: Refungible AccountBalance (r:4 w:4)87	// Storage: Refungible Balance (r:0 w:4)88	// Storage: Refungible TotalSupply (r:0 w:4)89	// Storage: Refungible Owned (r:0 w:4)90	fn create_multiple_items_ex_multiple_items(b: u32, ) -> Weight {91		Weight::from_ref_time(24_366_000)92			// Standard Error: 5_00093			.saturating_add(Weight::from_ref_time(9_338_000).saturating_mul(b as u64))94			.saturating_add(T::DbWeight::get().reads(1 as u64))95			.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(b as u64)))96			.saturating_add(T::DbWeight::get().writes(1 as u64))97			.saturating_add(T::DbWeight::get().writes((4 as u64).saturating_mul(b as u64)))98	}99	// Storage: Refungible TokensMinted (r:1 w:1)100	// Storage: Refungible TotalSupply (r:0 w:1)101	// Storage: Refungible AccountBalance (r:4 w:4)102	// Storage: Refungible Balance (r:0 w:4)103	// Storage: Refungible Owned (r:0 w:4)104	fn create_multiple_items_ex_multiple_owners(b: u32, ) -> Weight {105		Weight::from_ref_time(27_574_000)106			// Standard Error: 4_000107			.saturating_add(Weight::from_ref_time(7_193_000).saturating_mul(b as u64))108			.saturating_add(T::DbWeight::get().reads(1 as u64))109			.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(b as u64)))110			.saturating_add(T::DbWeight::get().writes(2 as u64))111			.saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(b as u64)))112	}113	// Storage: Refungible TotalSupply (r:1 w:1)114	// Storage: Refungible Balance (r:3 w:1)115	// Storage: Refungible AccountBalance (r:1 w:1)116	// Storage: Refungible Owned (r:0 w:1)117	fn burn_item_partial() -> Weight {118		Weight::from_ref_time(42_943_000)119			.saturating_add(T::DbWeight::get().reads(5 as u64))120			.saturating_add(T::DbWeight::get().writes(4 as u64))121	}122	// Storage: Refungible TotalSupply (r:1 w:1)123	// Storage: Refungible Balance (r:1 w:1)124	// Storage: Refungible AccountBalance (r:1 w:1)125	// Storage: Refungible TokensBurnt (r:1 w:1)126	// Storage: Refungible Owned (r:0 w:1)127	// Storage: Refungible TokenProperties (r:0 w:1)128	fn burn_item_fully() -> Weight {129		Weight::from_ref_time(36_861_000)130			.saturating_add(T::DbWeight::get().reads(4 as u64))131			.saturating_add(T::DbWeight::get().writes(6 as u64))132	}133	// Storage: Refungible Balance (r:2 w:2)134	// Storage: Refungible TotalSupply (r:1 w:0)135	fn transfer_normal() -> Weight {136		Weight::from_ref_time(27_789_000)137			.saturating_add(T::DbWeight::get().reads(3 as u64))138			.saturating_add(T::DbWeight::get().writes(2 as u64))139	}140	// Storage: Refungible Balance (r:2 w:2)141	// Storage: Refungible AccountBalance (r:1 w:1)142	// Storage: Refungible TotalSupply (r:1 w:0)143	// Storage: Refungible Owned (r:0 w:1)144	fn transfer_creating() -> Weight {145		Weight::from_ref_time(32_893_000)146			.saturating_add(T::DbWeight::get().reads(4 as u64))147			.saturating_add(T::DbWeight::get().writes(4 as u64))148	}149	// Storage: Refungible Balance (r:2 w:2)150	// Storage: Refungible AccountBalance (r:1 w:1)151	// Storage: Refungible TotalSupply (r:1 w:0)152	// Storage: Refungible Owned (r:0 w:1)153	fn transfer_removing() -> Weight {154		Weight::from_ref_time(34_703_000)155			.saturating_add(T::DbWeight::get().reads(4 as u64))156			.saturating_add(T::DbWeight::get().writes(4 as u64))157	}158	// Storage: Refungible Balance (r:2 w:2)159	// Storage: Refungible AccountBalance (r:2 w:2)160	// Storage: Refungible TotalSupply (r:1 w:0)161	// Storage: Refungible Owned (r:0 w:2)162	fn transfer_creating_removing() -> Weight {163		Weight::from_ref_time(37_547_000)164			.saturating_add(T::DbWeight::get().reads(5 as u64))165			.saturating_add(T::DbWeight::get().writes(6 as u64))166	}167	// Storage: Refungible Balance (r:1 w:0)168	// Storage: Refungible Allowance (r:0 w:1)169	fn approve() -> Weight {170		Weight::from_ref_time(20_039_000)171			.saturating_add(T::DbWeight::get().reads(1 as u64))172			.saturating_add(T::DbWeight::get().writes(1 as u64))173	}174	// Storage: Refungible Allowance (r:1 w:1)175	// Storage: Refungible Balance (r:2 w:2)176	// Storage: Refungible TotalSupply (r:1 w:0)177	fn transfer_from_normal() -> Weight {178		Weight::from_ref_time(37_628_000)179			.saturating_add(T::DbWeight::get().reads(4 as u64))180			.saturating_add(T::DbWeight::get().writes(3 as u64))181	}182	// Storage: Refungible Allowance (r:1 w:1)183	// Storage: Refungible Balance (r:2 w:2)184	// Storage: Refungible AccountBalance (r:1 w:1)185	// Storage: Refungible TotalSupply (r:1 w:0)186	// Storage: Refungible Owned (r:0 w:1)187	fn transfer_from_creating() -> Weight {188		Weight::from_ref_time(42_072_000)189			.saturating_add(T::DbWeight::get().reads(5 as u64))190			.saturating_add(T::DbWeight::get().writes(5 as u64))191	}192	// Storage: Refungible Allowance (r:1 w:1)193	// Storage: Refungible Balance (r:2 w:2)194	// Storage: Refungible AccountBalance (r:1 w:1)195	// Storage: Refungible TotalSupply (r:1 w:0)196	// Storage: Refungible Owned (r:0 w:1)197	fn transfer_from_removing() -> Weight {198		Weight::from_ref_time(43_024_000)199			.saturating_add(T::DbWeight::get().reads(5 as u64))200			.saturating_add(T::DbWeight::get().writes(5 as u64))201	}202	// Storage: Refungible Allowance (r:1 w:1)203	// Storage: Refungible Balance (r:2 w:2)204	// Storage: Refungible AccountBalance (r:2 w:2)205	// Storage: Refungible TotalSupply (r:1 w:0)206	// Storage: Refungible Owned (r:0 w:2)207	fn transfer_from_creating_removing() -> Weight {208		Weight::from_ref_time(45_910_000)209			.saturating_add(T::DbWeight::get().reads(6 as u64))210			.saturating_add(T::DbWeight::get().writes(7 as u64))211	}212	// Storage: Refungible Allowance (r:1 w:1)213	// Storage: Refungible TotalSupply (r:1 w:1)214	// Storage: Refungible Balance (r:1 w:1)215	// Storage: Refungible AccountBalance (r:1 w:1)216	// Storage: Refungible TokensBurnt (r:1 w:1)217	// Storage: Refungible Owned (r:0 w:1)218	// Storage: Refungible TokenProperties (r:0 w:1)219	fn burn_from() -> Weight {220		Weight::from_ref_time(48_584_000)221			.saturating_add(T::DbWeight::get().reads(5 as u64))222			.saturating_add(T::DbWeight::get().writes(7 as u64))223	}224	// Storage: Common CollectionPropertyPermissions (r:1 w:1)225	fn set_token_property_permissions(b: u32, ) -> Weight {226		(Weight::from_ref_time(0))227			// Standard Error: 60_000228			.saturating_add(Weight::from_ref_time(15_533_000).saturating_mul(b as u64))229			.saturating_add(T::DbWeight::get().reads(1 as u64))230			.saturating_add(T::DbWeight::get().writes(1 as u64))231	}232	// Storage: Common CollectionPropertyPermissions (r:1 w:0)233	// Storage: Refungible TokenProperties (r:1 w:1)234	fn set_token_properties(b: u32, ) -> Weight {235		(Weight::from_ref_time(0))236			// Standard Error: 3_609_000237			.saturating_add(Weight::from_ref_time(590_204_000).saturating_mul(b as u64))238			.saturating_add(T::DbWeight::get().reads(2 as u64))239			.saturating_add(T::DbWeight::get().writes(1 as u64))240	}241	// Storage: Common CollectionPropertyPermissions (r:1 w:0)242	// Storage: Refungible TokenProperties (r:1 w:1)243	fn delete_token_properties(b: u32, ) -> Weight {244		(Weight::from_ref_time(0))245			// Standard Error: 3_637_000246			.saturating_add(Weight::from_ref_time(603_468_000).saturating_mul(b as u64))247			.saturating_add(T::DbWeight::get().reads(2 as u64))248			.saturating_add(T::DbWeight::get().writes(1 as u64))249	}250	// Storage: Refungible TotalSupply (r:1 w:1)251	// Storage: Refungible Balance (r:1 w:1)252	fn repartition_item() -> Weight {253		Weight::from_ref_time(22_356_000)254			.saturating_add(T::DbWeight::get().reads(2 as u64))255			.saturating_add(T::DbWeight::get().writes(2 as u64))256	}257	// Storage: Refungible Balance (r:2 w:0)258	fn token_owner() -> Weight {259		Weight::from_ref_time(9_431_000)260			.saturating_add(T::DbWeight::get().reads(2 as u64))261	}262}263264// For backwards compatibility and tests265impl WeightInfo for () {266	// Storage: Refungible TokensMinted (r:1 w:1)267	// Storage: Refungible AccountBalance (r:1 w:1)268	// Storage: Refungible Balance (r:0 w:1)269	// Storage: Refungible TotalSupply (r:0 w:1)270	// Storage: Refungible Owned (r:0 w:1)271	fn create_item() -> Weight {272		Weight::from_ref_time(29_527_000)273			.saturating_add(RocksDbWeight::get().reads(2 as u64))274			.saturating_add(RocksDbWeight::get().writes(5 as u64))275	}276	// Storage: Refungible TokensMinted (r:1 w:1)277	// Storage: Refungible AccountBalance (r:1 w:1)278	// Storage: Refungible Balance (r:0 w:4)279	// Storage: Refungible TotalSupply (r:0 w:4)280	// Storage: Refungible Owned (r:0 w:4)281	fn create_multiple_items(b: u32, ) -> Weight {282		Weight::from_ref_time(28_541_000)283			// Standard Error: 4_000284			.saturating_add(Weight::from_ref_time(6_671_000).saturating_mul(b as u64))285			.saturating_add(RocksDbWeight::get().reads(2 as u64))286			.saturating_add(RocksDbWeight::get().writes(2 as u64))287			.saturating_add(RocksDbWeight::get().writes((3 as u64).saturating_mul(b as u64)))288	}289	// Storage: Refungible TokensMinted (r:1 w:1)290	// Storage: Refungible AccountBalance (r:4 w:4)291	// Storage: Refungible Balance (r:0 w:4)292	// Storage: Refungible TotalSupply (r:0 w:4)293	// Storage: Refungible Owned (r:0 w:4)294	fn create_multiple_items_ex_multiple_items(b: u32, ) -> Weight {295		Weight::from_ref_time(24_366_000)296			// Standard Error: 5_000297			.saturating_add(Weight::from_ref_time(9_338_000).saturating_mul(b as u64))298			.saturating_add(RocksDbWeight::get().reads(1 as u64))299			.saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(b as u64)))300			.saturating_add(RocksDbWeight::get().writes(1 as u64))301			.saturating_add(RocksDbWeight::get().writes((4 as u64).saturating_mul(b as u64)))302	}303	// Storage: Refungible TokensMinted (r:1 w:1)304	// Storage: Refungible TotalSupply (r:0 w:1)305	// Storage: Refungible AccountBalance (r:4 w:4)306	// Storage: Refungible Balance (r:0 w:4)307	// Storage: Refungible Owned (r:0 w:4)308	fn create_multiple_items_ex_multiple_owners(b: u32, ) -> Weight {309		Weight::from_ref_time(27_574_000)310			// Standard Error: 4_000311			.saturating_add(Weight::from_ref_time(7_193_000).saturating_mul(b as u64))312			.saturating_add(RocksDbWeight::get().reads(1 as u64))313			.saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(b as u64)))314			.saturating_add(RocksDbWeight::get().writes(2 as u64))315			.saturating_add(RocksDbWeight::get().writes((3 as u64).saturating_mul(b as u64)))316	}317	// Storage: Refungible TotalSupply (r:1 w:1)318	// Storage: Refungible Balance (r:3 w:1)319	// Storage: Refungible AccountBalance (r:1 w:1)320	// Storage: Refungible Owned (r:0 w:1)321	fn burn_item_partial() -> Weight {322		Weight::from_ref_time(42_943_000)323			.saturating_add(RocksDbWeight::get().reads(5 as u64))324			.saturating_add(RocksDbWeight::get().writes(4 as u64))325	}326	// Storage: Refungible TotalSupply (r:1 w:1)327	// Storage: Refungible Balance (r:1 w:1)328	// Storage: Refungible AccountBalance (r:1 w:1)329	// Storage: Refungible TokensBurnt (r:1 w:1)330	// Storage: Refungible Owned (r:0 w:1)331	// Storage: Refungible TokenProperties (r:0 w:1)332	fn burn_item_fully() -> Weight {333		Weight::from_ref_time(36_861_000)334			.saturating_add(RocksDbWeight::get().reads(4 as u64))335			.saturating_add(RocksDbWeight::get().writes(6 as u64))336	}337	// Storage: Refungible Balance (r:2 w:2)338	// Storage: Refungible TotalSupply (r:1 w:0)339	fn transfer_normal() -> Weight {340		Weight::from_ref_time(27_789_000)341			.saturating_add(RocksDbWeight::get().reads(3 as u64))342			.saturating_add(RocksDbWeight::get().writes(2 as u64))343	}344	// Storage: Refungible Balance (r:2 w:2)345	// Storage: Refungible AccountBalance (r:1 w:1)346	// Storage: Refungible TotalSupply (r:1 w:0)347	// Storage: Refungible Owned (r:0 w:1)348	fn transfer_creating() -> Weight {349		Weight::from_ref_time(32_893_000)350			.saturating_add(RocksDbWeight::get().reads(4 as u64))351			.saturating_add(RocksDbWeight::get().writes(4 as u64))352	}353	// Storage: Refungible Balance (r:2 w:2)354	// Storage: Refungible AccountBalance (r:1 w:1)355	// Storage: Refungible TotalSupply (r:1 w:0)356	// Storage: Refungible Owned (r:0 w:1)357	fn transfer_removing() -> Weight {358		Weight::from_ref_time(34_703_000)359			.saturating_add(RocksDbWeight::get().reads(4 as u64))360			.saturating_add(RocksDbWeight::get().writes(4 as u64))361	}362	// Storage: Refungible Balance (r:2 w:2)363	// Storage: Refungible AccountBalance (r:2 w:2)364	// Storage: Refungible TotalSupply (r:1 w:0)365	// Storage: Refungible Owned (r:0 w:2)366	fn transfer_creating_removing() -> Weight {367		Weight::from_ref_time(37_547_000)368			.saturating_add(RocksDbWeight::get().reads(5 as u64))369			.saturating_add(RocksDbWeight::get().writes(6 as u64))370	}371	// Storage: Refungible Balance (r:1 w:0)372	// Storage: Refungible Allowance (r:0 w:1)373	fn approve() -> Weight {374		Weight::from_ref_time(20_039_000)375			.saturating_add(RocksDbWeight::get().reads(1 as u64))376			.saturating_add(RocksDbWeight::get().writes(1 as u64))377	}378	// Storage: Refungible Allowance (r:1 w:1)379	// Storage: Refungible Balance (r:2 w:2)380	// Storage: Refungible TotalSupply (r:1 w:0)381	fn transfer_from_normal() -> Weight {382		Weight::from_ref_time(37_628_000)383			.saturating_add(RocksDbWeight::get().reads(4 as u64))384			.saturating_add(RocksDbWeight::get().writes(3 as u64))385	}386	// Storage: Refungible Allowance (r:1 w:1)387	// Storage: Refungible Balance (r:2 w:2)388	// Storage: Refungible AccountBalance (r:1 w:1)389	// Storage: Refungible TotalSupply (r:1 w:0)390	// Storage: Refungible Owned (r:0 w:1)391	fn transfer_from_creating() -> Weight {392		Weight::from_ref_time(42_072_000)393			.saturating_add(RocksDbWeight::get().reads(5 as u64))394			.saturating_add(RocksDbWeight::get().writes(5 as u64))395	}396	// Storage: Refungible Allowance (r:1 w:1)397	// Storage: Refungible Balance (r:2 w:2)398	// Storage: Refungible AccountBalance (r:1 w:1)399	// Storage: Refungible TotalSupply (r:1 w:0)400	// Storage: Refungible Owned (r:0 w:1)401	fn transfer_from_removing() -> Weight {402		Weight::from_ref_time(43_024_000)403			.saturating_add(RocksDbWeight::get().reads(5 as u64))404			.saturating_add(RocksDbWeight::get().writes(5 as u64))405	}406	// Storage: Refungible Allowance (r:1 w:1)407	// Storage: Refungible Balance (r:2 w:2)408	// Storage: Refungible AccountBalance (r:2 w:2)409	// Storage: Refungible TotalSupply (r:1 w:0)410	// Storage: Refungible Owned (r:0 w:2)411	fn transfer_from_creating_removing() -> Weight {412		Weight::from_ref_time(45_910_000)413			.saturating_add(RocksDbWeight::get().reads(6 as u64))414			.saturating_add(RocksDbWeight::get().writes(7 as u64))415	}416	// Storage: Refungible Allowance (r:1 w:1)417	// Storage: Refungible TotalSupply (r:1 w:1)418	// Storage: Refungible Balance (r:1 w:1)419	// Storage: Refungible AccountBalance (r:1 w:1)420	// Storage: Refungible TokensBurnt (r:1 w:1)421	// Storage: Refungible Owned (r:0 w:1)422	// Storage: Refungible TokenProperties (r:0 w:1)423	fn burn_from() -> Weight {424		Weight::from_ref_time(48_584_000)425			.saturating_add(RocksDbWeight::get().reads(5 as u64))426			.saturating_add(RocksDbWeight::get().writes(7 as u64))427	}428	// Storage: Common CollectionPropertyPermissions (r:1 w:1)429	fn set_token_property_permissions(b: u32, ) -> Weight {430		(Weight::from_ref_time(0))431			// Standard Error: 60_000432			.saturating_add(Weight::from_ref_time(15_533_000).saturating_mul(b as u64))433			.saturating_add(RocksDbWeight::get().reads(1 as u64))434			.saturating_add(RocksDbWeight::get().writes(1 as u64))435	}436	// Storage: Common CollectionPropertyPermissions (r:1 w:0)437	// Storage: Refungible TokenProperties (r:1 w:1)438	fn set_token_properties(b: u32, ) -> Weight {439		(Weight::from_ref_time(0))440			// Standard Error: 3_609_000441			.saturating_add(Weight::from_ref_time(590_204_000).saturating_mul(b as u64))442			.saturating_add(RocksDbWeight::get().reads(2 as u64))443			.saturating_add(RocksDbWeight::get().writes(1 as u64))444	}445	// Storage: Common CollectionPropertyPermissions (r:1 w:0)446	// Storage: Refungible TokenProperties (r:1 w:1)447	fn delete_token_properties(b: u32, ) -> Weight {448		(Weight::from_ref_time(0))449			// Standard Error: 3_637_000450			.saturating_add(Weight::from_ref_time(603_468_000).saturating_mul(b as u64))451			.saturating_add(RocksDbWeight::get().reads(2 as u64))452			.saturating_add(RocksDbWeight::get().writes(1 as u64))453	}454	// Storage: Refungible TotalSupply (r:1 w:1)455	// Storage: Refungible Balance (r:1 w:1)456	fn repartition_item() -> Weight {457		Weight::from_ref_time(22_356_000)458			.saturating_add(RocksDbWeight::get().reads(2 as u64))459			.saturating_add(RocksDbWeight::get().writes(2 as u64))460	}461	// Storage: Refungible Balance (r:2 w:0)462	fn token_owner() -> Weight {463		Weight::from_ref_time(9_431_000)464			.saturating_add(RocksDbWeight::get().reads(2 as u64))465	}466}