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

difftreelog

fix pallets Weights traits definition

Igor Kozyrev2021-11-09parent: #a6dbd3f.patch.diff
in: master

3 files changed

modifiedpallets/fungible/src/weights.rsdiffbeforeafterboth
--- a/pallets/fungible/src/weights.rs
+++ b/pallets/fungible/src/weights.rs
@@ -32,6 +32,7 @@
 /// Weight functions needed for pallet_fungible.
 pub trait WeightInfo {
 	fn create_item() -> Weight;
+	fn burn_from() -> Weight;
 	fn burn_item() -> Weight;
 	fn transfer() -> Weight;
 	fn approve() -> Weight;
modifiedpallets/nonfungible/src/weights.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/weights.rs
+++ b/pallets/nonfungible/src/weights.rs
@@ -33,6 +33,7 @@
 pub trait WeightInfo {
 	fn create_item() -> Weight;
 	fn create_multiple_items(b: u32, ) -> Weight;
+	fn burn_from() -> Weight;
 	fn burn_item() -> Weight;
 	fn transfer() -> Weight;
 	fn approve() -> Weight;
modifiedpallets/refungible/src/weights.rsdiffbeforeafterboth
after · pallets/refungible/src/weights.rs
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: 2021-10-21, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`7//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 12889// Executed Command:10// target/release/nft11// benchmark12// --pallet13// pallet-refungible14// --wasm-execution15// compiled16// --extrinsic17// *18// --template19// .maintain/frame-weight-template.hbs20// --steps=5021// --repeat=2022// --output=./pallets/refungible/src/weights.rs232425#![cfg_attr(rustfmt, rustfmt_skip)]26#![allow(unused_parens)]27#![allow(unused_imports)]2829use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};30use sp_std::marker::PhantomData;3132/// Weight functions needed for pallet_refungible.33pub trait WeightInfo {34	fn create_item() -> Weight;35	fn create_multiple_items(b: u32, ) -> Weight;36	fn burn_from() -> Weight;37	fn burn_item_partial() -> Weight;38	fn burn_item_fully() -> Weight;39	fn transfer_normal() -> Weight;40	fn transfer_creating() -> Weight;41	fn transfer_removing() -> Weight;42	fn transfer_creating_removing() -> Weight;43	fn approve() -> Weight;44	fn transfer_from_normal() -> Weight;45	fn transfer_from_creating() -> Weight;46	fn transfer_from_removing() -> Weight;47	fn transfer_from_creating_removing() -> Weight;48	fn set_variable_metadata(b: u32, ) -> Weight;49}5051/// Weights for pallet_refungible using the Substrate node and recommended hardware.52pub struct SubstrateWeight<T>(PhantomData<T>);53impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {54	// Storage: Refungible TokensMinted (r:1 w:1)55	// Storage: Refungible AccountBalance (r:1 w:1)56	// Storage: Refungible Balance (r:0 w:1)57	// Storage: Refungible TotalSupply (r:0 w:1)58	// Storage: Refungible TokenData (r:0 w:1)59	// Storage: Refungible Owned (r:0 w:1)60	fn create_item() -> Weight {61		(18_681_000 as Weight)62			.saturating_add(T::DbWeight::get().reads(2 as Weight))63			.saturating_add(T::DbWeight::get().writes(6 as Weight))64	}65	// Storage: Refungible TokensMinted (r:1 w:1)66	// Storage: Refungible AccountBalance (r:1 w:1)67	// Storage: Refungible Balance (r:0 w:4)68	// Storage: Refungible TotalSupply (r:0 w:4)69	// Storage: Refungible TokenData (r:0 w:4)70	// Storage: Refungible Owned (r:0 w:4)71	fn create_multiple_items(b: u32, ) -> Weight {72		(13_869_000 as Weight)73			// Standard Error: 28_00074			.saturating_add((5_611_000 as Weight).saturating_mul(b as Weight))75			.saturating_add(T::DbWeight::get().reads(2 as Weight))76			.saturating_add(T::DbWeight::get().writes(2 as Weight))77			.saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))78	}79	// Storage: Refungible TotalSupply (r:1 w:1)80	// Storage: Refungible Balance (r:1 w:1)81	// Storage: Refungible AccountBalance (r:1 w:1)82	// Storage: Refungible Owned (r:0 w:1)83	fn burn_item_partial() -> Weight {84		(21_591_000 as Weight)85			.saturating_add(T::DbWeight::get().reads(3 as Weight))86			.saturating_add(T::DbWeight::get().writes(4 as Weight))87	}88	// Storage: Refungible TotalSupply (r:1 w:1)89	// Storage: Refungible Balance (r:1 w:1)90	// Storage: Refungible AccountBalance (r:1 w:1)91	// Storage: Refungible TokensBurnt (r:1 w:1)92	// Storage: Refungible TokenData (r:0 w:1)93	// Storage: Refungible Owned (r:0 w:1)94	fn burn_item_fully() -> Weight {95		(29_257_000 as Weight)96			.saturating_add(T::DbWeight::get().reads(4 as Weight))97			.saturating_add(T::DbWeight::get().writes(6 as Weight))98	}99	// Storage: Refungible Balance (r:2 w:2)100	fn transfer_normal() -> Weight {101		(17_733_000 as Weight)102			.saturating_add(T::DbWeight::get().reads(2 as Weight))103			.saturating_add(T::DbWeight::get().writes(2 as Weight))104	}105	// Storage: Refungible Balance (r:2 w:2)106	// Storage: Refungible AccountBalance (r:1 w:1)107	// Storage: Refungible Owned (r:0 w:1)108	fn transfer_creating() -> Weight {109		(20_943_000 as Weight)110			.saturating_add(T::DbWeight::get().reads(3 as Weight))111			.saturating_add(T::DbWeight::get().writes(4 as Weight))112	}113	// Storage: Refungible Balance (r:2 w:2)114	// Storage: Refungible AccountBalance (r:1 w:1)115	// Storage: Refungible Owned (r:0 w:1)116	fn transfer_removing() -> Weight {117		(22_406_000 as Weight)118			.saturating_add(T::DbWeight::get().reads(3 as Weight))119			.saturating_add(T::DbWeight::get().writes(4 as Weight))120	}121	// Storage: Refungible Balance (r:2 w:2)122	// Storage: Refungible AccountBalance (r:2 w:2)123	// Storage: Refungible Owned (r:0 w:2)124	fn transfer_creating_removing() -> Weight {125		(24_762_000 as Weight)126			.saturating_add(T::DbWeight::get().reads(4 as Weight))127			.saturating_add(T::DbWeight::get().writes(6 as Weight))128	}129	// Storage: Refungible Balance (r:1 w:0)130	// Storage: Refungible Allowance (r:0 w:1)131	fn approve() -> Weight {132		(14_109_000 as Weight)133			.saturating_add(T::DbWeight::get().reads(1 as Weight))134			.saturating_add(T::DbWeight::get().writes(1 as Weight))135	}136	// Storage: Refungible Allowance (r:1 w:1)137	// Storage: Refungible Balance (r:2 w:2)138	fn transfer_from_normal() -> Weight {139		(25_348_000 as Weight)140			.saturating_add(T::DbWeight::get().reads(3 as Weight))141			.saturating_add(T::DbWeight::get().writes(3 as Weight))142	}143	// Storage: Refungible Allowance (r:1 w:1)144	// Storage: Refungible Balance (r:2 w:2)145	// Storage: Refungible AccountBalance (r:1 w:1)146	// Storage: Refungible Owned (r:0 w:1)147	fn transfer_from_creating() -> Weight {148		(28_647_000 as Weight)149			.saturating_add(T::DbWeight::get().reads(4 as Weight))150			.saturating_add(T::DbWeight::get().writes(5 as Weight))151	}152	// Storage: Refungible Allowance (r:1 w:1)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_from_removing() -> Weight {157		(30_472_000 as Weight)158			.saturating_add(T::DbWeight::get().reads(4 as Weight))159			.saturating_add(T::DbWeight::get().writes(5 as Weight))160	}161	// Storage: Refungible Allowance (r:1 w:1)162	// Storage: Refungible Balance (r:2 w:2)163	// Storage: Refungible AccountBalance (r:2 w:2)164	// Storage: Refungible Owned (r:0 w:2)165	fn transfer_from_creating_removing() -> Weight {166		(32_362_000 as Weight)167			.saturating_add(T::DbWeight::get().reads(5 as Weight))168			.saturating_add(T::DbWeight::get().writes(7 as Weight))169	}170	// Storage: Refungible Allowance (r:1 w:1)171	// Storage: Refungible TotalSupply (r:1 w:1)172	// Storage: Refungible Balance (r:1 w:1)173	// Storage: Refungible AccountBalance (r:1 w:1)174	// Storage: Refungible TokensBurnt (r:1 w:1)175	// Storage: Refungible TokenData (r:0 w:1)176	// Storage: Refungible Owned (r:0 w:1)177	fn burn_from() -> Weight {178		(60_903_000 as Weight)179			.saturating_add(T::DbWeight::get().reads(5 as Weight))180			.saturating_add(T::DbWeight::get().writes(7 as Weight))181	}182	// Storage: Refungible TokenData (r:1 w:1)183	fn set_variable_metadata(_b: u32, ) -> Weight {184		(6_801_000 as Weight)185			.saturating_add(T::DbWeight::get().reads(1 as Weight))186			.saturating_add(T::DbWeight::get().writes(1 as Weight))187	}188}189190// For backwards compatibility and tests191impl WeightInfo for () {192	// Storage: Refungible TokensMinted (r:1 w:1)193	// Storage: Refungible AccountBalance (r:1 w:1)194	// Storage: Refungible Balance (r:0 w:1)195	// Storage: Refungible TotalSupply (r:0 w:1)196	// Storage: Refungible TokenData (r:0 w:1)197	// Storage: Refungible Owned (r:0 w:1)198	fn create_item() -> Weight {199		(18_681_000 as Weight)200			.saturating_add(RocksDbWeight::get().reads(2 as Weight))201			.saturating_add(RocksDbWeight::get().writes(6 as Weight))202	}203	// Storage: Refungible TokensMinted (r:1 w:1)204	// Storage: Refungible AccountBalance (r:1 w:1)205	// Storage: Refungible Balance (r:0 w:4)206	// Storage: Refungible TotalSupply (r:0 w:4)207	// Storage: Refungible TokenData (r:0 w:4)208	// Storage: Refungible Owned (r:0 w:4)209	fn create_multiple_items(b: u32, ) -> Weight {210		(13_869_000 as Weight)211			// Standard Error: 28_000212			.saturating_add((5_611_000 as Weight).saturating_mul(b as Weight))213			.saturating_add(RocksDbWeight::get().reads(2 as Weight))214			.saturating_add(RocksDbWeight::get().writes(2 as Weight))215			.saturating_add(RocksDbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))216	}217	// Storage: Refungible TotalSupply (r:1 w:1)218	// Storage: Refungible Balance (r:1 w:1)219	// Storage: Refungible AccountBalance (r:1 w:1)220	// Storage: Refungible Owned (r:0 w:1)221	fn burn_item_partial() -> Weight {222		(21_591_000 as Weight)223			.saturating_add(RocksDbWeight::get().reads(3 as Weight))224			.saturating_add(RocksDbWeight::get().writes(4 as Weight))225	}226	// Storage: Refungible TotalSupply (r:1 w:1)227	// Storage: Refungible Balance (r:1 w:1)228	// Storage: Refungible AccountBalance (r:1 w:1)229	// Storage: Refungible TokensBurnt (r:1 w:1)230	// Storage: Refungible TokenData (r:0 w:1)231	// Storage: Refungible Owned (r:0 w:1)232	fn burn_item_fully() -> Weight {233		(29_257_000 as Weight)234			.saturating_add(RocksDbWeight::get().reads(4 as Weight))235			.saturating_add(RocksDbWeight::get().writes(6 as Weight))236	}237	// Storage: Refungible Balance (r:2 w:2)238	fn transfer_normal() -> Weight {239		(17_733_000 as Weight)240			.saturating_add(RocksDbWeight::get().reads(2 as Weight))241			.saturating_add(RocksDbWeight::get().writes(2 as Weight))242	}243	// Storage: Refungible Balance (r:2 w:2)244	// Storage: Refungible AccountBalance (r:1 w:1)245	// Storage: Refungible Owned (r:0 w:1)246	fn transfer_creating() -> Weight {247		(20_943_000 as Weight)248			.saturating_add(RocksDbWeight::get().reads(3 as Weight))249			.saturating_add(RocksDbWeight::get().writes(4 as Weight))250	}251	// Storage: Refungible Balance (r:2 w:2)252	// Storage: Refungible AccountBalance (r:1 w:1)253	// Storage: Refungible Owned (r:0 w:1)254	fn transfer_removing() -> Weight {255		(22_406_000 as Weight)256			.saturating_add(RocksDbWeight::get().reads(3 as Weight))257			.saturating_add(RocksDbWeight::get().writes(4 as Weight))258	}259	// Storage: Refungible Balance (r:2 w:2)260	// Storage: Refungible AccountBalance (r:2 w:2)261	// Storage: Refungible Owned (r:0 w:2)262	fn transfer_creating_removing() -> Weight {263		(24_762_000 as Weight)264			.saturating_add(RocksDbWeight::get().reads(4 as Weight))265			.saturating_add(RocksDbWeight::get().writes(6 as Weight))266	}267	// Storage: Refungible Balance (r:1 w:0)268	// Storage: Refungible Allowance (r:0 w:1)269	fn approve() -> Weight {270		(14_109_000 as Weight)271			.saturating_add(RocksDbWeight::get().reads(1 as Weight))272			.saturating_add(RocksDbWeight::get().writes(1 as Weight))273	}274	// Storage: Refungible Allowance (r:1 w:1)275	// Storage: Refungible Balance (r:2 w:2)276	fn transfer_from_normal() -> Weight {277		(25_348_000 as Weight)278			.saturating_add(RocksDbWeight::get().reads(3 as Weight))279			.saturating_add(RocksDbWeight::get().writes(3 as Weight))280	}281	// Storage: Refungible Allowance (r:1 w:1)282	// Storage: Refungible Balance (r:2 w:2)283	// Storage: Refungible AccountBalance (r:1 w:1)284	// Storage: Refungible Owned (r:0 w:1)285	fn transfer_from_creating() -> Weight {286		(28_647_000 as Weight)287			.saturating_add(RocksDbWeight::get().reads(4 as Weight))288			.saturating_add(RocksDbWeight::get().writes(5 as Weight))289	}290	// Storage: Refungible Allowance (r:1 w:1)291	// Storage: Refungible Balance (r:2 w:2)292	// Storage: Refungible AccountBalance (r:1 w:1)293	// Storage: Refungible Owned (r:0 w:1)294	fn transfer_from_removing() -> Weight {295		(30_472_000 as Weight)296			.saturating_add(RocksDbWeight::get().reads(4 as Weight))297			.saturating_add(RocksDbWeight::get().writes(5 as Weight))298	}299	// Storage: Refungible Allowance (r:1 w:1)300	// Storage: Refungible Balance (r:2 w:2)301	// Storage: Refungible AccountBalance (r:2 w:2)302	// Storage: Refungible Owned (r:0 w:2)303	fn transfer_from_creating_removing() -> Weight {304		(32_362_000 as Weight)305			.saturating_add(RocksDbWeight::get().reads(5 as Weight))306			.saturating_add(RocksDbWeight::get().writes(7 as Weight))307	}308	// Storage: Refungible Allowance (r:1 w:1)309	// Storage: Refungible TotalSupply (r:1 w:1)310	// Storage: Refungible Balance (r:1 w:1)311	// Storage: Refungible AccountBalance (r:1 w:1)312	// Storage: Refungible TokensBurnt (r:1 w:1)313	// Storage: Refungible TokenData (r:0 w:1)314	// Storage: Refungible Owned (r:0 w:1)315	fn burn_from() -> Weight {316		(60_903_000 as Weight)317			.saturating_add(RocksDbWeight::get().reads(5 as Weight))318			.saturating_add(RocksDbWeight::get().writes(7 as Weight))319	}320	// Storage: Refungible TokenData (r:1 w:1)321	fn set_variable_metadata(_b: u32, ) -> Weight {322		(6_801_000 as Weight)323			.saturating_add(RocksDbWeight::get().reads(1 as Weight))324			.saturating_add(RocksDbWeight::get().writes(1 as Weight))325	}326}