difftreelog
fix pallets Weights traits definition
in: master
3 files changed
pallets/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;
pallets/nonfungible/src/weights.rsdiffbeforeafterboth1// 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_from() -> Weight;37 fn burn_item() -> Weight;38 fn transfer() -> Weight;39 fn approve() -> Weight;40 fn transfer_from() -> Weight;41 fn set_variable_metadata(b: u32, ) -> Weight;42}4344/// Weights for pallet_nonfungible using the Substrate node and recommended hardware.45pub struct SubstrateWeight<T>(PhantomData<T>);46impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {47 // Storage: Nonfungible TokensMinted (r:1 w:1)48 // Storage: Nonfungible AccountBalance (r:1 w:1)49 // Storage: Nonfungible TokenData (r:0 w:1)50 // Storage: Nonfungible Owned (r:0 w:1)51 fn create_item() -> Weight {52 (16_902_000 as Weight)53 .saturating_add(T::DbWeight::get().reads(2 as Weight))54 .saturating_add(T::DbWeight::get().writes(4 as Weight))55 }56 // Storage: Nonfungible TokensMinted (r:1 w:1)57 // Storage: Nonfungible AccountBalance (r:1 w:1)58 // Storage: Nonfungible TokenData (r:0 w:4)59 // Storage: Nonfungible Owned (r:0 w:4)60 fn create_multiple_items(b: u32, ) -> Weight {61 (15_860_000 as Weight)62 // Standard Error: 5_00063 .saturating_add((3_916_000 as Weight).saturating_mul(b as Weight))64 .saturating_add(T::DbWeight::get().reads(2 as Weight))65 .saturating_add(T::DbWeight::get().writes(2 as Weight))66 .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(b as Weight)))67 }68 // Storage: Nonfungible TokenData (r:1 w:1)69 // Storage: Nonfungible TokensBurnt (r:1 w:1)70 // Storage: Nonfungible Allowance (r:1 w:0)71 // Storage: Nonfungible Owned (r:0 w:1)72 fn burn_item() -> Weight {73 (17_966_000 as Weight)74 .saturating_add(T::DbWeight::get().reads(3 as Weight))75 .saturating_add(T::DbWeight::get().writes(3 as Weight))76 }77 // Storage: Nonfungible TokenData (r:1 w:1)78 // Storage: Nonfungible AccountBalance (r:2 w:2)79 // Storage: Nonfungible Allowance (r:1 w:0)80 // Storage: Nonfungible Owned (r:0 w:2)81 fn transfer() -> Weight {82 (23_886_000 as Weight)83 .saturating_add(T::DbWeight::get().reads(4 as Weight))84 .saturating_add(T::DbWeight::get().writes(5 as Weight))85 }86 // Storage: Nonfungible TokenData (r:1 w:0)87 // Storage: Nonfungible Allowance (r:1 w:1)88 fn approve() -> Weight {89 (14_697_000 as Weight)90 .saturating_add(T::DbWeight::get().reads(2 as Weight))91 .saturating_add(T::DbWeight::get().writes(1 as Weight))92 }93 // Storage: Nonfungible Allowance (r:1 w:1)94 // Storage: Nonfungible TokenData (r:1 w:1)95 // Storage: Nonfungible AccountBalance (r:2 w:2)96 // Storage: Nonfungible Owned (r:0 w:2)97 fn transfer_from() -> Weight {98 (28_001_000 as Weight)99 .saturating_add(T::DbWeight::get().reads(4 as Weight))100 .saturating_add(T::DbWeight::get().writes(6 as Weight))101 }102 // Storage: Nonfungible Allowance (r:1 w:1)103 // Storage: Nonfungible TokenData (r:1 w:1)104 // Storage: Nonfungible TokensBurnt (r:1 w:1)105 // Storage: Nonfungible Owned (r:0 w:1)106 fn burn_from() -> Weight {107 (53_429_000 as Weight)108 .saturating_add(T::DbWeight::get().reads(3 as Weight))109 .saturating_add(T::DbWeight::get().writes(4 as Weight))110 }111 // Storage: Nonfungible TokenData (r:1 w:1)112 fn set_variable_metadata(_b: u32, ) -> Weight {113 (6_380_000 as Weight)114 .saturating_add(T::DbWeight::get().reads(1 as Weight))115 .saturating_add(T::DbWeight::get().writes(1 as Weight))116 }117}118119// For backwards compatibility and tests120impl WeightInfo for () {121 // Storage: Nonfungible TokensMinted (r:1 w:1)122 // Storage: Nonfungible AccountBalance (r:1 w:1)123 // Storage: Nonfungible TokenData (r:0 w:1)124 // Storage: Nonfungible Owned (r:0 w:1)125 fn create_item() -> Weight {126 (16_902_000 as Weight)127 .saturating_add(RocksDbWeight::get().reads(2 as Weight))128 .saturating_add(RocksDbWeight::get().writes(4 as Weight))129 }130 // Storage: Nonfungible TokensMinted (r:1 w:1)131 // Storage: Nonfungible AccountBalance (r:1 w:1)132 // Storage: Nonfungible TokenData (r:0 w:4)133 // Storage: Nonfungible Owned (r:0 w:4)134 fn create_multiple_items(b: u32, ) -> Weight {135 (15_860_000 as Weight)136 // Standard Error: 5_000137 .saturating_add((3_916_000 as Weight).saturating_mul(b as Weight))138 .saturating_add(RocksDbWeight::get().reads(2 as Weight))139 .saturating_add(RocksDbWeight::get().writes(2 as Weight))140 .saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(b as Weight)))141 }142 // Storage: Nonfungible TokenData (r:1 w:1)143 // Storage: Nonfungible TokensBurnt (r:1 w:1)144 // Storage: Nonfungible Allowance (r:1 w:0)145 // Storage: Nonfungible Owned (r:0 w:1)146 fn burn_item() -> Weight {147 (17_966_000 as Weight)148 .saturating_add(RocksDbWeight::get().reads(3 as Weight))149 .saturating_add(RocksDbWeight::get().writes(3 as Weight))150 }151 // Storage: Nonfungible TokenData (r:1 w:1)152 // Storage: Nonfungible AccountBalance (r:2 w:2)153 // Storage: Nonfungible Allowance (r:1 w:0)154 // Storage: Nonfungible Owned (r:0 w:2)155 fn transfer() -> Weight {156 (23_886_000 as Weight)157 .saturating_add(RocksDbWeight::get().reads(4 as Weight))158 .saturating_add(RocksDbWeight::get().writes(5 as Weight))159 }160 // Storage: Nonfungible TokenData (r:1 w:0)161 // Storage: Nonfungible Allowance (r:1 w:1)162 fn approve() -> Weight {163 (14_697_000 as Weight)164 .saturating_add(RocksDbWeight::get().reads(2 as Weight))165 .saturating_add(RocksDbWeight::get().writes(1 as Weight))166 }167 // Storage: Nonfungible Allowance (r:1 w:1)168 // Storage: Nonfungible TokenData (r:1 w:1)169 // Storage: Nonfungible AccountBalance (r:2 w:2)170 // Storage: Nonfungible Owned (r:0 w:2)171 fn transfer_from() -> Weight {172 (28_001_000 as Weight)173 .saturating_add(RocksDbWeight::get().reads(4 as Weight))174 .saturating_add(RocksDbWeight::get().writes(6 as Weight))175 }176 // Storage: Nonfungible Allowance (r:1 w:1)177 // Storage: Nonfungible TokenData (r:1 w:1)178 // Storage: Nonfungible TokensBurnt (r:1 w:1)179 // Storage: Nonfungible Owned (r:0 w:1)180 fn burn_from() -> Weight {181 (53_429_000 as Weight)182 .saturating_add(RocksDbWeight::get().reads(3 as Weight))183 .saturating_add(RocksDbWeight::get().writes(4 as Weight))184 }185 // Storage: Nonfungible TokenData (r:1 w:1)186 fn set_variable_metadata(_b: u32, ) -> Weight {187 (6_380_000 as Weight)188 .saturating_add(RocksDbWeight::get().reads(1 as Weight))189 .saturating_add(RocksDbWeight::get().writes(1 as Weight))190 }191}pallets/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;