difftreelog
fix pallets Weights traits definition
in: master
3 files changed
pallets/fungible/src/weights.rsdiffbeforeafterboth1// Template adopted from https://github.com/paritytech/substrate/blob/master/.maintain/frame-weight-template.hbs23//! Autogenerated weights for pallet_fungible4//!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-fungible14// --wasm-execution15// compiled16// --extrinsic17// *18// --template19// .maintain/frame-weight-template.hbs20// --steps=5021// --repeat=2022// --output=./pallets/fungible/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_fungible.33pub trait WeightInfo {34 fn create_item() -> Weight;35 fn burn_from() -> Weight;36 fn burn_item() -> Weight;37 fn transfer() -> Weight;38 fn approve() -> Weight;39 fn transfer_from() -> Weight;40}4142/// Weights for pallet_fungible using the Substrate node and recommended hardware.43pub struct SubstrateWeight<T>(PhantomData<T>);44impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {45 // Storage: Fungible Balance (r:1 w:1)46 // Storage: Fungible TotalSupply (r:0 w:1)47 fn create_item() -> Weight {48 (12_069_000 as Weight)49 .saturating_add(T::DbWeight::get().reads(1 as Weight))50 .saturating_add(T::DbWeight::get().writes(2 as Weight))51 }52 // Storage: Fungible TotalSupply (r:1 w:1)53 // Storage: Fungible Balance (r:1 w:1)54 fn burn_item() -> Weight {55 (14_096_000 as Weight)56 .saturating_add(T::DbWeight::get().reads(2 as Weight))57 .saturating_add(T::DbWeight::get().writes(2 as Weight))58 }59 // Storage: Fungible Balance (r:2 w:2)60 fn transfer() -> Weight {61 (15_436_000 as Weight)62 .saturating_add(T::DbWeight::get().reads(2 as Weight))63 .saturating_add(T::DbWeight::get().writes(2 as Weight))64 }65 // Storage: Fungible Balance (r:1 w:0)66 // Storage: Fungible Allowance (r:0 w:1)67 fn approve() -> Weight {68 (12_867_000 as Weight)69 .saturating_add(T::DbWeight::get().reads(1 as Weight))70 .saturating_add(T::DbWeight::get().writes(1 as Weight))71 }72 // Storage: Fungible Allowance (r:1 w:1)73 // Storage: Fungible Balance (r:2 w:2)74 fn transfer_from() -> Weight {75 (21_462_000 as Weight)76 .saturating_add(T::DbWeight::get().reads(3 as Weight))77 .saturating_add(T::DbWeight::get().writes(3 as Weight))78 }79 // Storage: Fungible Allowance (r:1 w:1)80 // Storage: Fungible TotalSupply (r:1 w:1)81 // Storage: Fungible Balance (r:1 w:1)82 fn burn_from() -> Weight {83 (55_874_000 as Weight)84 .saturating_add(T::DbWeight::get().reads(3 as Weight))85 .saturating_add(T::DbWeight::get().writes(3 as Weight))86 }87}8889// For backwards compatibility and tests90impl WeightInfo for () {91 // Storage: Fungible Balance (r:1 w:1)92 // Storage: Fungible TotalSupply (r:0 w:1)93 fn create_item() -> Weight {94 (12_069_000 as Weight)95 .saturating_add(RocksDbWeight::get().reads(1 as Weight))96 .saturating_add(RocksDbWeight::get().writes(2 as Weight))97 }98 // Storage: Fungible TotalSupply (r:1 w:1)99 // Storage: Fungible Balance (r:1 w:1)100 fn burn_item() -> Weight {101 (14_096_000 as Weight)102 .saturating_add(RocksDbWeight::get().reads(2 as Weight))103 .saturating_add(RocksDbWeight::get().writes(2 as Weight))104 }105 // Storage: Fungible Balance (r:2 w:2)106 fn transfer() -> Weight {107 (15_436_000 as Weight)108 .saturating_add(RocksDbWeight::get().reads(2 as Weight))109 .saturating_add(RocksDbWeight::get().writes(2 as Weight))110 }111 // Storage: Fungible Balance (r:1 w:0)112 // Storage: Fungible Allowance (r:0 w:1)113 fn approve() -> Weight {114 (12_867_000 as Weight)115 .saturating_add(RocksDbWeight::get().reads(1 as Weight))116 .saturating_add(RocksDbWeight::get().writes(1 as Weight))117 }118 // Storage: Fungible Allowance (r:1 w:1)119 // Storage: Fungible Balance (r:2 w:2)120 fn transfer_from() -> Weight {121 (21_462_000 as Weight)122 .saturating_add(RocksDbWeight::get().reads(3 as Weight))123 .saturating_add(RocksDbWeight::get().writes(3 as Weight))124 }125 // Storage: Fungible Allowance (r:1 w:1)126 // Storage: Fungible TotalSupply (r:1 w:1)127 // Storage: Fungible Balance (r:1 w:1)128 fn burn_from() -> Weight {129 (55_874_000 as Weight)130 .saturating_add(RocksDbWeight::get().reads(3 as Weight))131 .saturating_add(RocksDbWeight::get().writes(3 as Weight))132 }133}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.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;