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

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_token_properties(amount: u32) -> Weight;42	fn delete_token_properties(amount: u32) -> Weight;43	fn set_property_permissions(amount: u32) -> Weight;44	fn transfer_normal() -> Weight;45	fn transfer_creating() -> Weight;46	fn transfer_removing() -> Weight;47	fn transfer_creating_removing() -> Weight;48	fn approve() -> Weight;49	fn transfer_from_normal() -> Weight;50	fn transfer_from_creating() -> Weight;51	fn transfer_from_removing() -> Weight;52	fn transfer_from_creating_removing() -> Weight;53	fn burn_from() -> Weight;54}5556/// Weights for pallet_refungible using the Substrate node and recommended hardware.57pub struct SubstrateWeight<T>(PhantomData<T>);58impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {59	// Storage: Refungible TokensMinted (r:1 w:1)60	// Storage: Refungible AccountBalance (r:1 w:1)61	// Storage: Refungible Balance (r:0 w:1)62	// Storage: Refungible TotalSupply (r:0 w:1)63	// Storage: Refungible TokenData (r:0 w:1)64	// Storage: Refungible Owned (r:0 w:1)65	fn create_item() -> Weight {66		(21_255_000 as Weight)67			.saturating_add(T::DbWeight::get().reads(2 as Weight))68			.saturating_add(T::DbWeight::get().writes(6 as Weight))69	}70	// Storage: Refungible TokensMinted (r:1 w:1)71	// Storage: Refungible AccountBalance (r:1 w:1)72	// Storage: Refungible Balance (r:0 w:4)73	// Storage: Refungible TotalSupply (r:0 w:4)74	// Storage: Refungible TokenData (r:0 w:4)75	// Storage: Refungible Owned (r:0 w:4)76	fn create_multiple_items(b: u32, ) -> Weight {77		(18_052_000 as Weight)78			// Standard Error: 1_00079			.saturating_add((5_549_000 as Weight).saturating_mul(b as Weight))80			.saturating_add(T::DbWeight::get().reads(2 as Weight))81			.saturating_add(T::DbWeight::get().writes(2 as Weight))82			.saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))83	}84	// Storage: Refungible TokensMinted (r:1 w:1)85	// Storage: Refungible AccountBalance (r:4 w:4)86	// Storage: Refungible Balance (r:0 w:4)87	// Storage: Refungible TotalSupply (r:0 w:4)88	// Storage: Refungible TokenData (r:0 w:4)89	// Storage: Refungible Owned (r:0 w:4)90	fn create_multiple_items_ex_multiple_items(b: u32, ) -> Weight {91		(15_766_000 as Weight)92			// Standard Error: 2_00093			.saturating_add((8_187_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((5 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 TokenData (r:0 w:1)102	// Storage: Refungible AccountBalance (r:4 w:4)103	// Storage: Refungible Balance (r:0 w:4)104	// Storage: Refungible Owned (r:0 w:4)105	fn create_multiple_items_ex_multiple_owners(b: u32, ) -> Weight {106		(5_675_000 as Weight)107			// Standard Error: 2_000108			.saturating_add((6_315_000 as Weight).saturating_mul(b as Weight))109			.saturating_add(T::DbWeight::get().reads(1 as Weight))110			.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))111			.saturating_add(T::DbWeight::get().writes(3 as Weight))112			.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))113	}114	// Storage: Refungible TotalSupply (r:1 w:1)115	// Storage: Refungible Balance (r:1 w:1)116	// Storage: Refungible AccountBalance (r:1 w:1)117	// Storage: Refungible Owned (r:0 w:1)118	fn burn_item_partial() -> Weight {119		(23_518_000 as Weight)120			.saturating_add(T::DbWeight::get().reads(3 as Weight))121			.saturating_add(T::DbWeight::get().writes(4 as Weight))122	}123	// Storage: Refungible TotalSupply (r:1 w:1)124	// Storage: Refungible Balance (r:1 w:1)125	// Storage: Refungible AccountBalance (r:1 w:1)126	// Storage: Refungible TokensBurnt (r:1 w:1)127	// Storage: Refungible TokenData (r:0 w:1)128	// Storage: Refungible Owned (r:0 w:1)129	fn burn_item_fully() -> Weight {130		(32_489_000 as Weight)131			.saturating_add(T::DbWeight::get().reads(4 as Weight))132			.saturating_add(T::DbWeight::get().writes(6 as Weight))133	}134135	fn set_token_properties(_amount: u32) -> Weight {136		// Error137		0138	}139140	fn delete_token_properties(_amount: u32) -> Weight {141		// Error142		0143	}144145	fn set_property_permissions(_amount: u32) -> Weight {146		// Error147		0148	}149150	// Storage: Refungible Balance (r:2 w:2)151	fn transfer_normal() -> Weight {152		(19_766_000 as Weight)153			.saturating_add(T::DbWeight::get().reads(2 as Weight))154			.saturating_add(T::DbWeight::get().writes(2 as Weight))155	}156	// Storage: Refungible Balance (r:2 w:2)157	// Storage: Refungible AccountBalance (r:1 w:1)158	// Storage: Refungible Owned (r:0 w:1)159	fn transfer_creating() -> Weight {160		(23_360_000 as Weight)161			.saturating_add(T::DbWeight::get().reads(3 as Weight))162			.saturating_add(T::DbWeight::get().writes(4 as Weight))163	}164	// Storage: Refungible Balance (r:2 w:2)165	// Storage: Refungible AccountBalance (r:1 w:1)166	// Storage: Refungible Owned (r:0 w:1)167	fn transfer_removing() -> Weight {168		(25_344_000 as Weight)169			.saturating_add(T::DbWeight::get().reads(3 as Weight))170			.saturating_add(T::DbWeight::get().writes(4 as Weight))171	}172	// Storage: Refungible Balance (r:2 w:2)173	// Storage: Refungible AccountBalance (r:2 w:2)174	// Storage: Refungible Owned (r:0 w:2)175	fn transfer_creating_removing() -> Weight {176		(28_553_000 as Weight)177			.saturating_add(T::DbWeight::get().reads(4 as Weight))178			.saturating_add(T::DbWeight::get().writes(6 as Weight))179	}180	// Storage: Refungible Balance (r:1 w:0)181	// Storage: Refungible Allowance (r:0 w:1)182	fn approve() -> Weight {183		(15_356_000 as Weight)184			.saturating_add(T::DbWeight::get().reads(1 as Weight))185			.saturating_add(T::DbWeight::get().writes(1 as Weight))186	}187	// Storage: Refungible Allowance (r:1 w:1)188	// Storage: Refungible Balance (r:2 w:2)189	fn transfer_from_normal() -> Weight {190		(28_832_000 as Weight)191			.saturating_add(T::DbWeight::get().reads(3 as Weight))192			.saturating_add(T::DbWeight::get().writes(3 as Weight))193	}194	// Storage: Refungible Allowance (r:1 w:1)195	// Storage: Refungible Balance (r:2 w:2)196	// Storage: Refungible AccountBalance (r:1 w:1)197	// Storage: Refungible Owned (r:0 w:1)198	fn transfer_from_creating() -> Weight {199		(32_132_000 as Weight)200			.saturating_add(T::DbWeight::get().reads(4 as Weight))201			.saturating_add(T::DbWeight::get().writes(5 as Weight))202	}203	// Storage: Refungible Allowance (r:1 w:1)204	// Storage: Refungible Balance (r:2 w:2)205	// Storage: Refungible AccountBalance (r:1 w:1)206	// Storage: Refungible Owned (r:0 w:1)207	fn transfer_from_removing() -> Weight {208		(33_237_000 as Weight)209			.saturating_add(T::DbWeight::get().reads(4 as Weight))210			.saturating_add(T::DbWeight::get().writes(5 as Weight))211	}212	// Storage: Refungible Allowance (r:1 w:1)213	// Storage: Refungible Balance (r:2 w:2)214	// Storage: Refungible AccountBalance (r:2 w:2)215	// Storage: Refungible Owned (r:0 w:2)216	fn transfer_from_creating_removing() -> Weight {217		(36_399_000 as Weight)218			.saturating_add(T::DbWeight::get().reads(5 as Weight))219			.saturating_add(T::DbWeight::get().writes(7 as Weight))220	}221	// Storage: Refungible Allowance (r:1 w:1)222	// Storage: Refungible TotalSupply (r:1 w:1)223	// Storage: Refungible Balance (r:1 w:1)224	// Storage: Refungible AccountBalance (r:1 w:1)225	// Storage: Refungible TokensBurnt (r:1 w:1)226	// Storage: Refungible TokenData (r:0 w:1)227	// Storage: Refungible Owned (r:0 w:1)228	fn burn_from() -> Weight {229		(42_043_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}234235// For backwards compatibility and tests236impl WeightInfo for () {237	// Storage: Refungible TokensMinted (r:1 w:1)238	// Storage: Refungible AccountBalance (r:1 w:1)239	// Storage: Refungible Balance (r:0 w:1)240	// Storage: Refungible TotalSupply (r:0 w:1)241	// Storage: Refungible TokenData (r:0 w:1)242	// Storage: Refungible Owned (r:0 w:1)243	fn create_item() -> Weight {244		(21_255_000 as Weight)245			.saturating_add(RocksDbWeight::get().reads(2 as Weight))246			.saturating_add(RocksDbWeight::get().writes(6 as Weight))247	}248	// Storage: Refungible TokensMinted (r:1 w:1)249	// Storage: Refungible AccountBalance (r:1 w:1)250	// Storage: Refungible Balance (r:0 w:4)251	// Storage: Refungible TotalSupply (r:0 w:4)252	// Storage: Refungible TokenData (r:0 w:4)253	// Storage: Refungible Owned (r:0 w:4)254	fn create_multiple_items(b: u32, ) -> Weight {255		(18_052_000 as Weight)256			// Standard Error: 1_000257			.saturating_add((5_549_000 as Weight).saturating_mul(b as Weight))258			.saturating_add(RocksDbWeight::get().reads(2 as Weight))259			.saturating_add(RocksDbWeight::get().writes(2 as Weight))260			.saturating_add(RocksDbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))261	}262	// Storage: Refungible TokensMinted (r:1 w:1)263	// Storage: Refungible AccountBalance (r:4 w:4)264	// Storage: Refungible Balance (r:0 w:4)265	// Storage: Refungible TotalSupply (r:0 w:4)266	// Storage: Refungible TokenData (r:0 w:4)267	// Storage: Refungible Owned (r:0 w:4)268	fn create_multiple_items_ex_multiple_items(b: u32, ) -> Weight {269		(15_766_000 as Weight)270			// Standard Error: 2_000271			.saturating_add((8_187_000 as Weight).saturating_mul(b as Weight))272			.saturating_add(RocksDbWeight::get().reads(1 as Weight))273			.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))274			.saturating_add(RocksDbWeight::get().writes(1 as Weight))275			.saturating_add(RocksDbWeight::get().writes((5 as Weight).saturating_mul(b as Weight)))276	}277	// Storage: Refungible TokensMinted (r:1 w:1)278	// Storage: Refungible TotalSupply (r:0 w:1)279	// Storage: Refungible TokenData (r:0 w:1)280	// Storage: Refungible AccountBalance (r:4 w:4)281	// Storage: Refungible Balance (r:0 w:4)282	// Storage: Refungible Owned (r:0 w:4)283	fn create_multiple_items_ex_multiple_owners(b: u32, ) -> Weight {284		(5_675_000 as Weight)285			// Standard Error: 2_000286			.saturating_add((6_315_000 as Weight).saturating_mul(b as Weight))287			.saturating_add(RocksDbWeight::get().reads(1 as Weight))288			.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))289			.saturating_add(RocksDbWeight::get().writes(3 as Weight))290			.saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))291	}292	// Storage: Refungible TotalSupply (r:1 w:1)293	// Storage: Refungible Balance (r:1 w:1)294	// Storage: Refungible AccountBalance (r:1 w:1)295	// Storage: Refungible Owned (r:0 w:1)296	fn burn_item_partial() -> Weight {297		(23_518_000 as Weight)298			.saturating_add(RocksDbWeight::get().reads(3 as Weight))299			.saturating_add(RocksDbWeight::get().writes(4 as Weight))300	}301	// Storage: Refungible TotalSupply (r:1 w:1)302	// Storage: Refungible Balance (r:1 w:1)303	// Storage: Refungible AccountBalance (r:1 w:1)304	// Storage: Refungible TokensBurnt (r:1 w:1)305	// Storage: Refungible TokenData (r:0 w:1)306	// Storage: Refungible Owned (r:0 w:1)307	fn burn_item_fully() -> Weight {308		(32_489_000 as Weight)309			.saturating_add(RocksDbWeight::get().reads(4 as Weight))310			.saturating_add(RocksDbWeight::get().writes(6 as Weight))311	}312313	fn set_token_properties(_amount: u32) -> Weight {314		// Error315		0316	}317318	fn delete_token_properties(_amount: u32) -> Weight {319		// Error320		0321	}322323	fn set_property_permissions(_amount: u32) -> Weight {324		// Error325		0326	}327328	// Storage: Refungible Balance (r:2 w:2)329	fn transfer_normal() -> Weight {330		(19_766_000 as Weight)331			.saturating_add(RocksDbWeight::get().reads(2 as Weight))332			.saturating_add(RocksDbWeight::get().writes(2 as Weight))333	}334	// Storage: Refungible Balance (r:2 w:2)335	// Storage: Refungible AccountBalance (r:1 w:1)336	// Storage: Refungible Owned (r:0 w:1)337	fn transfer_creating() -> Weight {338		(23_360_000 as Weight)339			.saturating_add(RocksDbWeight::get().reads(3 as Weight))340			.saturating_add(RocksDbWeight::get().writes(4 as Weight))341	}342	// Storage: Refungible Balance (r:2 w:2)343	// Storage: Refungible AccountBalance (r:1 w:1)344	// Storage: Refungible Owned (r:0 w:1)345	fn transfer_removing() -> Weight {346		(25_344_000 as Weight)347			.saturating_add(RocksDbWeight::get().reads(3 as Weight))348			.saturating_add(RocksDbWeight::get().writes(4 as Weight))349	}350	// Storage: Refungible Balance (r:2 w:2)351	// Storage: Refungible AccountBalance (r:2 w:2)352	// Storage: Refungible Owned (r:0 w:2)353	fn transfer_creating_removing() -> Weight {354		(28_553_000 as Weight)355			.saturating_add(RocksDbWeight::get().reads(4 as Weight))356			.saturating_add(RocksDbWeight::get().writes(6 as Weight))357	}358	// Storage: Refungible Balance (r:1 w:0)359	// Storage: Refungible Allowance (r:0 w:1)360	fn approve() -> Weight {361		(15_356_000 as Weight)362			.saturating_add(RocksDbWeight::get().reads(1 as Weight))363			.saturating_add(RocksDbWeight::get().writes(1 as Weight))364	}365	// Storage: Refungible Allowance (r:1 w:1)366	// Storage: Refungible Balance (r:2 w:2)367	fn transfer_from_normal() -> Weight {368		(28_832_000 as Weight)369			.saturating_add(RocksDbWeight::get().reads(3 as Weight))370			.saturating_add(RocksDbWeight::get().writes(3 as Weight))371	}372	// Storage: Refungible Allowance (r:1 w:1)373	// Storage: Refungible Balance (r:2 w:2)374	// Storage: Refungible AccountBalance (r:1 w:1)375	// Storage: Refungible Owned (r:0 w:1)376	fn transfer_from_creating() -> Weight {377		(32_132_000 as Weight)378			.saturating_add(RocksDbWeight::get().reads(4 as Weight))379			.saturating_add(RocksDbWeight::get().writes(5 as Weight))380	}381	// Storage: Refungible Allowance (r:1 w:1)382	// Storage: Refungible Balance (r:2 w:2)383	// Storage: Refungible AccountBalance (r:1 w:1)384	// Storage: Refungible Owned (r:0 w:1)385	fn transfer_from_removing() -> Weight {386		(33_237_000 as Weight)387			.saturating_add(RocksDbWeight::get().reads(4 as Weight))388			.saturating_add(RocksDbWeight::get().writes(5 as Weight))389	}390	// Storage: Refungible Allowance (r:1 w:1)391	// Storage: Refungible Balance (r:2 w:2)392	// Storage: Refungible AccountBalance (r:2 w:2)393	// Storage: Refungible Owned (r:0 w:2)394	fn transfer_from_creating_removing() -> Weight {395		(36_399_000 as Weight)396			.saturating_add(RocksDbWeight::get().reads(5 as Weight))397			.saturating_add(RocksDbWeight::get().writes(7 as Weight))398	}399	// Storage: Refungible Allowance (r:1 w:1)400	// Storage: Refungible TotalSupply (r:1 w:1)401	// Storage: Refungible Balance (r:1 w:1)402	// Storage: Refungible AccountBalance (r:1 w:1)403	// Storage: Refungible TokensBurnt (r:1 w:1)404	// Storage: Refungible TokenData (r:0 w:1)405	// Storage: Refungible Owned (r:0 w:1)406	fn burn_from() -> Weight {407		(42_043_000 as Weight)408			.saturating_add(RocksDbWeight::get().reads(5 as Weight))409			.saturating_add(RocksDbWeight::get().writes(7 as Weight))410	}411}