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

difftreelog

source

pallets/refungible/src/weights.rs15.6 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_property() -> 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_variable_metadata(b: u32, ) -> Weight;53}5455/// Weights for pallet_refungible using the Substrate node and recommended hardware.56pub struct SubstrateWeight<T>(PhantomData<T>);57impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {58	// Storage: Refungible TokensMinted (r:1 w:1)59	// Storage: Refungible AccountBalance (r:1 w:1)60	// Storage: Refungible Balance (r:0 w:1)61	// Storage: Refungible TotalSupply (r:0 w:1)62	// Storage: Refungible TokenData (r:0 w:1)63	// Storage: Refungible Owned (r:0 w:1)64	fn create_item() -> Weight {65		(21_255_000 as Weight)66			.saturating_add(T::DbWeight::get().reads(2 as Weight))67			.saturating_add(T::DbWeight::get().writes(6 as Weight))68	}69	// Storage: Refungible TokensMinted (r:1 w:1)70	// Storage: Refungible AccountBalance (r:1 w:1)71	// Storage: Refungible Balance (r:0 w:4)72	// Storage: Refungible TotalSupply (r:0 w:4)73	// Storage: Refungible TokenData (r:0 w:4)74	// Storage: Refungible Owned (r:0 w:4)75	fn create_multiple_items(b: u32, ) -> Weight {76		(18_052_000 as Weight)77			// Standard Error: 1_00078			.saturating_add((5_549_000 as Weight).saturating_mul(b as Weight))79			.saturating_add(T::DbWeight::get().reads(2 as Weight))80			.saturating_add(T::DbWeight::get().writes(2 as Weight))81			.saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))82	}83	// Storage: Refungible TokensMinted (r:1 w:1)84	// Storage: Refungible AccountBalance (r:4 w:4)85	// Storage: Refungible Balance (r:0 w:4)86	// Storage: Refungible TotalSupply (r:0 w:4)87	// Storage: Refungible TokenData (r:0 w:4)88	// Storage: Refungible Owned (r:0 w:4)89	fn create_multiple_items_ex_multiple_items(b: u32, ) -> Weight {90		(15_766_000 as Weight)91			// Standard Error: 2_00092			.saturating_add((8_187_000 as Weight).saturating_mul(b as Weight))93			.saturating_add(T::DbWeight::get().reads(1 as Weight))94			.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))95			.saturating_add(T::DbWeight::get().writes(1 as Weight))96			.saturating_add(T::DbWeight::get().writes((5 as Weight).saturating_mul(b as Weight)))97	}98	// Storage: Refungible TokensMinted (r:1 w:1)99	// Storage: Refungible TotalSupply (r:0 w:1)100	// Storage: Refungible TokenData (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		(5_675_000 as Weight)106			// Standard Error: 2_000107			.saturating_add((6_315_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(3 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:1 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		(23_518_000 as Weight)119			.saturating_add(T::DbWeight::get().reads(3 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 TokenData (r:0 w:1)127	// Storage: Refungible Owned (r:0 w:1)128	fn burn_item_fully() -> Weight {129		(32_489_000 as Weight)130			.saturating_add(T::DbWeight::get().reads(4 as Weight))131			.saturating_add(T::DbWeight::get().writes(6 as Weight))132	}133134	fn set_property() -> Weight {135		// Error136		0137	}138139	// Storage: Refungible Balance (r:2 w:2)140	fn transfer_normal() -> Weight {141		(19_766_000 as Weight)142			.saturating_add(T::DbWeight::get().reads(2 as Weight))143			.saturating_add(T::DbWeight::get().writes(2 as Weight))144	}145	// Storage: Refungible Balance (r:2 w:2)146	// Storage: Refungible AccountBalance (r:1 w:1)147	// Storage: Refungible Owned (r:0 w:1)148	fn transfer_creating() -> Weight {149		(23_360_000 as Weight)150			.saturating_add(T::DbWeight::get().reads(3 as Weight))151			.saturating_add(T::DbWeight::get().writes(4 as Weight))152	}153	// Storage: Refungible Balance (r:2 w:2)154	// Storage: Refungible AccountBalance (r:1 w:1)155	// Storage: Refungible Owned (r:0 w:1)156	fn transfer_removing() -> Weight {157		(25_344_000 as Weight)158			.saturating_add(T::DbWeight::get().reads(3 as Weight))159			.saturating_add(T::DbWeight::get().writes(4 as Weight))160	}161	// Storage: Refungible Balance (r:2 w:2)162	// Storage: Refungible AccountBalance (r:2 w:2)163	// Storage: Refungible Owned (r:0 w:2)164	fn transfer_creating_removing() -> Weight {165		(28_553_000 as Weight)166			.saturating_add(T::DbWeight::get().reads(4 as Weight))167			.saturating_add(T::DbWeight::get().writes(6 as Weight))168	}169	// Storage: Refungible Balance (r:1 w:0)170	// Storage: Refungible Allowance (r:0 w:1)171	fn approve() -> Weight {172		(15_356_000 as Weight)173			.saturating_add(T::DbWeight::get().reads(1 as Weight))174			.saturating_add(T::DbWeight::get().writes(1 as Weight))175	}176	// Storage: Refungible Allowance (r:1 w:1)177	// Storage: Refungible Balance (r:2 w:2)178	fn transfer_from_normal() -> Weight {179		(28_832_000 as Weight)180			.saturating_add(T::DbWeight::get().reads(3 as Weight))181			.saturating_add(T::DbWeight::get().writes(3 as Weight))182	}183	// Storage: Refungible Allowance (r:1 w:1)184	// Storage: Refungible Balance (r:2 w:2)185	// Storage: Refungible AccountBalance (r:1 w:1)186	// Storage: Refungible Owned (r:0 w:1)187	fn transfer_from_creating() -> Weight {188		(32_132_000 as Weight)189			.saturating_add(T::DbWeight::get().reads(4 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 Owned (r:0 w:1)196	fn transfer_from_removing() -> Weight {197		(33_237_000 as Weight)198			.saturating_add(T::DbWeight::get().reads(4 as Weight))199			.saturating_add(T::DbWeight::get().writes(5 as Weight))200	}201	// Storage: Refungible Allowance (r:1 w:1)202	// Storage: Refungible Balance (r:2 w:2)203	// Storage: Refungible AccountBalance (r:2 w:2)204	// Storage: Refungible Owned (r:0 w:2)205	fn transfer_from_creating_removing() -> Weight {206		(36_399_000 as Weight)207			.saturating_add(T::DbWeight::get().reads(5 as Weight))208			.saturating_add(T::DbWeight::get().writes(7 as Weight))209	}210	// Storage: Refungible Allowance (r:1 w:1)211	// Storage: Refungible TotalSupply (r:1 w:1)212	// Storage: Refungible Balance (r:1 w:1)213	// Storage: Refungible AccountBalance (r:1 w:1)214	// Storage: Refungible TokensBurnt (r:1 w:1)215	// Storage: Refungible TokenData (r:0 w:1)216	// Storage: Refungible Owned (r:0 w:1)217	fn burn_from() -> Weight {218		(42_043_000 as Weight)219			.saturating_add(T::DbWeight::get().reads(5 as Weight))220			.saturating_add(T::DbWeight::get().writes(7 as Weight))221	}222	// Storage: Refungible TokenData (r:1 w:1)223	fn set_variable_metadata(_b: u32, ) -> Weight {224		(7_364_000 as Weight)225			.saturating_add(T::DbWeight::get().reads(1 as Weight))226			.saturating_add(T::DbWeight::get().writes(1 as Weight))227	}228}229230// For backwards compatibility and tests231impl WeightInfo for () {232	// Storage: Refungible TokensMinted (r:1 w:1)233	// Storage: Refungible AccountBalance (r:1 w:1)234	// Storage: Refungible Balance (r:0 w:1)235	// Storage: Refungible TotalSupply (r:0 w:1)236	// Storage: Refungible TokenData (r:0 w:1)237	// Storage: Refungible Owned (r:0 w:1)238	fn create_item() -> Weight {239		(21_255_000 as Weight)240			.saturating_add(RocksDbWeight::get().reads(2 as Weight))241			.saturating_add(RocksDbWeight::get().writes(6 as Weight))242	}243	// Storage: Refungible TokensMinted (r:1 w:1)244	// Storage: Refungible AccountBalance (r:1 w:1)245	// Storage: Refungible Balance (r:0 w:4)246	// Storage: Refungible TotalSupply (r:0 w:4)247	// Storage: Refungible TokenData (r:0 w:4)248	// Storage: Refungible Owned (r:0 w:4)249	fn create_multiple_items(b: u32, ) -> Weight {250		(18_052_000 as Weight)251			// Standard Error: 1_000252			.saturating_add((5_549_000 as Weight).saturating_mul(b as Weight))253			.saturating_add(RocksDbWeight::get().reads(2 as Weight))254			.saturating_add(RocksDbWeight::get().writes(2 as Weight))255			.saturating_add(RocksDbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))256	}257	// Storage: Refungible TokensMinted (r:1 w:1)258	// Storage: Refungible AccountBalance (r:4 w:4)259	// Storage: Refungible Balance (r:0 w:4)260	// Storage: Refungible TotalSupply (r:0 w:4)261	// Storage: Refungible TokenData (r:0 w:4)262	// Storage: Refungible Owned (r:0 w:4)263	fn create_multiple_items_ex_multiple_items(b: u32, ) -> Weight {264		(15_766_000 as Weight)265			// Standard Error: 2_000266			.saturating_add((8_187_000 as Weight).saturating_mul(b as Weight))267			.saturating_add(RocksDbWeight::get().reads(1 as Weight))268			.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))269			.saturating_add(RocksDbWeight::get().writes(1 as Weight))270			.saturating_add(RocksDbWeight::get().writes((5 as Weight).saturating_mul(b as Weight)))271	}272	// Storage: Refungible TokensMinted (r:1 w:1)273	// Storage: Refungible TotalSupply (r:0 w:1)274	// Storage: Refungible TokenData (r:0 w:1)275	// Storage: Refungible AccountBalance (r:4 w:4)276	// Storage: Refungible Balance (r:0 w:4)277	// Storage: Refungible Owned (r:0 w:4)278	fn create_multiple_items_ex_multiple_owners(b: u32, ) -> Weight {279		(5_675_000 as Weight)280			// Standard Error: 2_000281			.saturating_add((6_315_000 as Weight).saturating_mul(b as Weight))282			.saturating_add(RocksDbWeight::get().reads(1 as Weight))283			.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))284			.saturating_add(RocksDbWeight::get().writes(3 as Weight))285			.saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))286	}287	// Storage: Refungible TotalSupply (r:1 w:1)288	// Storage: Refungible Balance (r:1 w:1)289	// Storage: Refungible AccountBalance (r:1 w:1)290	// Storage: Refungible Owned (r:0 w:1)291	fn burn_item_partial() -> Weight {292		(23_518_000 as Weight)293			.saturating_add(RocksDbWeight::get().reads(3 as Weight))294			.saturating_add(RocksDbWeight::get().writes(4 as Weight))295	}296	// Storage: Refungible TotalSupply (r:1 w:1)297	// Storage: Refungible Balance (r:1 w:1)298	// Storage: Refungible AccountBalance (r:1 w:1)299	// Storage: Refungible TokensBurnt (r:1 w:1)300	// Storage: Refungible TokenData (r:0 w:1)301	// Storage: Refungible Owned (r:0 w:1)302	fn burn_item_fully() -> Weight {303		(32_489_000 as Weight)304			.saturating_add(RocksDbWeight::get().reads(4 as Weight))305			.saturating_add(RocksDbWeight::get().writes(6 as Weight))306	}307308	fn set_property() -> Weight {309		// Error310		0311	}312313	// Storage: Refungible Balance (r:2 w:2)314	fn transfer_normal() -> Weight {315		(19_766_000 as Weight)316			.saturating_add(RocksDbWeight::get().reads(2 as Weight))317			.saturating_add(RocksDbWeight::get().writes(2 as Weight))318	}319	// Storage: Refungible Balance (r:2 w:2)320	// Storage: Refungible AccountBalance (r:1 w:1)321	// Storage: Refungible Owned (r:0 w:1)322	fn transfer_creating() -> Weight {323		(23_360_000 as Weight)324			.saturating_add(RocksDbWeight::get().reads(3 as Weight))325			.saturating_add(RocksDbWeight::get().writes(4 as Weight))326	}327	// Storage: Refungible Balance (r:2 w:2)328	// Storage: Refungible AccountBalance (r:1 w:1)329	// Storage: Refungible Owned (r:0 w:1)330	fn transfer_removing() -> Weight {331		(25_344_000 as Weight)332			.saturating_add(RocksDbWeight::get().reads(3 as Weight))333			.saturating_add(RocksDbWeight::get().writes(4 as Weight))334	}335	// Storage: Refungible Balance (r:2 w:2)336	// Storage: Refungible AccountBalance (r:2 w:2)337	// Storage: Refungible Owned (r:0 w:2)338	fn transfer_creating_removing() -> Weight {339		(28_553_000 as Weight)340			.saturating_add(RocksDbWeight::get().reads(4 as Weight))341			.saturating_add(RocksDbWeight::get().writes(6 as Weight))342	}343	// Storage: Refungible Balance (r:1 w:0)344	// Storage: Refungible Allowance (r:0 w:1)345	fn approve() -> Weight {346		(15_356_000 as Weight)347			.saturating_add(RocksDbWeight::get().reads(1 as Weight))348			.saturating_add(RocksDbWeight::get().writes(1 as Weight))349	}350	// Storage: Refungible Allowance (r:1 w:1)351	// Storage: Refungible Balance (r:2 w:2)352	fn transfer_from_normal() -> Weight {353		(28_832_000 as Weight)354			.saturating_add(RocksDbWeight::get().reads(3 as Weight))355			.saturating_add(RocksDbWeight::get().writes(3 as Weight))356	}357	// Storage: Refungible Allowance (r:1 w:1)358	// Storage: Refungible Balance (r:2 w:2)359	// Storage: Refungible AccountBalance (r:1 w:1)360	// Storage: Refungible Owned (r:0 w:1)361	fn transfer_from_creating() -> Weight {362		(32_132_000 as Weight)363			.saturating_add(RocksDbWeight::get().reads(4 as Weight))364			.saturating_add(RocksDbWeight::get().writes(5 as Weight))365	}366	// Storage: Refungible Allowance (r:1 w:1)367	// Storage: Refungible Balance (r:2 w:2)368	// Storage: Refungible AccountBalance (r:1 w:1)369	// Storage: Refungible Owned (r:0 w:1)370	fn transfer_from_removing() -> Weight {371		(33_237_000 as Weight)372			.saturating_add(RocksDbWeight::get().reads(4 as Weight))373			.saturating_add(RocksDbWeight::get().writes(5 as Weight))374	}375	// Storage: Refungible Allowance (r:1 w:1)376	// Storage: Refungible Balance (r:2 w:2)377	// Storage: Refungible AccountBalance (r:2 w:2)378	// Storage: Refungible Owned (r:0 w:2)379	fn transfer_from_creating_removing() -> Weight {380		(36_399_000 as Weight)381			.saturating_add(RocksDbWeight::get().reads(5 as Weight))382			.saturating_add(RocksDbWeight::get().writes(7 as Weight))383	}384	// Storage: Refungible Allowance (r:1 w:1)385	// Storage: Refungible TotalSupply (r:1 w:1)386	// Storage: Refungible Balance (r:1 w:1)387	// Storage: Refungible AccountBalance (r:1 w:1)388	// Storage: Refungible TokensBurnt (r:1 w:1)389	// Storage: Refungible TokenData (r:0 w:1)390	// Storage: Refungible Owned (r:0 w:1)391	fn burn_from() -> Weight {392		(42_043_000 as Weight)393			.saturating_add(RocksDbWeight::get().reads(5 as Weight))394			.saturating_add(RocksDbWeight::get().writes(7 as Weight))395	}396	// Storage: Refungible TokenData (r:1 w:1)397	fn set_variable_metadata(_b: u32, ) -> Weight {398		(7_364_000 as Weight)399			.saturating_add(RocksDbWeight::get().reads(1 as Weight))400			.saturating_add(RocksDbWeight::get().writes(1 as Weight))401	}402}