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
before · pallets/nonfungible/src/weights.rs
1// Template adopted from https://github.com/paritytech/substrate/blob/master/.maintain/frame-weight-template.hbs23//! Autogenerated weights for pallet_nonfungible4//!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-nonfungible14// --wasm-execution15// compiled16// --extrinsic17// *18// --template19// .maintain/frame-weight-template.hbs20// --steps=5021// --repeat=2022// --output=./pallets/nonfungible/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_nonfungible.33pub trait WeightInfo {34	fn create_item() -> Weight;35	fn create_multiple_items(b: u32, ) -> Weight;36	fn burn_item() -> Weight;37	fn transfer() -> Weight;38	fn approve() -> Weight;39	fn transfer_from() -> Weight;40	fn set_variable_metadata(b: u32, ) -> Weight;41}4243/// Weights for pallet_nonfungible using the Substrate node and recommended hardware.44pub struct SubstrateWeight<T>(PhantomData<T>);45impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {46	// Storage: Nonfungible TokensMinted (r:1 w:1)47	// Storage: Nonfungible AccountBalance (r:1 w:1)48	// Storage: Nonfungible TokenData (r:0 w:1)49	// Storage: Nonfungible Owned (r:0 w:1)50	fn create_item() -> Weight {51		(16_902_000 as Weight)52			.saturating_add(T::DbWeight::get().reads(2 as Weight))53			.saturating_add(T::DbWeight::get().writes(4 as Weight))54	}55	// Storage: Nonfungible TokensMinted (r:1 w:1)56	// Storage: Nonfungible AccountBalance (r:1 w:1)57	// Storage: Nonfungible TokenData (r:0 w:4)58	// Storage: Nonfungible Owned (r:0 w:4)59	fn create_multiple_items(b: u32, ) -> Weight {60		(15_860_000 as Weight)61			// Standard Error: 5_00062			.saturating_add((3_916_000 as Weight).saturating_mul(b as Weight))63			.saturating_add(T::DbWeight::get().reads(2 as Weight))64			.saturating_add(T::DbWeight::get().writes(2 as Weight))65			.saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(b as Weight)))66	}67	// Storage: Nonfungible TokenData (r:1 w:1)68	// Storage: Nonfungible TokensBurnt (r:1 w:1)69	// Storage: Nonfungible Allowance (r:1 w:0)70	// Storage: Nonfungible Owned (r:0 w:1)71	fn burn_item() -> Weight {72		(17_966_000 as Weight)73			.saturating_add(T::DbWeight::get().reads(3 as Weight))74			.saturating_add(T::DbWeight::get().writes(3 as Weight))75	}76	// Storage: Nonfungible TokenData (r:1 w:1)77	// Storage: Nonfungible AccountBalance (r:2 w:2)78	// Storage: Nonfungible Allowance (r:1 w:0)79	// Storage: Nonfungible Owned (r:0 w:2)80	fn transfer() -> Weight {81		(23_886_000 as Weight)82			.saturating_add(T::DbWeight::get().reads(4 as Weight))83			.saturating_add(T::DbWeight::get().writes(5 as Weight))84	}85	// Storage: Nonfungible TokenData (r:1 w:0)86	// Storage: Nonfungible Allowance (r:1 w:1)87	fn approve() -> Weight {88		(14_697_000 as Weight)89			.saturating_add(T::DbWeight::get().reads(2 as Weight))90			.saturating_add(T::DbWeight::get().writes(1 as Weight))91	}92	// Storage: Nonfungible Allowance (r:1 w:1)93	// Storage: Nonfungible TokenData (r:1 w:1)94	// Storage: Nonfungible AccountBalance (r:2 w:2)95	// Storage: Nonfungible Owned (r:0 w:2)96	fn transfer_from() -> Weight {97		(28_001_000 as Weight)98			.saturating_add(T::DbWeight::get().reads(4 as Weight))99			.saturating_add(T::DbWeight::get().writes(6 as Weight))100	}101	// Storage: Nonfungible Allowance (r:1 w:1)102	// Storage: Nonfungible TokenData (r:1 w:1)103	// Storage: Nonfungible TokensBurnt (r:1 w:1)104	// Storage: Nonfungible Owned (r:0 w:1)105	fn burn_from() -> Weight {106		(53_429_000 as Weight)107			.saturating_add(T::DbWeight::get().reads(3 as Weight))108			.saturating_add(T::DbWeight::get().writes(4 as Weight))109	}110	// Storage: Nonfungible TokenData (r:1 w:1)111	fn set_variable_metadata(_b: u32, ) -> Weight {112		(6_380_000 as Weight)113			.saturating_add(T::DbWeight::get().reads(1 as Weight))114			.saturating_add(T::DbWeight::get().writes(1 as Weight))115	}116}117118// For backwards compatibility and tests119impl WeightInfo for () {120	// Storage: Nonfungible TokensMinted (r:1 w:1)121	// Storage: Nonfungible AccountBalance (r:1 w:1)122	// Storage: Nonfungible TokenData (r:0 w:1)123	// Storage: Nonfungible Owned (r:0 w:1)124	fn create_item() -> Weight {125		(16_902_000 as Weight)126			.saturating_add(RocksDbWeight::get().reads(2 as Weight))127			.saturating_add(RocksDbWeight::get().writes(4 as Weight))128	}129	// Storage: Nonfungible TokensMinted (r:1 w:1)130	// Storage: Nonfungible AccountBalance (r:1 w:1)131	// Storage: Nonfungible TokenData (r:0 w:4)132	// Storage: Nonfungible Owned (r:0 w:4)133	fn create_multiple_items(b: u32, ) -> Weight {134		(15_860_000 as Weight)135			// Standard Error: 5_000136			.saturating_add((3_916_000 as Weight).saturating_mul(b as Weight))137			.saturating_add(RocksDbWeight::get().reads(2 as Weight))138			.saturating_add(RocksDbWeight::get().writes(2 as Weight))139			.saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(b as Weight)))140	}141	// Storage: Nonfungible TokenData (r:1 w:1)142	// Storage: Nonfungible TokensBurnt (r:1 w:1)143	// Storage: Nonfungible Allowance (r:1 w:0)144	// Storage: Nonfungible Owned (r:0 w:1)145	fn burn_item() -> Weight {146		(17_966_000 as Weight)147			.saturating_add(RocksDbWeight::get().reads(3 as Weight))148			.saturating_add(RocksDbWeight::get().writes(3 as Weight))149	}150	// Storage: Nonfungible TokenData (r:1 w:1)151	// Storage: Nonfungible AccountBalance (r:2 w:2)152	// Storage: Nonfungible Allowance (r:1 w:0)153	// Storage: Nonfungible Owned (r:0 w:2)154	fn transfer() -> Weight {155		(23_886_000 as Weight)156			.saturating_add(RocksDbWeight::get().reads(4 as Weight))157			.saturating_add(RocksDbWeight::get().writes(5 as Weight))158	}159	// Storage: Nonfungible TokenData (r:1 w:0)160	// Storage: Nonfungible Allowance (r:1 w:1)161	fn approve() -> Weight {162		(14_697_000 as Weight)163			.saturating_add(RocksDbWeight::get().reads(2 as Weight))164			.saturating_add(RocksDbWeight::get().writes(1 as Weight))165	}166	// Storage: Nonfungible Allowance (r:1 w:1)167	// Storage: Nonfungible TokenData (r:1 w:1)168	// Storage: Nonfungible AccountBalance (r:2 w:2)169	// Storage: Nonfungible Owned (r:0 w:2)170	fn transfer_from() -> Weight {171		(28_001_000 as Weight)172			.saturating_add(RocksDbWeight::get().reads(4 as Weight))173			.saturating_add(RocksDbWeight::get().writes(6 as Weight))174	}175	// Storage: Nonfungible Allowance (r:1 w:1)176	// Storage: Nonfungible TokenData (r:1 w:1)177	// Storage: Nonfungible TokensBurnt (r:1 w:1)178	// Storage: Nonfungible Owned (r:0 w:1)179	fn burn_from() -> Weight {180		(53_429_000 as Weight)181			.saturating_add(RocksDbWeight::get().reads(3 as Weight))182			.saturating_add(RocksDbWeight::get().writes(4 as Weight))183	}184	// Storage: Nonfungible TokenData (r:1 w:1)185	fn set_variable_metadata(_b: u32, ) -> Weight {186		(6_380_000 as Weight)187			.saturating_add(RocksDbWeight::get().reads(1 as Weight))188			.saturating_add(RocksDbWeight::get().writes(1 as Weight))189	}190}
modifiedpallets/refungible/src/weights.rsdiffbeforeafterboth
--- a/pallets/refungible/src/weights.rs
+++ b/pallets/refungible/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_partial() -> Weight;
 	fn burn_item_fully() -> Weight;
 	fn transfer_normal() -> Weight;