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

difftreelog

source

pallets/refungible/src/weights.rs16.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-03-01, STEPS: `50`, REPEAT: 200, 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-refungible14// --wasm-execution15// compiled16// --extrinsic17// *18// --template19// .maintain/frame-weight-template.hbs20// --steps=5021// --repeat=20022// --heap-pages=409623// --output=./pallets/refungible/src/weights.rs2425#![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_refungible.34pub trait WeightInfo {35	fn create_item() -> Weight;36	fn create_multiple_items(b: u32, ) -> Weight;37	fn create_multiple_items_ex_multiple_items(b: u32, ) -> Weight;38	fn create_multiple_items_ex_multiple_owners(b: u32, ) -> Weight;39	fn burn_item_partial() -> Weight;40	fn burn_item_fully() -> Weight;41	fn set_collection_properties(amount: u32) -> Weight;42	fn delete_collection_properties(amount: u32) -> Weight;43	fn set_token_properties(amount: u32) -> Weight;44	fn delete_token_properties(amount: u32) -> Weight;45	fn set_property_permissions(amount: u32) -> Weight;46	fn transfer_normal() -> Weight;47	fn transfer_creating() -> Weight;48	fn transfer_removing() -> Weight;49	fn transfer_creating_removing() -> Weight;50	fn approve() -> Weight;51	fn transfer_from_normal() -> Weight;52	fn transfer_from_creating() -> Weight;53	fn transfer_from_removing() -> Weight;54	fn transfer_from_creating_removing() -> Weight;55	fn burn_from() -> Weight;56}5758/// Weights for pallet_refungible using the Substrate node and recommended hardware.59pub struct SubstrateWeight<T>(PhantomData<T>);60impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {61	// Storage: Refungible TokensMinted (r:1 w:1)62	// Storage: Refungible AccountBalance (r:1 w:1)63	// Storage: Refungible Balance (r:0 w:1)64	// Storage: Refungible TotalSupply (r:0 w:1)65	// Storage: Refungible TokenData (r:0 w:1)66	// Storage: Refungible Owned (r:0 w:1)67	fn create_item() -> Weight {68		(21_255_000 as Weight)69			.saturating_add(T::DbWeight::get().reads(2 as Weight))70			.saturating_add(T::DbWeight::get().writes(6 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 TokenData (r:0 w:4)77	// Storage: Refungible Owned (r:0 w:4)78	fn create_multiple_items(b: u32, ) -> Weight {79		(18_052_000 as Weight)80			// Standard Error: 1_00081			.saturating_add((5_549_000 as Weight).saturating_mul(b as Weight))82			.saturating_add(T::DbWeight::get().reads(2 as Weight))83			.saturating_add(T::DbWeight::get().writes(2 as Weight))84			.saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))85	}86	// Storage: Refungible TokensMinted (r:1 w:1)87	// Storage: Refungible AccountBalance (r:4 w:4)88	// Storage: Refungible Balance (r:0 w:4)89	// Storage: Refungible TotalSupply (r:0 w:4)90	// Storage: Refungible TokenData (r:0 w:4)91	// Storage: Refungible Owned (r:0 w:4)92	fn create_multiple_items_ex_multiple_items(b: u32, ) -> Weight {93		(15_766_000 as Weight)94			// Standard Error: 2_00095			.saturating_add((8_187_000 as Weight).saturating_mul(b as Weight))96			.saturating_add(T::DbWeight::get().reads(1 as Weight))97			.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))98			.saturating_add(T::DbWeight::get().writes(1 as Weight))99			.saturating_add(T::DbWeight::get().writes((5 as Weight).saturating_mul(b as Weight)))100	}101	// Storage: Refungible TokensMinted (r:1 w:1)102	// Storage: Refungible TotalSupply (r:0 w:1)103	// Storage: Refungible TokenData (r:0 w:1)104	// Storage: Refungible AccountBalance (r:4 w:4)105	// Storage: Refungible Balance (r:0 w:4)106	// Storage: Refungible Owned (r:0 w:4)107	fn create_multiple_items_ex_multiple_owners(b: u32, ) -> Weight {108		(5_675_000 as Weight)109			// Standard Error: 2_000110			.saturating_add((6_315_000 as Weight).saturating_mul(b as Weight))111			.saturating_add(T::DbWeight::get().reads(1 as Weight))112			.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))113			.saturating_add(T::DbWeight::get().writes(3 as Weight))114			.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))115	}116	// Storage: Refungible TotalSupply (r:1 w:1)117	// Storage: Refungible Balance (r:1 w:1)118	// Storage: Refungible AccountBalance (r:1 w:1)119	// Storage: Refungible Owned (r:0 w:1)120	fn burn_item_partial() -> Weight {121		(23_518_000 as Weight)122			.saturating_add(T::DbWeight::get().reads(3 as Weight))123			.saturating_add(T::DbWeight::get().writes(4 as Weight))124	}125	// Storage: Refungible TotalSupply (r:1 w:1)126	// Storage: Refungible Balance (r:1 w:1)127	// Storage: Refungible AccountBalance (r:1 w:1)128	// Storage: Refungible TokensBurnt (r:1 w:1)129	// Storage: Refungible TokenData (r:0 w:1)130	// Storage: Refungible Owned (r:0 w:1)131	fn burn_item_fully() -> Weight {132		(32_489_000 as Weight)133			.saturating_add(T::DbWeight::get().reads(4 as Weight))134			.saturating_add(T::DbWeight::get().writes(6 as Weight))135	}136137	fn set_collection_properties(_amount: u32) -> Weight {138		// Error139		0140	}141142	fn delete_collection_properties(_amount: u32) -> Weight {143		// Error144		0145	}146147	fn set_token_properties(_amount: u32) -> Weight {148		// Error149		0150	}151152	fn delete_token_properties(_amount: u32) -> Weight {153		// Error154		0155	}156157	fn set_property_permissions(_amount: u32) -> Weight {158		// Error159		0160	}161162	// Storage: Refungible Balance (r:2 w:2)163	fn transfer_normal() -> Weight {164		(19_766_000 as Weight)165			.saturating_add(T::DbWeight::get().reads(2 as Weight))166			.saturating_add(T::DbWeight::get().writes(2 as Weight))167	}168	// Storage: Refungible Balance (r:2 w:2)169	// Storage: Refungible AccountBalance (r:1 w:1)170	// Storage: Refungible Owned (r:0 w:1)171	fn transfer_creating() -> Weight {172		(23_360_000 as Weight)173			.saturating_add(T::DbWeight::get().reads(3 as Weight))174			.saturating_add(T::DbWeight::get().writes(4 as Weight))175	}176	// Storage: Refungible Balance (r:2 w:2)177	// Storage: Refungible AccountBalance (r:1 w:1)178	// Storage: Refungible Owned (r:0 w:1)179	fn transfer_removing() -> Weight {180		(25_344_000 as Weight)181			.saturating_add(T::DbWeight::get().reads(3 as Weight))182			.saturating_add(T::DbWeight::get().writes(4 as Weight))183	}184	// Storage: Refungible Balance (r:2 w:2)185	// Storage: Refungible AccountBalance (r:2 w:2)186	// Storage: Refungible Owned (r:0 w:2)187	fn transfer_creating_removing() -> Weight {188		(28_553_000 as Weight)189			.saturating_add(T::DbWeight::get().reads(4 as Weight))190			.saturating_add(T::DbWeight::get().writes(6 as Weight))191	}192	// Storage: Refungible Balance (r:1 w:0)193	// Storage: Refungible Allowance (r:0 w:1)194	fn approve() -> Weight {195		(15_356_000 as Weight)196			.saturating_add(T::DbWeight::get().reads(1 as Weight))197			.saturating_add(T::DbWeight::get().writes(1 as Weight))198	}199	// Storage: Refungible Allowance (r:1 w:1)200	// Storage: Refungible Balance (r:2 w:2)201	fn transfer_from_normal() -> Weight {202		(28_832_000 as Weight)203			.saturating_add(T::DbWeight::get().reads(3 as Weight))204			.saturating_add(T::DbWeight::get().writes(3 as Weight))205	}206	// Storage: Refungible Allowance (r:1 w:1)207	// Storage: Refungible Balance (r:2 w:2)208	// Storage: Refungible AccountBalance (r:1 w:1)209	// Storage: Refungible Owned (r:0 w:1)210	fn transfer_from_creating() -> Weight {211		(32_132_000 as Weight)212			.saturating_add(T::DbWeight::get().reads(4 as Weight))213			.saturating_add(T::DbWeight::get().writes(5 as Weight))214	}215	// Storage: Refungible Allowance (r:1 w:1)216	// Storage: Refungible Balance (r:2 w:2)217	// Storage: Refungible AccountBalance (r:1 w:1)218	// Storage: Refungible Owned (r:0 w:1)219	fn transfer_from_removing() -> Weight {220		(33_237_000 as Weight)221			.saturating_add(T::DbWeight::get().reads(4 as Weight))222			.saturating_add(T::DbWeight::get().writes(5 as Weight))223	}224	// Storage: Refungible Allowance (r:1 w:1)225	// Storage: Refungible Balance (r:2 w:2)226	// Storage: Refungible AccountBalance (r:2 w:2)227	// Storage: Refungible Owned (r:0 w:2)228	fn transfer_from_creating_removing() -> Weight {229		(36_399_000 as Weight)230			.saturating_add(T::DbWeight::get().reads(5 as Weight))231			.saturating_add(T::DbWeight::get().writes(7 as Weight))232	}233	// Storage: Refungible Allowance (r:1 w:1)234	// Storage: Refungible TotalSupply (r:1 w:1)235	// Storage: Refungible Balance (r:1 w:1)236	// Storage: Refungible AccountBalance (r:1 w:1)237	// Storage: Refungible TokensBurnt (r:1 w:1)238	// Storage: Refungible TokenData (r:0 w:1)239	// Storage: Refungible Owned (r:0 w:1)240	fn burn_from() -> Weight {241		(42_043_000 as Weight)242			.saturating_add(T::DbWeight::get().reads(5 as Weight))243			.saturating_add(T::DbWeight::get().writes(7 as Weight))244	}245}246247// For backwards compatibility and tests248impl WeightInfo for () {249	// Storage: Refungible TokensMinted (r:1 w:1)250	// Storage: Refungible AccountBalance (r:1 w:1)251	// Storage: Refungible Balance (r:0 w:1)252	// Storage: Refungible TotalSupply (r:0 w:1)253	// Storage: Refungible TokenData (r:0 w:1)254	// Storage: Refungible Owned (r:0 w:1)255	fn create_item() -> Weight {256		(21_255_000 as Weight)257			.saturating_add(RocksDbWeight::get().reads(2 as Weight))258			.saturating_add(RocksDbWeight::get().writes(6 as Weight))259	}260	// Storage: Refungible TokensMinted (r:1 w:1)261	// Storage: Refungible AccountBalance (r:1 w:1)262	// Storage: Refungible Balance (r:0 w:4)263	// Storage: Refungible TotalSupply (r:0 w:4)264	// Storage: Refungible TokenData (r:0 w:4)265	// Storage: Refungible Owned (r:0 w:4)266	fn create_multiple_items(b: u32, ) -> Weight {267		(18_052_000 as Weight)268			// Standard Error: 1_000269			.saturating_add((5_549_000 as Weight).saturating_mul(b as Weight))270			.saturating_add(RocksDbWeight::get().reads(2 as Weight))271			.saturating_add(RocksDbWeight::get().writes(2 as Weight))272			.saturating_add(RocksDbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))273	}274	// Storage: Refungible TokensMinted (r:1 w:1)275	// Storage: Refungible AccountBalance (r:4 w:4)276	// Storage: Refungible Balance (r:0 w:4)277	// Storage: Refungible TotalSupply (r:0 w:4)278	// Storage: Refungible TokenData (r:0 w:4)279	// Storage: Refungible Owned (r:0 w:4)280	fn create_multiple_items_ex_multiple_items(b: u32, ) -> Weight {281		(15_766_000 as Weight)282			// Standard Error: 2_000283			.saturating_add((8_187_000 as Weight).saturating_mul(b as Weight))284			.saturating_add(RocksDbWeight::get().reads(1 as Weight))285			.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))286			.saturating_add(RocksDbWeight::get().writes(1 as Weight))287			.saturating_add(RocksDbWeight::get().writes((5 as Weight).saturating_mul(b as Weight)))288	}289	// Storage: Refungible TokensMinted (r:1 w:1)290	// Storage: Refungible TotalSupply (r:0 w:1)291	// Storage: Refungible TokenData (r:0 w:1)292	// Storage: Refungible AccountBalance (r:4 w:4)293	// Storage: Refungible Balance (r:0 w:4)294	// Storage: Refungible Owned (r:0 w:4)295	fn create_multiple_items_ex_multiple_owners(b: u32, ) -> Weight {296		(5_675_000 as Weight)297			// Standard Error: 2_000298			.saturating_add((6_315_000 as Weight).saturating_mul(b as Weight))299			.saturating_add(RocksDbWeight::get().reads(1 as Weight))300			.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))301			.saturating_add(RocksDbWeight::get().writes(3 as Weight))302			.saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))303	}304	// Storage: Refungible TotalSupply (r:1 w:1)305	// Storage: Refungible Balance (r:1 w:1)306	// Storage: Refungible AccountBalance (r:1 w:1)307	// Storage: Refungible Owned (r:0 w:1)308	fn burn_item_partial() -> Weight {309		(23_518_000 as Weight)310			.saturating_add(RocksDbWeight::get().reads(3 as Weight))311			.saturating_add(RocksDbWeight::get().writes(4 as Weight))312	}313	// Storage: Refungible TotalSupply (r:1 w:1)314	// Storage: Refungible Balance (r:1 w:1)315	// Storage: Refungible AccountBalance (r:1 w:1)316	// Storage: Refungible TokensBurnt (r:1 w:1)317	// Storage: Refungible TokenData (r:0 w:1)318	// Storage: Refungible Owned (r:0 w:1)319	fn burn_item_fully() -> Weight {320		(32_489_000 as Weight)321			.saturating_add(RocksDbWeight::get().reads(4 as Weight))322			.saturating_add(RocksDbWeight::get().writes(6 as Weight))323	}324325	fn set_collection_properties(_amount: u32) -> Weight {326		// Error327		0328	}329330	fn delete_collection_properties(_amount: u32) -> Weight {331		// Error332		0333	}334335	fn set_token_properties(_amount: u32) -> Weight {336		// Error337		0338	}339340	fn delete_token_properties(_amount: u32) -> Weight {341		// Error342		0343	}344345	fn set_property_permissions(_amount: u32) -> Weight {346		// Error347		0348	}349350	// Storage: Refungible Balance (r:2 w:2)351	fn transfer_normal() -> Weight {352		(19_766_000 as Weight)353			.saturating_add(RocksDbWeight::get().reads(2 as Weight))354			.saturating_add(RocksDbWeight::get().writes(2 as Weight))355	}356	// Storage: Refungible Balance (r:2 w:2)357	// Storage: Refungible AccountBalance (r:1 w:1)358	// Storage: Refungible Owned (r:0 w:1)359	fn transfer_creating() -> Weight {360		(23_360_000 as Weight)361			.saturating_add(RocksDbWeight::get().reads(3 as Weight))362			.saturating_add(RocksDbWeight::get().writes(4 as Weight))363	}364	// Storage: Refungible Balance (r:2 w:2)365	// Storage: Refungible AccountBalance (r:1 w:1)366	// Storage: Refungible Owned (r:0 w:1)367	fn transfer_removing() -> Weight {368		(25_344_000 as Weight)369			.saturating_add(RocksDbWeight::get().reads(3 as Weight))370			.saturating_add(RocksDbWeight::get().writes(4 as Weight))371	}372	// Storage: Refungible Balance (r:2 w:2)373	// Storage: Refungible AccountBalance (r:2 w:2)374	// Storage: Refungible Owned (r:0 w:2)375	fn transfer_creating_removing() -> Weight {376		(28_553_000 as Weight)377			.saturating_add(RocksDbWeight::get().reads(4 as Weight))378			.saturating_add(RocksDbWeight::get().writes(6 as Weight))379	}380	// Storage: Refungible Balance (r:1 w:0)381	// Storage: Refungible Allowance (r:0 w:1)382	fn approve() -> Weight {383		(15_356_000 as Weight)384			.saturating_add(RocksDbWeight::get().reads(1 as Weight))385			.saturating_add(RocksDbWeight::get().writes(1 as Weight))386	}387	// Storage: Refungible Allowance (r:1 w:1)388	// Storage: Refungible Balance (r:2 w:2)389	fn transfer_from_normal() -> Weight {390		(28_832_000 as Weight)391			.saturating_add(RocksDbWeight::get().reads(3 as Weight))392			.saturating_add(RocksDbWeight::get().writes(3 as Weight))393	}394	// Storage: Refungible Allowance (r:1 w:1)395	// Storage: Refungible Balance (r:2 w:2)396	// Storage: Refungible AccountBalance (r:1 w:1)397	// Storage: Refungible Owned (r:0 w:1)398	fn transfer_from_creating() -> Weight {399		(32_132_000 as Weight)400			.saturating_add(RocksDbWeight::get().reads(4 as Weight))401			.saturating_add(RocksDbWeight::get().writes(5 as Weight))402	}403	// Storage: Refungible Allowance (r:1 w:1)404	// Storage: Refungible Balance (r:2 w:2)405	// Storage: Refungible AccountBalance (r:1 w:1)406	// Storage: Refungible Owned (r:0 w:1)407	fn transfer_from_removing() -> Weight {408		(33_237_000 as Weight)409			.saturating_add(RocksDbWeight::get().reads(4 as Weight))410			.saturating_add(RocksDbWeight::get().writes(5 as Weight))411	}412	// Storage: Refungible Allowance (r:1 w:1)413	// Storage: Refungible Balance (r:2 w:2)414	// Storage: Refungible AccountBalance (r:2 w:2)415	// Storage: Refungible Owned (r:0 w:2)416	fn transfer_from_creating_removing() -> Weight {417		(36_399_000 as Weight)418			.saturating_add(RocksDbWeight::get().reads(5 as Weight))419			.saturating_add(RocksDbWeight::get().writes(7 as Weight))420	}421	// Storage: Refungible Allowance (r:1 w:1)422	// Storage: Refungible TotalSupply (r:1 w:1)423	// Storage: Refungible Balance (r:1 w:1)424	// Storage: Refungible AccountBalance (r:1 w:1)425	// Storage: Refungible TokensBurnt (r:1 w:1)426	// Storage: Refungible TokenData (r:0 w:1)427	// Storage: Refungible Owned (r:0 w:1)428	fn burn_from() -> Weight {429		(42_043_000 as Weight)430			.saturating_add(RocksDbWeight::get().reads(5 as Weight))431			.saturating_add(RocksDbWeight::get().writes(7 as Weight))432	}433}