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.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;
pallets/refungible/src/weights.rsdiffbeforeafterboth1// 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_item_partial() -> Weight;37 fn burn_item_fully() -> Weight;38 fn transfer_normal() -> Weight;39 fn transfer_creating() -> Weight;40 fn transfer_removing() -> Weight;41 fn transfer_creating_removing() -> Weight;42 fn approve() -> Weight;43 fn transfer_from_normal() -> Weight;44 fn transfer_from_creating() -> Weight;45 fn transfer_from_removing() -> Weight;46 fn transfer_from_creating_removing() -> Weight;47 fn set_variable_metadata(b: u32, ) -> Weight;48}4950/// Weights for pallet_refungible using the Substrate node and recommended hardware.51pub struct SubstrateWeight<T>(PhantomData<T>);52impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {53 // Storage: Refungible TokensMinted (r:1 w:1)54 // Storage: Refungible AccountBalance (r:1 w:1)55 // Storage: Refungible Balance (r:0 w:1)56 // Storage: Refungible TotalSupply (r:0 w:1)57 // Storage: Refungible TokenData (r:0 w:1)58 // Storage: Refungible Owned (r:0 w:1)59 fn create_item() -> Weight {60 (18_681_000 as Weight)61 .saturating_add(T::DbWeight::get().reads(2 as Weight))62 .saturating_add(T::DbWeight::get().writes(6 as Weight))63 }64 // Storage: Refungible TokensMinted (r:1 w:1)65 // Storage: Refungible AccountBalance (r:1 w:1)66 // Storage: Refungible Balance (r:0 w:4)67 // Storage: Refungible TotalSupply (r:0 w:4)68 // Storage: Refungible TokenData (r:0 w:4)69 // Storage: Refungible Owned (r:0 w:4)70 fn create_multiple_items(b: u32, ) -> Weight {71 (13_869_000 as Weight)72 // Standard Error: 28_00073 .saturating_add((5_611_000 as Weight).saturating_mul(b as Weight))74 .saturating_add(T::DbWeight::get().reads(2 as Weight))75 .saturating_add(T::DbWeight::get().writes(2 as Weight))76 .saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))77 }78 // Storage: Refungible TotalSupply (r:1 w:1)79 // Storage: Refungible Balance (r:1 w:1)80 // Storage: Refungible AccountBalance (r:1 w:1)81 // Storage: Refungible Owned (r:0 w:1)82 fn burn_item_partial() -> Weight {83 (21_591_000 as Weight)84 .saturating_add(T::DbWeight::get().reads(3 as Weight))85 .saturating_add(T::DbWeight::get().writes(4 as Weight))86 }87 // Storage: Refungible TotalSupply (r:1 w:1)88 // Storage: Refungible Balance (r:1 w:1)89 // Storage: Refungible AccountBalance (r:1 w:1)90 // Storage: Refungible TokensBurnt (r:1 w:1)91 // Storage: Refungible TokenData (r:0 w:1)92 // Storage: Refungible Owned (r:0 w:1)93 fn burn_item_fully() -> Weight {94 (29_257_000 as Weight)95 .saturating_add(T::DbWeight::get().reads(4 as Weight))96 .saturating_add(T::DbWeight::get().writes(6 as Weight))97 }98 // Storage: Refungible Balance (r:2 w:2)99 fn transfer_normal() -> Weight {100 (17_733_000 as Weight)101 .saturating_add(T::DbWeight::get().reads(2 as Weight))102 .saturating_add(T::DbWeight::get().writes(2 as Weight))103 }104 // Storage: Refungible Balance (r:2 w:2)105 // Storage: Refungible AccountBalance (r:1 w:1)106 // Storage: Refungible Owned (r:0 w:1)107 fn transfer_creating() -> Weight {108 (20_943_000 as Weight)109 .saturating_add(T::DbWeight::get().reads(3 as Weight))110 .saturating_add(T::DbWeight::get().writes(4 as Weight))111 }112 // Storage: Refungible Balance (r:2 w:2)113 // Storage: Refungible AccountBalance (r:1 w:1)114 // Storage: Refungible Owned (r:0 w:1)115 fn transfer_removing() -> Weight {116 (22_406_000 as Weight)117 .saturating_add(T::DbWeight::get().reads(3 as Weight))118 .saturating_add(T::DbWeight::get().writes(4 as Weight))119 }120 // Storage: Refungible Balance (r:2 w:2)121 // Storage: Refungible AccountBalance (r:2 w:2)122 // Storage: Refungible Owned (r:0 w:2)123 fn transfer_creating_removing() -> Weight {124 (24_762_000 as Weight)125 .saturating_add(T::DbWeight::get().reads(4 as Weight))126 .saturating_add(T::DbWeight::get().writes(6 as Weight))127 }128 // Storage: Refungible Balance (r:1 w:0)129 // Storage: Refungible Allowance (r:0 w:1)130 fn approve() -> Weight {131 (14_109_000 as Weight)132 .saturating_add(T::DbWeight::get().reads(1 as Weight))133 .saturating_add(T::DbWeight::get().writes(1 as Weight))134 }135 // Storage: Refungible Allowance (r:1 w:1)136 // Storage: Refungible Balance (r:2 w:2)137 fn transfer_from_normal() -> Weight {138 (25_348_000 as Weight)139 .saturating_add(T::DbWeight::get().reads(3 as Weight))140 .saturating_add(T::DbWeight::get().writes(3 as Weight))141 }142 // Storage: Refungible Allowance (r:1 w:1)143 // Storage: Refungible Balance (r:2 w:2)144 // Storage: Refungible AccountBalance (r:1 w:1)145 // Storage: Refungible Owned (r:0 w:1)146 fn transfer_from_creating() -> Weight {147 (28_647_000 as Weight)148 .saturating_add(T::DbWeight::get().reads(4 as Weight))149 .saturating_add(T::DbWeight::get().writes(5 as Weight))150 }151 // Storage: Refungible Allowance (r:1 w:1)152 // Storage: Refungible Balance (r:2 w:2)153 // Storage: Refungible AccountBalance (r:1 w:1)154 // Storage: Refungible Owned (r:0 w:1)155 fn transfer_from_removing() -> Weight {156 (30_472_000 as Weight)157 .saturating_add(T::DbWeight::get().reads(4 as Weight))158 .saturating_add(T::DbWeight::get().writes(5 as Weight))159 }160 // Storage: Refungible Allowance (r:1 w:1)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_from_creating_removing() -> Weight {165 (32_362_000 as Weight)166 .saturating_add(T::DbWeight::get().reads(5 as Weight))167 .saturating_add(T::DbWeight::get().writes(7 as Weight))168 }169 // Storage: Refungible Allowance (r:1 w:1)170 // Storage: Refungible TotalSupply (r:1 w:1)171 // Storage: Refungible Balance (r:1 w:1)172 // Storage: Refungible AccountBalance (r:1 w:1)173 // Storage: Refungible TokensBurnt (r:1 w:1)174 // Storage: Refungible TokenData (r:0 w:1)175 // Storage: Refungible Owned (r:0 w:1)176 fn burn_from() -> Weight {177 (60_903_000 as Weight)178 .saturating_add(T::DbWeight::get().reads(5 as Weight))179 .saturating_add(T::DbWeight::get().writes(7 as Weight))180 }181 // Storage: Refungible TokenData (r:1 w:1)182 fn set_variable_metadata(_b: u32, ) -> Weight {183 (6_801_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}188189// For backwards compatibility and tests190impl WeightInfo for () {191 // Storage: Refungible TokensMinted (r:1 w:1)192 // Storage: Refungible AccountBalance (r:1 w:1)193 // Storage: Refungible Balance (r:0 w:1)194 // Storage: Refungible TotalSupply (r:0 w:1)195 // Storage: Refungible TokenData (r:0 w:1)196 // Storage: Refungible Owned (r:0 w:1)197 fn create_item() -> Weight {198 (18_681_000 as Weight)199 .saturating_add(RocksDbWeight::get().reads(2 as Weight))200 .saturating_add(RocksDbWeight::get().writes(6 as Weight))201 }202 // Storage: Refungible TokensMinted (r:1 w:1)203 // Storage: Refungible AccountBalance (r:1 w:1)204 // Storage: Refungible Balance (r:0 w:4)205 // Storage: Refungible TotalSupply (r:0 w:4)206 // Storage: Refungible TokenData (r:0 w:4)207 // Storage: Refungible Owned (r:0 w:4)208 fn create_multiple_items(b: u32, ) -> Weight {209 (13_869_000 as Weight)210 // Standard Error: 28_000211 .saturating_add((5_611_000 as Weight).saturating_mul(b as Weight))212 .saturating_add(RocksDbWeight::get().reads(2 as Weight))213 .saturating_add(RocksDbWeight::get().writes(2 as Weight))214 .saturating_add(RocksDbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))215 }216 // Storage: Refungible TotalSupply (r:1 w:1)217 // Storage: Refungible Balance (r:1 w:1)218 // Storage: Refungible AccountBalance (r:1 w:1)219 // Storage: Refungible Owned (r:0 w:1)220 fn burn_item_partial() -> Weight {221 (21_591_000 as Weight)222 .saturating_add(RocksDbWeight::get().reads(3 as Weight))223 .saturating_add(RocksDbWeight::get().writes(4 as Weight))224 }225 // Storage: Refungible TotalSupply (r:1 w:1)226 // Storage: Refungible Balance (r:1 w:1)227 // Storage: Refungible AccountBalance (r:1 w:1)228 // Storage: Refungible TokensBurnt (r:1 w:1)229 // Storage: Refungible TokenData (r:0 w:1)230 // Storage: Refungible Owned (r:0 w:1)231 fn burn_item_fully() -> Weight {232 (29_257_000 as Weight)233 .saturating_add(RocksDbWeight::get().reads(4 as Weight))234 .saturating_add(RocksDbWeight::get().writes(6 as Weight))235 }236 // Storage: Refungible Balance (r:2 w:2)237 fn transfer_normal() -> Weight {238 (17_733_000 as Weight)239 .saturating_add(RocksDbWeight::get().reads(2 as Weight))240 .saturating_add(RocksDbWeight::get().writes(2 as Weight))241 }242 // Storage: Refungible Balance (r:2 w:2)243 // Storage: Refungible AccountBalance (r:1 w:1)244 // Storage: Refungible Owned (r:0 w:1)245 fn transfer_creating() -> Weight {246 (20_943_000 as Weight)247 .saturating_add(RocksDbWeight::get().reads(3 as Weight))248 .saturating_add(RocksDbWeight::get().writes(4 as Weight))249 }250 // Storage: Refungible Balance (r:2 w:2)251 // Storage: Refungible AccountBalance (r:1 w:1)252 // Storage: Refungible Owned (r:0 w:1)253 fn transfer_removing() -> Weight {254 (22_406_000 as Weight)255 .saturating_add(RocksDbWeight::get().reads(3 as Weight))256 .saturating_add(RocksDbWeight::get().writes(4 as Weight))257 }258 // Storage: Refungible Balance (r:2 w:2)259 // Storage: Refungible AccountBalance (r:2 w:2)260 // Storage: Refungible Owned (r:0 w:2)261 fn transfer_creating_removing() -> Weight {262 (24_762_000 as Weight)263 .saturating_add(RocksDbWeight::get().reads(4 as Weight))264 .saturating_add(RocksDbWeight::get().writes(6 as Weight))265 }266 // Storage: Refungible Balance (r:1 w:0)267 // Storage: Refungible Allowance (r:0 w:1)268 fn approve() -> Weight {269 (14_109_000 as Weight)270 .saturating_add(RocksDbWeight::get().reads(1 as Weight))271 .saturating_add(RocksDbWeight::get().writes(1 as Weight))272 }273 // Storage: Refungible Allowance (r:1 w:1)274 // Storage: Refungible Balance (r:2 w:2)275 fn transfer_from_normal() -> Weight {276 (25_348_000 as Weight)277 .saturating_add(RocksDbWeight::get().reads(3 as Weight))278 .saturating_add(RocksDbWeight::get().writes(3 as Weight))279 }280 // Storage: Refungible Allowance (r:1 w:1)281 // Storage: Refungible Balance (r:2 w:2)282 // Storage: Refungible AccountBalance (r:1 w:1)283 // Storage: Refungible Owned (r:0 w:1)284 fn transfer_from_creating() -> Weight {285 (28_647_000 as Weight)286 .saturating_add(RocksDbWeight::get().reads(4 as Weight))287 .saturating_add(RocksDbWeight::get().writes(5 as Weight))288 }289 // Storage: Refungible Allowance (r:1 w:1)290 // Storage: Refungible Balance (r:2 w:2)291 // Storage: Refungible AccountBalance (r:1 w:1)292 // Storage: Refungible Owned (r:0 w:1)293 fn transfer_from_removing() -> Weight {294 (30_472_000 as Weight)295 .saturating_add(RocksDbWeight::get().reads(4 as Weight))296 .saturating_add(RocksDbWeight::get().writes(5 as Weight))297 }298 // Storage: Refungible Allowance (r:1 w:1)299 // Storage: Refungible Balance (r:2 w:2)300 // Storage: Refungible AccountBalance (r:2 w:2)301 // Storage: Refungible Owned (r:0 w:2)302 fn transfer_from_creating_removing() -> Weight {303 (32_362_000 as Weight)304 .saturating_add(RocksDbWeight::get().reads(5 as Weight))305 .saturating_add(RocksDbWeight::get().writes(7 as Weight))306 }307 // Storage: Refungible Allowance (r:1 w:1)308 // Storage: Refungible TotalSupply (r:1 w:1)309 // Storage: Refungible Balance (r:1 w:1)310 // Storage: Refungible AccountBalance (r:1 w:1)311 // Storage: Refungible TokensBurnt (r:1 w:1)312 // Storage: Refungible TokenData (r:0 w:1)313 // Storage: Refungible Owned (r:0 w:1)314 fn burn_from() -> Weight {315 (60_903_000 as Weight)316 .saturating_add(RocksDbWeight::get().reads(5 as Weight))317 .saturating_add(RocksDbWeight::get().writes(7 as Weight))318 }319 // Storage: Refungible TokenData (r:1 w:1)320 fn set_variable_metadata(_b: u32, ) -> Weight {321 (6_801_000 as Weight)322 .saturating_add(RocksDbWeight::get().reads(1 as Weight))323 .saturating_add(RocksDbWeight::get().writes(1 as Weight))324 }325}