git.delta.rocks / unique-network / refs/commits / 2203d0f0ed69

difftreelog

source

pallets/refungible/src/weights.rs18.7 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		(29_527_000 as Weight)69			.saturating_add(T::DbWeight::get().reads(2 as Weight))70			.saturating_add(T::DbWeight::get().writes(5 as Weight))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		(28_541_000 as Weight)79			// Standard Error: 4_00080			.saturating_add((6_671_000 as Weight).saturating_mul(b as Weight))81			.saturating_add(T::DbWeight::get().reads(2 as Weight))82			.saturating_add(T::DbWeight::get().writes(2 as Weight))83			.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))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		(24_366_000 as Weight)92			// Standard Error: 5_00093			.saturating_add((9_338_000 as Weight).saturating_mul(b as Weight))94			.saturating_add(T::DbWeight::get().reads(1 as Weight))95			.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))96			.saturating_add(T::DbWeight::get().writes(1 as Weight))97			.saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))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		(27_574_000 as Weight)106			// Standard Error: 4_000107			.saturating_add((7_193_000 as Weight).saturating_mul(b as Weight))108			.saturating_add(T::DbWeight::get().reads(1 as Weight))109			.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))110			.saturating_add(T::DbWeight::get().writes(2 as Weight))111			.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))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		(42_943_000 as Weight)119			.saturating_add(T::DbWeight::get().reads(5 as Weight))120			.saturating_add(T::DbWeight::get().writes(4 as Weight))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		(36_861_000 as Weight)130			.saturating_add(T::DbWeight::get().reads(4 as Weight))131			.saturating_add(T::DbWeight::get().writes(6 as Weight))132	}133	// Storage: Refungible Balance (r:2 w:2)134	// Storage: Refungible TotalSupply (r:1 w:0)135	fn transfer_normal() -> Weight {136		(27_789_000 as Weight)137			.saturating_add(T::DbWeight::get().reads(3 as Weight))138			.saturating_add(T::DbWeight::get().writes(2 as Weight))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		(32_893_000 as Weight)146			.saturating_add(T::DbWeight::get().reads(4 as Weight))147			.saturating_add(T::DbWeight::get().writes(4 as Weight))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		(34_703_000 as Weight)155			.saturating_add(T::DbWeight::get().reads(4 as Weight))156			.saturating_add(T::DbWeight::get().writes(4 as Weight))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		(37_547_000 as Weight)164			.saturating_add(T::DbWeight::get().reads(5 as Weight))165			.saturating_add(T::DbWeight::get().writes(6 as Weight))166	}167	// Storage: Refungible Balance (r:1 w:0)168	// Storage: Refungible Allowance (r:0 w:1)169	fn approve() -> Weight {170		(20_039_000 as Weight)171			.saturating_add(T::DbWeight::get().reads(1 as Weight))172			.saturating_add(T::DbWeight::get().writes(1 as Weight))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		(37_628_000 as Weight)179			.saturating_add(T::DbWeight::get().reads(4 as Weight))180			.saturating_add(T::DbWeight::get().writes(3 as Weight))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		(42_072_000 as Weight)189			.saturating_add(T::DbWeight::get().reads(5 as Weight))190			.saturating_add(T::DbWeight::get().writes(5 as Weight))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		(43_024_000 as Weight)199			.saturating_add(T::DbWeight::get().reads(5 as Weight))200			.saturating_add(T::DbWeight::get().writes(5 as Weight))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		(45_910_000 as Weight)209			.saturating_add(T::DbWeight::get().reads(6 as Weight))210			.saturating_add(T::DbWeight::get().writes(7 as Weight))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		(48_584_000 as Weight)221			.saturating_add(T::DbWeight::get().reads(5 as Weight))222			.saturating_add(T::DbWeight::get().writes(7 as Weight))223	}224	// Storage: Common CollectionPropertyPermissions (r:1 w:1)225	fn set_token_property_permissions(b: u32, ) -> Weight {226		(0 as Weight)227			// Standard Error: 60_000228			.saturating_add((15_533_000 as Weight).saturating_mul(b as Weight))229			.saturating_add(T::DbWeight::get().reads(1 as Weight))230			.saturating_add(T::DbWeight::get().writes(1 as Weight))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		(0 as Weight)236			// Standard Error: 3_609_000237			.saturating_add((590_204_000 as Weight).saturating_mul(b as Weight))238			.saturating_add(T::DbWeight::get().reads(2 as Weight))239			.saturating_add(T::DbWeight::get().writes(1 as Weight))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		(0 as Weight)245			// Standard Error: 3_637_000246			.saturating_add((603_468_000 as Weight).saturating_mul(b as Weight))247			.saturating_add(T::DbWeight::get().reads(2 as Weight))248			.saturating_add(T::DbWeight::get().writes(1 as Weight))249	}250	// Storage: Refungible TotalSupply (r:1 w:1)251	// Storage: Refungible Balance (r:1 w:1)252	fn repartition_item() -> Weight {253		(22_356_000 as Weight)254			.saturating_add(T::DbWeight::get().reads(2 as Weight))255			.saturating_add(T::DbWeight::get().writes(2 as Weight))256	}257	// Storage: Refungible Balance (r:2 w:0)258	fn token_owner() -> Weight {259		(9_431_000 as Weight)260			.saturating_add(T::DbWeight::get().reads(2 as Weight))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		(29_527_000 as Weight)273			.saturating_add(RocksDbWeight::get().reads(2 as Weight))274			.saturating_add(RocksDbWeight::get().writes(5 as Weight))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		(28_541_000 as Weight)283			// Standard Error: 4_000284			.saturating_add((6_671_000 as Weight).saturating_mul(b as Weight))285			.saturating_add(RocksDbWeight::get().reads(2 as Weight))286			.saturating_add(RocksDbWeight::get().writes(2 as Weight))287			.saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))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		(24_366_000 as Weight)296			// Standard Error: 5_000297			.saturating_add((9_338_000 as Weight).saturating_mul(b as Weight))298			.saturating_add(RocksDbWeight::get().reads(1 as Weight))299			.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))300			.saturating_add(RocksDbWeight::get().writes(1 as Weight))301			.saturating_add(RocksDbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))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		(27_574_000 as Weight)310			// Standard Error: 4_000311			.saturating_add((7_193_000 as Weight).saturating_mul(b as Weight))312			.saturating_add(RocksDbWeight::get().reads(1 as Weight))313			.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))314			.saturating_add(RocksDbWeight::get().writes(2 as Weight))315			.saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))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		(42_943_000 as Weight)323			.saturating_add(RocksDbWeight::get().reads(5 as Weight))324			.saturating_add(RocksDbWeight::get().writes(4 as Weight))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		(36_861_000 as Weight)334			.saturating_add(RocksDbWeight::get().reads(4 as Weight))335			.saturating_add(RocksDbWeight::get().writes(6 as Weight))336	}337	// Storage: Refungible Balance (r:2 w:2)338	// Storage: Refungible TotalSupply (r:1 w:0)339	fn transfer_normal() -> Weight {340		(27_789_000 as Weight)341			.saturating_add(RocksDbWeight::get().reads(3 as Weight))342			.saturating_add(RocksDbWeight::get().writes(2 as Weight))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		(32_893_000 as Weight)350			.saturating_add(RocksDbWeight::get().reads(4 as Weight))351			.saturating_add(RocksDbWeight::get().writes(4 as Weight))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		(34_703_000 as Weight)359			.saturating_add(RocksDbWeight::get().reads(4 as Weight))360			.saturating_add(RocksDbWeight::get().writes(4 as Weight))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		(37_547_000 as Weight)368			.saturating_add(RocksDbWeight::get().reads(5 as Weight))369			.saturating_add(RocksDbWeight::get().writes(6 as Weight))370	}371	// Storage: Refungible Balance (r:1 w:0)372	// Storage: Refungible Allowance (r:0 w:1)373	fn approve() -> Weight {374		(20_039_000 as Weight)375			.saturating_add(RocksDbWeight::get().reads(1 as Weight))376			.saturating_add(RocksDbWeight::get().writes(1 as Weight))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		(37_628_000 as Weight)383			.saturating_add(RocksDbWeight::get().reads(4 as Weight))384			.saturating_add(RocksDbWeight::get().writes(3 as Weight))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		(42_072_000 as Weight)393			.saturating_add(RocksDbWeight::get().reads(5 as Weight))394			.saturating_add(RocksDbWeight::get().writes(5 as Weight))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		(43_024_000 as Weight)403			.saturating_add(RocksDbWeight::get().reads(5 as Weight))404			.saturating_add(RocksDbWeight::get().writes(5 as Weight))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		(45_910_000 as Weight)413			.saturating_add(RocksDbWeight::get().reads(6 as Weight))414			.saturating_add(RocksDbWeight::get().writes(7 as Weight))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		(48_584_000 as Weight)425			.saturating_add(RocksDbWeight::get().reads(5 as Weight))426			.saturating_add(RocksDbWeight::get().writes(7 as Weight))427	}428	// Storage: Common CollectionPropertyPermissions (r:1 w:1)429	fn set_token_property_permissions(b: u32, ) -> Weight {430		(0 as Weight)431			// Standard Error: 60_000432			.saturating_add((15_533_000 as Weight).saturating_mul(b as Weight))433			.saturating_add(RocksDbWeight::get().reads(1 as Weight))434			.saturating_add(RocksDbWeight::get().writes(1 as Weight))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		(0 as Weight)440			// Standard Error: 3_609_000441			.saturating_add((590_204_000 as Weight).saturating_mul(b as Weight))442			.saturating_add(RocksDbWeight::get().reads(2 as Weight))443			.saturating_add(RocksDbWeight::get().writes(1 as Weight))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		(0 as Weight)449			// Standard Error: 3_637_000450			.saturating_add((603_468_000 as Weight).saturating_mul(b as Weight))451			.saturating_add(RocksDbWeight::get().reads(2 as Weight))452			.saturating_add(RocksDbWeight::get().writes(1 as Weight))453	}454	// Storage: Refungible TotalSupply (r:1 w:1)455	// Storage: Refungible Balance (r:1 w:1)456	fn repartition_item() -> Weight {457		(22_356_000 as Weight)458			.saturating_add(RocksDbWeight::get().reads(2 as Weight))459			.saturating_add(RocksDbWeight::get().writes(2 as Weight))460	}461	// Storage: Refungible Balance (r:2 w:0)462	fn token_owner() -> Weight {463		(9_431_000 as Weight)464			.saturating_add(RocksDbWeight::get().reads(2 as Weight))465	}466}