difftreelog
Rename property change to set
in: master
11 files changed
pallets/common/src/lib.rsdiffbeforeafterboth--- a/pallets/common/src/lib.rs
+++ b/pallets/common/src/lib.rs
@@ -731,7 +731,7 @@
Ok(())
}
- pub fn change_collection_property(
+ pub fn set_collection_property(
collection: &CollectionHandle<T>,
sender: &T::CrossAccountId,
property: Property,
@@ -740,7 +740,7 @@
CollectionProperties::<T>::try_mutate(
collection.id,
- |properties| properties.try_change_property(property.clone())
+ |properties| properties.try_set_property(property.clone())
)?;
Self::deposit_event(Event::CollectionPropertySet(collection.id, property));
@@ -748,19 +748,19 @@
Ok(())
}
- pub fn change_collection_properties(
+ pub fn set_collection_properties(
collection: &CollectionHandle<T>,
sender: &T::CrossAccountId,
properties: Vec<Property>,
) -> DispatchResult {
for property in properties {
- Self::change_collection_property(collection, sender, property)?;
+ Self::set_collection_property(collection, sender, property)?;
}
Ok(())
}
- pub fn change_property_permission(
+ pub fn set_property_permission(
collection: &CollectionHandle<T>,
sender: &T::CrossAccountId,
property_permission: PropertyKeyPermission
@@ -784,13 +784,13 @@
Ok(())
}
- pub fn change_property_permissions(
+ pub fn set_property_permissions(
collection: &CollectionHandle<T>,
sender: &T::CrossAccountId,
property_permissions: Vec<PropertyKeyPermission>
) -> DispatchResult {
for prop_pemission in property_permissions {
- Self::change_property_permission(collection, sender, prop_pemission)?;
+ Self::set_property_permission(collection, sender, prop_pemission)?;
}
Ok(())
@@ -948,9 +948,9 @@
fn create_multiple_items(amount: u32) -> Weight;
fn create_multiple_items_ex(cost: &CreateItemExData<CrossAccountId>) -> Weight;
fn burn_item() -> Weight;
- fn change_collection_properties(amount: u32) -> Weight;
- fn change_token_properties(amount: u32) -> Weight;
- fn change_property_permissions(amount: u32) -> Weight;
+ fn set_collection_properties(amount: u32) -> Weight;
+ fn set_token_properties(amount: u32) -> Weight;
+ fn set_property_permissions(amount: u32) -> Weight;
fn transfer() -> Weight;
fn approve() -> Weight;
fn transfer_from() -> Weight;
@@ -985,18 +985,18 @@
token: TokenId,
amount: u128,
) -> DispatchResultWithPostInfo;
- fn change_collection_properties(
+ fn set_collection_properties(
&self,
sender: T::CrossAccountId,
properties: Vec<Property>,
) -> DispatchResultWithPostInfo;
- fn change_token_properties(
+ fn set_token_properties(
&self,
sender: T::CrossAccountId,
token_id: TokenId,
property: Vec<Property>,
) -> DispatchResultWithPostInfo;
- fn change_property_permissions(
+ fn set_property_permissions(
&self,
sender: &T::CrossAccountId,
property_permissions: Vec<PropertyKeyPermission>,
pallets/fungible/src/common.rsdiffbeforeafterboth--- a/pallets/fungible/src/common.rs
+++ b/pallets/fungible/src/common.rs
@@ -50,16 +50,16 @@
<SelfWeightOf<T>>::burn_item()
}
- fn change_collection_properties(amount: u32) -> Weight {
- <SelfWeightOf<T>>::change_collection_properties(amount)
+ fn set_collection_properties(amount: u32) -> Weight {
+ <SelfWeightOf<T>>::set_collection_properties(amount)
}
- fn change_token_properties(amount: u32) -> Weight {
- <SelfWeightOf<T>>::change_token_properties(amount)
+ fn set_token_properties(amount: u32) -> Weight {
+ <SelfWeightOf<T>>::set_token_properties(amount)
}
- fn change_property_permissions(amount: u32) -> Weight {
- <SelfWeightOf<T>>::change_property_permissions(amount)
+ fn set_property_permissions(amount: u32) -> Weight {
+ <SelfWeightOf<T>>::set_property_permissions(amount)
}
fn transfer() -> Weight {
@@ -237,7 +237,7 @@
)
}
- fn change_collection_properties(
+ fn set_collection_properties(
&self,
_sender: T::CrossAccountId,
_property: Vec<Property>,
@@ -245,7 +245,7 @@
fail!(<Error<T>>::PropertiesNotAllowed)
}
- fn change_token_properties(
+ fn set_token_properties(
&self,
_sender: T::CrossAccountId,
_token_id: TokenId,
@@ -254,7 +254,7 @@
fail!(<Error<T>>::PropertiesNotAllowed)
}
- fn change_property_permissions(
+ fn set_property_permissions(
&self,
_sender: &T::CrossAccountId,
_property_permissions: Vec<PropertyKeyPermission>,
pallets/fungible/src/weights.rsdiffbeforeafterboth--- a/pallets/fungible/src/weights.rs
+++ b/pallets/fungible/src/weights.rs
@@ -35,9 +35,9 @@
fn create_item() -> Weight;
fn create_multiple_items_ex(b: u32, ) -> Weight;
fn burn_item() -> Weight;
- fn change_collection_properties(amount: u32) -> Weight;
- fn change_token_properties(amount: u32) -> Weight;
- fn change_property_permissions(amount: u32) -> Weight;
+ fn set_collection_properties(amount: u32) -> Weight;
+ fn set_token_properties(amount: u32) -> Weight;
+ fn set_property_permissions(amount: u32) -> Weight;
fn transfer() -> Weight;
fn approve() -> Weight;
fn transfer_from() -> Weight;
@@ -73,17 +73,17 @@
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
- fn change_collection_properties(amount: u32) -> Weight {
+ fn set_collection_properties(amount: u32) -> Weight {
// Error
0
}
- fn change_token_properties(amount: u32) -> Weight {
+ fn set_token_properties(amount: u32) -> Weight {
// Error
0
}
- fn change_property_permissions(amount: u32) -> Weight {
+ fn set_property_permissions(amount: u32) -> Weight {
// Error
0
}
@@ -146,17 +146,17 @@
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
}
- fn change_collection_properties(amount: u32) -> Weight {
+ fn set_collection_properties(amount: u32) -> Weight {
// Error
0
}
- fn change_token_properties(amount: u32) -> Weight {
+ fn set_token_properties(amount: u32) -> Weight {
// Error
0
}
- fn change_property_permissions(amount: u32) -> Weight {
+ fn set_property_permissions(amount: u32) -> Weight {
// Error
0
}
pallets/nonfungible/src/common.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/common.rs
+++ b/pallets/nonfungible/src/common.rs
@@ -50,16 +50,16 @@
<SelfWeightOf<T>>::burn_item()
}
- fn change_collection_properties(amount: u32) -> Weight {
- <SelfWeightOf<T>>::change_collection_properties(amount)
+ fn set_collection_properties(amount: u32) -> Weight {
+ <SelfWeightOf<T>>::set_collection_properties(amount)
}
- fn change_token_properties(amount: u32) -> Weight {
- <SelfWeightOf<T>>::change_token_properties(amount)
+ fn set_token_properties(amount: u32) -> Weight {
+ <SelfWeightOf<T>>::set_token_properties(amount)
}
- fn change_property_permissions(amount: u32) -> Weight {
- <SelfWeightOf<T>>::change_property_permissions(amount)
+ fn set_property_permissions(amount: u32) -> Weight {
+ <SelfWeightOf<T>>::set_property_permissions(amount)
}
fn transfer() -> Weight {
@@ -153,42 +153,42 @@
)
}
- fn change_collection_properties(
+ fn set_collection_properties(
&self,
sender: T::CrossAccountId,
properties: Vec<Property>,
) -> DispatchResultWithPostInfo {
- let weight = <CommonWeights<T>>::change_collection_properties(properties.len() as u32);
+ let weight = <CommonWeights<T>>::set_collection_properties(properties.len() as u32);
with_weight(
- <Pallet<T>>::change_collection_properties(self, &sender, properties),
+ <Pallet<T>>::set_collection_properties(self, &sender, properties),
weight
)
}
- fn change_token_properties(
+ fn set_token_properties(
&self,
sender: T::CrossAccountId,
token_id: TokenId,
properties: Vec<Property>,
) -> DispatchResultWithPostInfo {
- let weight = <CommonWeights<T>>::change_token_properties(properties.len() as u32);
+ let weight = <CommonWeights<T>>::set_token_properties(properties.len() as u32);
with_weight(
- <Pallet<T>>::change_token_properties(self, &sender, token_id, properties),
+ <Pallet<T>>::set_token_properties(self, &sender, token_id, properties),
weight
)
}
- fn change_property_permissions(
+ fn set_property_permissions(
&self,
sender: &T::CrossAccountId,
property_permissions: Vec<PropertyKeyPermission>,
) -> DispatchResultWithPostInfo {
- let weight = <CommonWeights<T>>::change_property_permissions(property_permissions.len() as u32);
+ let weight = <CommonWeights<T>>::set_property_permissions(property_permissions.len() as u32);
with_weight(
- <Pallet<T>>::change_property_permissions(self, sender, property_permissions),
+ <Pallet<T>>::set_property_permissions(self, sender, property_permissions),
weight
)
}
pallets/nonfungible/src/lib.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/lib.rs
+++ b/pallets/nonfungible/src/lib.rs
@@ -255,7 +255,7 @@
Ok(())
}
- pub fn change_token_property(
+ pub fn set_token_property(
collection: &NonfungibleHandle<T>,
sender: &T::CrossAccountId,
token_id: TokenId,
@@ -292,7 +292,7 @@
}
<TokenProperties<T>>::try_mutate((collection.id, token_id), |properties| {
- properties.try_change_property(property.clone())
+ properties.try_set_property(property.clone())
})?;
<PalletCommon<T>>::deposit_event(CommonEvent::TokenPropertySet(
@@ -304,33 +304,33 @@
Ok(())
}
- pub fn change_token_properties(
+ pub fn set_token_properties(
collection: &NonfungibleHandle<T>,
sender: &T::CrossAccountId,
token_id: TokenId,
properties: Vec<Property>,
) -> DispatchResult {
for property in properties {
- Self::change_token_property(collection, sender, token_id, property)?;
+ Self::set_token_property(collection, sender, token_id, property)?;
}
Ok(())
}
- pub fn change_collection_properties(
+ pub fn set_collection_properties(
collection: &NonfungibleHandle<T>,
sender: &T::CrossAccountId,
properties: Vec<Property>,
) -> DispatchResult {
- <PalletCommon<T>>::change_collection_properties(collection, sender, properties)
+ <PalletCommon<T>>::set_collection_properties(collection, sender, properties)
}
- pub fn change_property_permissions(
+ pub fn set_property_permissions(
collection: &CollectionHandle<T>,
sender: &T::CrossAccountId,
property_permissions: Vec<PropertyKeyPermission>
) -> DispatchResult {
- <PalletCommon<T>>::change_property_permissions(
+ <PalletCommon<T>>::set_property_permissions(
collection,
sender,
property_permissions,
pallets/nonfungible/src/weights.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/weights.rs
+++ b/pallets/nonfungible/src/weights.rs
@@ -36,9 +36,9 @@
fn create_multiple_items(b: u32, ) -> Weight;
fn create_multiple_items_ex(b: u32, ) -> Weight;
fn burn_item() -> Weight;
- fn change_collection_properties(amount: u32) -> Weight;
- fn change_token_properties(amount: u32) -> Weight;
- fn change_property_permissions(amount: u32) -> Weight;
+ fn set_collection_properties(amount: u32) -> Weight;
+ fn set_token_properties(amount: u32) -> Weight;
+ fn set_property_permissions(amount: u32) -> Weight;
fn transfer() -> Weight;
fn approve() -> Weight;
fn transfer_from() -> Weight;
@@ -94,17 +94,17 @@
.saturating_add(T::DbWeight::get().writes(4 as Weight))
}
- fn change_collection_properties(amount: u32) -> Weight {
+ fn set_collection_properties(amount: u32) -> Weight {
// TODO calculate appropriate weight
(50_000_000 as Weight).saturating_mul(amount as Weight)
}
- fn change_token_properties(amount: u32) -> Weight {
+ fn set_token_properties(amount: u32) -> Weight {
// TODO calculate appropriate weight
(50_000_000 as Weight).saturating_mul(amount as Weight)
}
- fn change_property_permissions(amount: u32) -> Weight {
+ fn set_property_permissions(amount: u32) -> Weight {
// TODO calculate appropriate weight
(50_000_000 as Weight).saturating_mul(amount as Weight)
}
@@ -199,17 +199,17 @@
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
}
- fn change_collection_properties(amount: u32) -> Weight {
+ fn set_collection_properties(amount: u32) -> Weight {
// TODO calculate appropriate weight
(50_000_000 as Weight).saturating_mul(amount as Weight)
}
- fn change_token_properties(amount: u32) -> Weight {
+ fn set_token_properties(amount: u32) -> Weight {
// TODO calculate appropriate weight
(50_000_000 as Weight).saturating_mul(amount as Weight)
}
- fn change_property_permissions(amount: u32) -> Weight {
+ fn set_property_permissions(amount: u32) -> Weight {
// TODO calculate appropriate weight
(50_000_000 as Weight).saturating_mul(amount as Weight)
}
pallets/refungible/src/common.rsdiffbeforeafterboth--- a/pallets/refungible/src/common.rs
+++ b/pallets/refungible/src/common.rs
@@ -66,16 +66,16 @@
max_weight_of!(burn_item_partial(), burn_item_fully())
}
- fn change_collection_properties(amount: u32) -> Weight {
- <SelfWeightOf<T>>::change_collection_properties(amount)
+ fn set_collection_properties(amount: u32) -> Weight {
+ <SelfWeightOf<T>>::set_collection_properties(amount)
}
- fn change_token_properties(amount: u32) -> Weight {
- <SelfWeightOf<T>>::change_token_properties(amount)
+ fn set_token_properties(amount: u32) -> Weight {
+ <SelfWeightOf<T>>::set_token_properties(amount)
}
- fn change_property_permissions(amount: u32) -> Weight {
- <SelfWeightOf<T>>::change_property_permissions(amount)
+ fn set_property_permissions(amount: u32) -> Weight {
+ <SelfWeightOf<T>>::set_property_permissions(amount)
}
fn transfer() -> Weight {
@@ -256,7 +256,7 @@
)
}
- fn change_collection_properties(
+ fn set_collection_properties(
&self,
_sender: T::CrossAccountId,
_property: Vec<Property>,
@@ -264,7 +264,7 @@
fail!(<Error<T>>::PropertiesNotAllowed)
}
- fn change_token_properties(
+ fn set_token_properties(
&self,
_sender: T::CrossAccountId,
_token_id: TokenId,
@@ -273,7 +273,7 @@
fail!(<Error<T>>::PropertiesNotAllowed)
}
- fn change_property_permissions(
+ fn set_property_permissions(
&self,
_sender: &T::CrossAccountId,
_property_permissions: Vec<PropertyKeyPermission>,
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: 2022-03-01, STEPS: `50`, REPEAT: 200, LOW RANGE: `[]`, HIGH RANGE: `[]`7//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 102489// Executed Command:10// target/release/unique-collator11// benchmark12// --pallet13// pallet-refungible14// --wasm-execution15// compiled16// --extrinsic17// *18// --template19// .maintain/frame-weight-template.hbs20// --steps=5021// --repeat=20022// --heap-pages=409623// --output=./pallets/refungible/src/weights.rs2425#![cfg_attr(rustfmt, rustfmt_skip)]26#![allow(unused_parens)]27#![allow(unused_imports)]28#![allow(clippy::unnecessary_cast)]2930use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};31use sp_std::marker::PhantomData;3233/// Weight functions needed for pallet_refungible.34pub trait WeightInfo {35 fn create_item() -> Weight;36 fn create_multiple_items(b: u32, ) -> Weight;37 fn create_multiple_items_ex_multiple_items(b: u32, ) -> Weight;38 fn create_multiple_items_ex_multiple_owners(b: u32, ) -> Weight;39 fn burn_item_partial() -> Weight;40 fn burn_item_fully() -> Weight;41 fn change_collection_properties(amount: u32) -> Weight;42 fn change_token_properties(amount: u32) -> Weight;43 fn change_property_permissions(amount: u32) -> Weight;44 fn transfer_normal() -> Weight;45 fn transfer_creating() -> Weight;46 fn transfer_removing() -> Weight;47 fn transfer_creating_removing() -> Weight;48 fn approve() -> Weight;49 fn transfer_from_normal() -> Weight;50 fn transfer_from_creating() -> Weight;51 fn transfer_from_removing() -> Weight;52 fn transfer_from_creating_removing() -> Weight;53 fn burn_from() -> Weight;54 fn set_variable_metadata(b: u32, ) -> Weight;55}5657/// Weights for pallet_refungible using the Substrate node and recommended hardware.58pub struct SubstrateWeight<T>(PhantomData<T>);59impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {60 // Storage: Refungible TokensMinted (r:1 w:1)61 // Storage: Refungible AccountBalance (r:1 w:1)62 // Storage: Refungible Balance (r:0 w:1)63 // Storage: Refungible TotalSupply (r:0 w:1)64 // Storage: Refungible TokenData (r:0 w:1)65 // Storage: Refungible Owned (r:0 w:1)66 fn create_item() -> Weight {67 (21_255_000 as Weight)68 .saturating_add(T::DbWeight::get().reads(2 as Weight))69 .saturating_add(T::DbWeight::get().writes(6 as Weight))70 }71 // Storage: Refungible TokensMinted (r:1 w:1)72 // Storage: Refungible AccountBalance (r:1 w:1)73 // Storage: Refungible Balance (r:0 w:4)74 // Storage: Refungible TotalSupply (r:0 w:4)75 // Storage: Refungible TokenData (r:0 w:4)76 // Storage: Refungible Owned (r:0 w:4)77 fn create_multiple_items(b: u32, ) -> Weight {78 (18_052_000 as Weight)79 // Standard Error: 1_00080 .saturating_add((5_549_000 as Weight).saturating_mul(b as Weight))81 .saturating_add(T::DbWeight::get().reads(2 as Weight))82 .saturating_add(T::DbWeight::get().writes(2 as Weight))83 .saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))84 }85 // Storage: Refungible TokensMinted (r:1 w:1)86 // Storage: Refungible AccountBalance (r:4 w:4)87 // Storage: Refungible Balance (r:0 w:4)88 // Storage: Refungible TotalSupply (r:0 w:4)89 // Storage: Refungible TokenData (r:0 w:4)90 // Storage: Refungible Owned (r:0 w:4)91 fn create_multiple_items_ex_multiple_items(b: u32, ) -> Weight {92 (15_766_000 as Weight)93 // Standard Error: 2_00094 .saturating_add((8_187_000 as Weight).saturating_mul(b as Weight))95 .saturating_add(T::DbWeight::get().reads(1 as Weight))96 .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))97 .saturating_add(T::DbWeight::get().writes(1 as Weight))98 .saturating_add(T::DbWeight::get().writes((5 as Weight).saturating_mul(b as Weight)))99 }100 // Storage: Refungible TokensMinted (r:1 w:1)101 // Storage: Refungible TotalSupply (r:0 w:1)102 // Storage: Refungible TokenData (r:0 w:1)103 // Storage: Refungible AccountBalance (r:4 w:4)104 // Storage: Refungible Balance (r:0 w:4)105 // Storage: Refungible Owned (r:0 w:4)106 fn create_multiple_items_ex_multiple_owners(b: u32, ) -> Weight {107 (5_675_000 as Weight)108 // Standard Error: 2_000109 .saturating_add((6_315_000 as Weight).saturating_mul(b as Weight))110 .saturating_add(T::DbWeight::get().reads(1 as Weight))111 .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))112 .saturating_add(T::DbWeight::get().writes(3 as Weight))113 .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))114 }115 // Storage: Refungible TotalSupply (r:1 w:1)116 // Storage: Refungible Balance (r:1 w:1)117 // Storage: Refungible AccountBalance (r:1 w:1)118 // Storage: Refungible Owned (r:0 w:1)119 fn burn_item_partial() -> Weight {120 (23_518_000 as Weight)121 .saturating_add(T::DbWeight::get().reads(3 as Weight))122 .saturating_add(T::DbWeight::get().writes(4 as Weight))123 }124 // Storage: Refungible TotalSupply (r:1 w:1)125 // Storage: Refungible Balance (r:1 w:1)126 // Storage: Refungible AccountBalance (r:1 w:1)127 // Storage: Refungible TokensBurnt (r:1 w:1)128 // Storage: Refungible TokenData (r:0 w:1)129 // Storage: Refungible Owned (r:0 w:1)130 fn burn_item_fully() -> Weight {131 (32_489_000 as Weight)132 .saturating_add(T::DbWeight::get().reads(4 as Weight))133 .saturating_add(T::DbWeight::get().writes(6 as Weight))134 }135136 fn change_collection_properties(amount: u32) -> Weight {137 // Error138 0139 }140141 fn change_token_properties(amount: u32) -> Weight {142 // Error143 0144 }145146 fn change_property_permissions(amount: u32) -> Weight {147 // Error148 0149 }150151 // Storage: Refungible Balance (r:2 w:2)152 fn transfer_normal() -> Weight {153 (19_766_000 as Weight)154 .saturating_add(T::DbWeight::get().reads(2 as Weight))155 .saturating_add(T::DbWeight::get().writes(2 as Weight))156 }157 // Storage: Refungible Balance (r:2 w:2)158 // Storage: Refungible AccountBalance (r:1 w:1)159 // Storage: Refungible Owned (r:0 w:1)160 fn transfer_creating() -> Weight {161 (23_360_000 as Weight)162 .saturating_add(T::DbWeight::get().reads(3 as Weight))163 .saturating_add(T::DbWeight::get().writes(4 as Weight))164 }165 // Storage: Refungible Balance (r:2 w:2)166 // Storage: Refungible AccountBalance (r:1 w:1)167 // Storage: Refungible Owned (r:0 w:1)168 fn transfer_removing() -> Weight {169 (25_344_000 as Weight)170 .saturating_add(T::DbWeight::get().reads(3 as Weight))171 .saturating_add(T::DbWeight::get().writes(4 as Weight))172 }173 // Storage: Refungible Balance (r:2 w:2)174 // Storage: Refungible AccountBalance (r:2 w:2)175 // Storage: Refungible Owned (r:0 w:2)176 fn transfer_creating_removing() -> Weight {177 (28_553_000 as Weight)178 .saturating_add(T::DbWeight::get().reads(4 as Weight))179 .saturating_add(T::DbWeight::get().writes(6 as Weight))180 }181 // Storage: Refungible Balance (r:1 w:0)182 // Storage: Refungible Allowance (r:0 w:1)183 fn approve() -> Weight {184 (15_356_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 // Storage: Refungible Allowance (r:1 w:1)189 // Storage: Refungible Balance (r:2 w:2)190 fn transfer_from_normal() -> Weight {191 (28_832_000 as Weight)192 .saturating_add(T::DbWeight::get().reads(3 as Weight))193 .saturating_add(T::DbWeight::get().writes(3 as Weight))194 }195 // Storage: Refungible Allowance (r:1 w:1)196 // Storage: Refungible Balance (r:2 w:2)197 // Storage: Refungible AccountBalance (r:1 w:1)198 // Storage: Refungible Owned (r:0 w:1)199 fn transfer_from_creating() -> Weight {200 (32_132_000 as Weight)201 .saturating_add(T::DbWeight::get().reads(4 as Weight))202 .saturating_add(T::DbWeight::get().writes(5 as Weight))203 }204 // Storage: Refungible Allowance (r:1 w:1)205 // Storage: Refungible Balance (r:2 w:2)206 // Storage: Refungible AccountBalance (r:1 w:1)207 // Storage: Refungible Owned (r:0 w:1)208 fn transfer_from_removing() -> Weight {209 (33_237_000 as Weight)210 .saturating_add(T::DbWeight::get().reads(4 as Weight))211 .saturating_add(T::DbWeight::get().writes(5 as Weight))212 }213 // Storage: Refungible Allowance (r:1 w:1)214 // Storage: Refungible Balance (r:2 w:2)215 // Storage: Refungible AccountBalance (r:2 w:2)216 // Storage: Refungible Owned (r:0 w:2)217 fn transfer_from_creating_removing() -> Weight {218 (36_399_000 as Weight)219 .saturating_add(T::DbWeight::get().reads(5 as Weight))220 .saturating_add(T::DbWeight::get().writes(7 as Weight))221 }222 // Storage: Refungible Allowance (r:1 w:1)223 // Storage: Refungible TotalSupply (r:1 w:1)224 // Storage: Refungible Balance (r:1 w:1)225 // Storage: Refungible AccountBalance (r:1 w:1)226 // Storage: Refungible TokensBurnt (r:1 w:1)227 // Storage: Refungible TokenData (r:0 w:1)228 // Storage: Refungible Owned (r:0 w:1)229 fn burn_from() -> Weight {230 (42_043_000 as Weight)231 .saturating_add(T::DbWeight::get().reads(5 as Weight))232 .saturating_add(T::DbWeight::get().writes(7 as Weight))233 }234 // Storage: Refungible TokenData (r:1 w:1)235 fn set_variable_metadata(_b: u32, ) -> Weight {236 (7_364_000 as Weight)237 .saturating_add(T::DbWeight::get().reads(1 as Weight))238 .saturating_add(T::DbWeight::get().writes(1 as Weight))239 }240}241242// For backwards compatibility and tests243impl WeightInfo for () {244 // Storage: Refungible TokensMinted (r:1 w:1)245 // Storage: Refungible AccountBalance (r:1 w:1)246 // Storage: Refungible Balance (r:0 w:1)247 // Storage: Refungible TotalSupply (r:0 w:1)248 // Storage: Refungible TokenData (r:0 w:1)249 // Storage: Refungible Owned (r:0 w:1)250 fn create_item() -> Weight {251 (21_255_000 as Weight)252 .saturating_add(RocksDbWeight::get().reads(2 as Weight))253 .saturating_add(RocksDbWeight::get().writes(6 as Weight))254 }255 // Storage: Refungible TokensMinted (r:1 w:1)256 // Storage: Refungible AccountBalance (r:1 w:1)257 // Storage: Refungible Balance (r:0 w:4)258 // Storage: Refungible TotalSupply (r:0 w:4)259 // Storage: Refungible TokenData (r:0 w:4)260 // Storage: Refungible Owned (r:0 w:4)261 fn create_multiple_items(b: u32, ) -> Weight {262 (18_052_000 as Weight)263 // Standard Error: 1_000264 .saturating_add((5_549_000 as Weight).saturating_mul(b as Weight))265 .saturating_add(RocksDbWeight::get().reads(2 as Weight))266 .saturating_add(RocksDbWeight::get().writes(2 as Weight))267 .saturating_add(RocksDbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))268 }269 // Storage: Refungible TokensMinted (r:1 w:1)270 // Storage: Refungible AccountBalance (r:4 w:4)271 // Storage: Refungible Balance (r:0 w:4)272 // Storage: Refungible TotalSupply (r:0 w:4)273 // Storage: Refungible TokenData (r:0 w:4)274 // Storage: Refungible Owned (r:0 w:4)275 fn create_multiple_items_ex_multiple_items(b: u32, ) -> Weight {276 (15_766_000 as Weight)277 // Standard Error: 2_000278 .saturating_add((8_187_000 as Weight).saturating_mul(b as Weight))279 .saturating_add(RocksDbWeight::get().reads(1 as Weight))280 .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))281 .saturating_add(RocksDbWeight::get().writes(1 as Weight))282 .saturating_add(RocksDbWeight::get().writes((5 as Weight).saturating_mul(b as Weight)))283 }284 // Storage: Refungible TokensMinted (r:1 w:1)285 // Storage: Refungible TotalSupply (r:0 w:1)286 // Storage: Refungible TokenData (r:0 w:1)287 // Storage: Refungible AccountBalance (r:4 w:4)288 // Storage: Refungible Balance (r:0 w:4)289 // Storage: Refungible Owned (r:0 w:4)290 fn create_multiple_items_ex_multiple_owners(b: u32, ) -> Weight {291 (5_675_000 as Weight)292 // Standard Error: 2_000293 .saturating_add((6_315_000 as Weight).saturating_mul(b as Weight))294 .saturating_add(RocksDbWeight::get().reads(1 as Weight))295 .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))296 .saturating_add(RocksDbWeight::get().writes(3 as Weight))297 .saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))298 }299 // Storage: Refungible TotalSupply (r:1 w:1)300 // Storage: Refungible Balance (r:1 w:1)301 // Storage: Refungible AccountBalance (r:1 w:1)302 // Storage: Refungible Owned (r:0 w:1)303 fn burn_item_partial() -> Weight {304 (23_518_000 as Weight)305 .saturating_add(RocksDbWeight::get().reads(3 as Weight))306 .saturating_add(RocksDbWeight::get().writes(4 as Weight))307 }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_item_fully() -> Weight {315 (32_489_000 as Weight)316 .saturating_add(RocksDbWeight::get().reads(4 as Weight))317 .saturating_add(RocksDbWeight::get().writes(6 as Weight))318 }319320 fn change_collection_properties(amount: u32) -> Weight {321 // Error322 0323 }324325 fn change_token_properties(amount: u32) -> Weight {326 // Error327 0328 }329330 fn change_property_permissions(amount: u32) -> Weight {331 // Error332 0333 }334335 // Storage: Refungible Balance (r:2 w:2)336 fn transfer_normal() -> Weight {337 (19_766_000 as Weight)338 .saturating_add(RocksDbWeight::get().reads(2 as Weight))339 .saturating_add(RocksDbWeight::get().writes(2 as Weight))340 }341 // Storage: Refungible Balance (r:2 w:2)342 // Storage: Refungible AccountBalance (r:1 w:1)343 // Storage: Refungible Owned (r:0 w:1)344 fn transfer_creating() -> Weight {345 (23_360_000 as Weight)346 .saturating_add(RocksDbWeight::get().reads(3 as Weight))347 .saturating_add(RocksDbWeight::get().writes(4 as Weight))348 }349 // Storage: Refungible Balance (r:2 w:2)350 // Storage: Refungible AccountBalance (r:1 w:1)351 // Storage: Refungible Owned (r:0 w:1)352 fn transfer_removing() -> Weight {353 (25_344_000 as Weight)354 .saturating_add(RocksDbWeight::get().reads(3 as Weight))355 .saturating_add(RocksDbWeight::get().writes(4 as Weight))356 }357 // Storage: Refungible Balance (r:2 w:2)358 // Storage: Refungible AccountBalance (r:2 w:2)359 // Storage: Refungible Owned (r:0 w:2)360 fn transfer_creating_removing() -> Weight {361 (28_553_000 as Weight)362 .saturating_add(RocksDbWeight::get().reads(4 as Weight))363 .saturating_add(RocksDbWeight::get().writes(6 as Weight))364 }365 // Storage: Refungible Balance (r:1 w:0)366 // Storage: Refungible Allowance (r:0 w:1)367 fn approve() -> Weight {368 (15_356_000 as Weight)369 .saturating_add(RocksDbWeight::get().reads(1 as Weight))370 .saturating_add(RocksDbWeight::get().writes(1 as Weight))371 }372 // Storage: Refungible Allowance (r:1 w:1)373 // Storage: Refungible Balance (r:2 w:2)374 fn transfer_from_normal() -> Weight {375 (28_832_000 as Weight)376 .saturating_add(RocksDbWeight::get().reads(3 as Weight))377 .saturating_add(RocksDbWeight::get().writes(3 as Weight))378 }379 // Storage: Refungible Allowance (r:1 w:1)380 // Storage: Refungible Balance (r:2 w:2)381 // Storage: Refungible AccountBalance (r:1 w:1)382 // Storage: Refungible Owned (r:0 w:1)383 fn transfer_from_creating() -> Weight {384 (32_132_000 as Weight)385 .saturating_add(RocksDbWeight::get().reads(4 as Weight))386 .saturating_add(RocksDbWeight::get().writes(5 as Weight))387 }388 // Storage: Refungible Allowance (r:1 w:1)389 // Storage: Refungible Balance (r:2 w:2)390 // Storage: Refungible AccountBalance (r:1 w:1)391 // Storage: Refungible Owned (r:0 w:1)392 fn transfer_from_removing() -> Weight {393 (33_237_000 as Weight)394 .saturating_add(RocksDbWeight::get().reads(4 as Weight))395 .saturating_add(RocksDbWeight::get().writes(5 as Weight))396 }397 // Storage: Refungible Allowance (r:1 w:1)398 // Storage: Refungible Balance (r:2 w:2)399 // Storage: Refungible AccountBalance (r:2 w:2)400 // Storage: Refungible Owned (r:0 w:2)401 fn transfer_from_creating_removing() -> Weight {402 (36_399_000 as Weight)403 .saturating_add(RocksDbWeight::get().reads(5 as Weight))404 .saturating_add(RocksDbWeight::get().writes(7 as Weight))405 }406 // Storage: Refungible Allowance (r:1 w:1)407 // Storage: Refungible TotalSupply (r:1 w:1)408 // Storage: Refungible Balance (r:1 w:1)409 // Storage: Refungible AccountBalance (r:1 w:1)410 // Storage: Refungible TokensBurnt (r:1 w:1)411 // Storage: Refungible TokenData (r:0 w:1)412 // Storage: Refungible Owned (r:0 w:1)413 fn burn_from() -> Weight {414 (42_043_000 as Weight)415 .saturating_add(RocksDbWeight::get().reads(5 as Weight))416 .saturating_add(RocksDbWeight::get().writes(7 as Weight))417 }418 // Storage: Refungible TokenData (r:1 w:1)419 fn set_variable_metadata(_b: u32, ) -> Weight {420 (7_364_000 as Weight)421 .saturating_add(RocksDbWeight::get().reads(1 as Weight))422 .saturating_add(RocksDbWeight::get().writes(1 as Weight))423 }424}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: 2022-03-01, STEPS: `50`, REPEAT: 200, LOW RANGE: `[]`, HIGH RANGE: `[]`7//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 102489// Executed Command:10// target/release/unique-collator11// benchmark12// --pallet13// pallet-refungible14// --wasm-execution15// compiled16// --extrinsic17// *18// --template19// .maintain/frame-weight-template.hbs20// --steps=5021// --repeat=20022// --heap-pages=409623// --output=./pallets/refungible/src/weights.rs2425#![cfg_attr(rustfmt, rustfmt_skip)]26#![allow(unused_parens)]27#![allow(unused_imports)]28#![allow(clippy::unnecessary_cast)]2930use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};31use sp_std::marker::PhantomData;3233/// Weight functions needed for pallet_refungible.34pub trait WeightInfo {35 fn create_item() -> Weight;36 fn create_multiple_items(b: u32, ) -> Weight;37 fn create_multiple_items_ex_multiple_items(b: u32, ) -> Weight;38 fn create_multiple_items_ex_multiple_owners(b: u32, ) -> Weight;39 fn burn_item_partial() -> Weight;40 fn burn_item_fully() -> Weight;41 fn set_collection_properties(amount: u32) -> Weight;42 fn set_token_properties(amount: u32) -> Weight;43 fn set_property_permissions(amount: u32) -> Weight;44 fn transfer_normal() -> Weight;45 fn transfer_creating() -> Weight;46 fn transfer_removing() -> Weight;47 fn transfer_creating_removing() -> Weight;48 fn approve() -> Weight;49 fn transfer_from_normal() -> Weight;50 fn transfer_from_creating() -> Weight;51 fn transfer_from_removing() -> Weight;52 fn transfer_from_creating_removing() -> Weight;53 fn burn_from() -> Weight;54 fn set_variable_metadata(b: u32, ) -> Weight;55}5657/// Weights for pallet_refungible using the Substrate node and recommended hardware.58pub struct SubstrateWeight<T>(PhantomData<T>);59impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {60 // Storage: Refungible TokensMinted (r:1 w:1)61 // Storage: Refungible AccountBalance (r:1 w:1)62 // Storage: Refungible Balance (r:0 w:1)63 // Storage: Refungible TotalSupply (r:0 w:1)64 // Storage: Refungible TokenData (r:0 w:1)65 // Storage: Refungible Owned (r:0 w:1)66 fn create_item() -> Weight {67 (21_255_000 as Weight)68 .saturating_add(T::DbWeight::get().reads(2 as Weight))69 .saturating_add(T::DbWeight::get().writes(6 as Weight))70 }71 // Storage: Refungible TokensMinted (r:1 w:1)72 // Storage: Refungible AccountBalance (r:1 w:1)73 // Storage: Refungible Balance (r:0 w:4)74 // Storage: Refungible TotalSupply (r:0 w:4)75 // Storage: Refungible TokenData (r:0 w:4)76 // Storage: Refungible Owned (r:0 w:4)77 fn create_multiple_items(b: u32, ) -> Weight {78 (18_052_000 as Weight)79 // Standard Error: 1_00080 .saturating_add((5_549_000 as Weight).saturating_mul(b as Weight))81 .saturating_add(T::DbWeight::get().reads(2 as Weight))82 .saturating_add(T::DbWeight::get().writes(2 as Weight))83 .saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))84 }85 // Storage: Refungible TokensMinted (r:1 w:1)86 // Storage: Refungible AccountBalance (r:4 w:4)87 // Storage: Refungible Balance (r:0 w:4)88 // Storage: Refungible TotalSupply (r:0 w:4)89 // Storage: Refungible TokenData (r:0 w:4)90 // Storage: Refungible Owned (r:0 w:4)91 fn create_multiple_items_ex_multiple_items(b: u32, ) -> Weight {92 (15_766_000 as Weight)93 // Standard Error: 2_00094 .saturating_add((8_187_000 as Weight).saturating_mul(b as Weight))95 .saturating_add(T::DbWeight::get().reads(1 as Weight))96 .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))97 .saturating_add(T::DbWeight::get().writes(1 as Weight))98 .saturating_add(T::DbWeight::get().writes((5 as Weight).saturating_mul(b as Weight)))99 }100 // Storage: Refungible TokensMinted (r:1 w:1)101 // Storage: Refungible TotalSupply (r:0 w:1)102 // Storage: Refungible TokenData (r:0 w:1)103 // Storage: Refungible AccountBalance (r:4 w:4)104 // Storage: Refungible Balance (r:0 w:4)105 // Storage: Refungible Owned (r:0 w:4)106 fn create_multiple_items_ex_multiple_owners(b: u32, ) -> Weight {107 (5_675_000 as Weight)108 // Standard Error: 2_000109 .saturating_add((6_315_000 as Weight).saturating_mul(b as Weight))110 .saturating_add(T::DbWeight::get().reads(1 as Weight))111 .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))112 .saturating_add(T::DbWeight::get().writes(3 as Weight))113 .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))114 }115 // Storage: Refungible TotalSupply (r:1 w:1)116 // Storage: Refungible Balance (r:1 w:1)117 // Storage: Refungible AccountBalance (r:1 w:1)118 // Storage: Refungible Owned (r:0 w:1)119 fn burn_item_partial() -> Weight {120 (23_518_000 as Weight)121 .saturating_add(T::DbWeight::get().reads(3 as Weight))122 .saturating_add(T::DbWeight::get().writes(4 as Weight))123 }124 // Storage: Refungible TotalSupply (r:1 w:1)125 // Storage: Refungible Balance (r:1 w:1)126 // Storage: Refungible AccountBalance (r:1 w:1)127 // Storage: Refungible TokensBurnt (r:1 w:1)128 // Storage: Refungible TokenData (r:0 w:1)129 // Storage: Refungible Owned (r:0 w:1)130 fn burn_item_fully() -> Weight {131 (32_489_000 as Weight)132 .saturating_add(T::DbWeight::get().reads(4 as Weight))133 .saturating_add(T::DbWeight::get().writes(6 as Weight))134 }135136 fn set_collection_properties(amount: u32) -> Weight {137 // Error138 0139 }140141 fn set_token_properties(amount: u32) -> Weight {142 // Error143 0144 }145146 fn set_property_permissions(amount: u32) -> Weight {147 // Error148 0149 }150151 // Storage: Refungible Balance (r:2 w:2)152 fn transfer_normal() -> Weight {153 (19_766_000 as Weight)154 .saturating_add(T::DbWeight::get().reads(2 as Weight))155 .saturating_add(T::DbWeight::get().writes(2 as Weight))156 }157 // Storage: Refungible Balance (r:2 w:2)158 // Storage: Refungible AccountBalance (r:1 w:1)159 // Storage: Refungible Owned (r:0 w:1)160 fn transfer_creating() -> Weight {161 (23_360_000 as Weight)162 .saturating_add(T::DbWeight::get().reads(3 as Weight))163 .saturating_add(T::DbWeight::get().writes(4 as Weight))164 }165 // Storage: Refungible Balance (r:2 w:2)166 // Storage: Refungible AccountBalance (r:1 w:1)167 // Storage: Refungible Owned (r:0 w:1)168 fn transfer_removing() -> Weight {169 (25_344_000 as Weight)170 .saturating_add(T::DbWeight::get().reads(3 as Weight))171 .saturating_add(T::DbWeight::get().writes(4 as Weight))172 }173 // Storage: Refungible Balance (r:2 w:2)174 // Storage: Refungible AccountBalance (r:2 w:2)175 // Storage: Refungible Owned (r:0 w:2)176 fn transfer_creating_removing() -> Weight {177 (28_553_000 as Weight)178 .saturating_add(T::DbWeight::get().reads(4 as Weight))179 .saturating_add(T::DbWeight::get().writes(6 as Weight))180 }181 // Storage: Refungible Balance (r:1 w:0)182 // Storage: Refungible Allowance (r:0 w:1)183 fn approve() -> Weight {184 (15_356_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 // Storage: Refungible Allowance (r:1 w:1)189 // Storage: Refungible Balance (r:2 w:2)190 fn transfer_from_normal() -> Weight {191 (28_832_000 as Weight)192 .saturating_add(T::DbWeight::get().reads(3 as Weight))193 .saturating_add(T::DbWeight::get().writes(3 as Weight))194 }195 // Storage: Refungible Allowance (r:1 w:1)196 // Storage: Refungible Balance (r:2 w:2)197 // Storage: Refungible AccountBalance (r:1 w:1)198 // Storage: Refungible Owned (r:0 w:1)199 fn transfer_from_creating() -> Weight {200 (32_132_000 as Weight)201 .saturating_add(T::DbWeight::get().reads(4 as Weight))202 .saturating_add(T::DbWeight::get().writes(5 as Weight))203 }204 // Storage: Refungible Allowance (r:1 w:1)205 // Storage: Refungible Balance (r:2 w:2)206 // Storage: Refungible AccountBalance (r:1 w:1)207 // Storage: Refungible Owned (r:0 w:1)208 fn transfer_from_removing() -> Weight {209 (33_237_000 as Weight)210 .saturating_add(T::DbWeight::get().reads(4 as Weight))211 .saturating_add(T::DbWeight::get().writes(5 as Weight))212 }213 // Storage: Refungible Allowance (r:1 w:1)214 // Storage: Refungible Balance (r:2 w:2)215 // Storage: Refungible AccountBalance (r:2 w:2)216 // Storage: Refungible Owned (r:0 w:2)217 fn transfer_from_creating_removing() -> Weight {218 (36_399_000 as Weight)219 .saturating_add(T::DbWeight::get().reads(5 as Weight))220 .saturating_add(T::DbWeight::get().writes(7 as Weight))221 }222 // Storage: Refungible Allowance (r:1 w:1)223 // Storage: Refungible TotalSupply (r:1 w:1)224 // Storage: Refungible Balance (r:1 w:1)225 // Storage: Refungible AccountBalance (r:1 w:1)226 // Storage: Refungible TokensBurnt (r:1 w:1)227 // Storage: Refungible TokenData (r:0 w:1)228 // Storage: Refungible Owned (r:0 w:1)229 fn burn_from() -> Weight {230 (42_043_000 as Weight)231 .saturating_add(T::DbWeight::get().reads(5 as Weight))232 .saturating_add(T::DbWeight::get().writes(7 as Weight))233 }234 // Storage: Refungible TokenData (r:1 w:1)235 fn set_variable_metadata(_b: u32, ) -> Weight {236 (7_364_000 as Weight)237 .saturating_add(T::DbWeight::get().reads(1 as Weight))238 .saturating_add(T::DbWeight::get().writes(1 as Weight))239 }240}241242// For backwards compatibility and tests243impl WeightInfo for () {244 // Storage: Refungible TokensMinted (r:1 w:1)245 // Storage: Refungible AccountBalance (r:1 w:1)246 // Storage: Refungible Balance (r:0 w:1)247 // Storage: Refungible TotalSupply (r:0 w:1)248 // Storage: Refungible TokenData (r:0 w:1)249 // Storage: Refungible Owned (r:0 w:1)250 fn create_item() -> Weight {251 (21_255_000 as Weight)252 .saturating_add(RocksDbWeight::get().reads(2 as Weight))253 .saturating_add(RocksDbWeight::get().writes(6 as Weight))254 }255 // Storage: Refungible TokensMinted (r:1 w:1)256 // Storage: Refungible AccountBalance (r:1 w:1)257 // Storage: Refungible Balance (r:0 w:4)258 // Storage: Refungible TotalSupply (r:0 w:4)259 // Storage: Refungible TokenData (r:0 w:4)260 // Storage: Refungible Owned (r:0 w:4)261 fn create_multiple_items(b: u32, ) -> Weight {262 (18_052_000 as Weight)263 // Standard Error: 1_000264 .saturating_add((5_549_000 as Weight).saturating_mul(b as Weight))265 .saturating_add(RocksDbWeight::get().reads(2 as Weight))266 .saturating_add(RocksDbWeight::get().writes(2 as Weight))267 .saturating_add(RocksDbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))268 }269 // Storage: Refungible TokensMinted (r:1 w:1)270 // Storage: Refungible AccountBalance (r:4 w:4)271 // Storage: Refungible Balance (r:0 w:4)272 // Storage: Refungible TotalSupply (r:0 w:4)273 // Storage: Refungible TokenData (r:0 w:4)274 // Storage: Refungible Owned (r:0 w:4)275 fn create_multiple_items_ex_multiple_items(b: u32, ) -> Weight {276 (15_766_000 as Weight)277 // Standard Error: 2_000278 .saturating_add((8_187_000 as Weight).saturating_mul(b as Weight))279 .saturating_add(RocksDbWeight::get().reads(1 as Weight))280 .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))281 .saturating_add(RocksDbWeight::get().writes(1 as Weight))282 .saturating_add(RocksDbWeight::get().writes((5 as Weight).saturating_mul(b as Weight)))283 }284 // Storage: Refungible TokensMinted (r:1 w:1)285 // Storage: Refungible TotalSupply (r:0 w:1)286 // Storage: Refungible TokenData (r:0 w:1)287 // Storage: Refungible AccountBalance (r:4 w:4)288 // Storage: Refungible Balance (r:0 w:4)289 // Storage: Refungible Owned (r:0 w:4)290 fn create_multiple_items_ex_multiple_owners(b: u32, ) -> Weight {291 (5_675_000 as Weight)292 // Standard Error: 2_000293 .saturating_add((6_315_000 as Weight).saturating_mul(b as Weight))294 .saturating_add(RocksDbWeight::get().reads(1 as Weight))295 .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))296 .saturating_add(RocksDbWeight::get().writes(3 as Weight))297 .saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))298 }299 // Storage: Refungible TotalSupply (r:1 w:1)300 // Storage: Refungible Balance (r:1 w:1)301 // Storage: Refungible AccountBalance (r:1 w:1)302 // Storage: Refungible Owned (r:0 w:1)303 fn burn_item_partial() -> Weight {304 (23_518_000 as Weight)305 .saturating_add(RocksDbWeight::get().reads(3 as Weight))306 .saturating_add(RocksDbWeight::get().writes(4 as Weight))307 }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_item_fully() -> Weight {315 (32_489_000 as Weight)316 .saturating_add(RocksDbWeight::get().reads(4 as Weight))317 .saturating_add(RocksDbWeight::get().writes(6 as Weight))318 }319320 fn set_collection_properties(amount: u32) -> Weight {321 // Error322 0323 }324325 fn set_token_properties(amount: u32) -> Weight {326 // Error327 0328 }329330 fn set_property_permissions(amount: u32) -> Weight {331 // Error332 0333 }334335 // Storage: Refungible Balance (r:2 w:2)336 fn transfer_normal() -> Weight {337 (19_766_000 as Weight)338 .saturating_add(RocksDbWeight::get().reads(2 as Weight))339 .saturating_add(RocksDbWeight::get().writes(2 as Weight))340 }341 // Storage: Refungible Balance (r:2 w:2)342 // Storage: Refungible AccountBalance (r:1 w:1)343 // Storage: Refungible Owned (r:0 w:1)344 fn transfer_creating() -> Weight {345 (23_360_000 as Weight)346 .saturating_add(RocksDbWeight::get().reads(3 as Weight))347 .saturating_add(RocksDbWeight::get().writes(4 as Weight))348 }349 // Storage: Refungible Balance (r:2 w:2)350 // Storage: Refungible AccountBalance (r:1 w:1)351 // Storage: Refungible Owned (r:0 w:1)352 fn transfer_removing() -> Weight {353 (25_344_000 as Weight)354 .saturating_add(RocksDbWeight::get().reads(3 as Weight))355 .saturating_add(RocksDbWeight::get().writes(4 as Weight))356 }357 // Storage: Refungible Balance (r:2 w:2)358 // Storage: Refungible AccountBalance (r:2 w:2)359 // Storage: Refungible Owned (r:0 w:2)360 fn transfer_creating_removing() -> Weight {361 (28_553_000 as Weight)362 .saturating_add(RocksDbWeight::get().reads(4 as Weight))363 .saturating_add(RocksDbWeight::get().writes(6 as Weight))364 }365 // Storage: Refungible Balance (r:1 w:0)366 // Storage: Refungible Allowance (r:0 w:1)367 fn approve() -> Weight {368 (15_356_000 as Weight)369 .saturating_add(RocksDbWeight::get().reads(1 as Weight))370 .saturating_add(RocksDbWeight::get().writes(1 as Weight))371 }372 // Storage: Refungible Allowance (r:1 w:1)373 // Storage: Refungible Balance (r:2 w:2)374 fn transfer_from_normal() -> Weight {375 (28_832_000 as Weight)376 .saturating_add(RocksDbWeight::get().reads(3 as Weight))377 .saturating_add(RocksDbWeight::get().writes(3 as Weight))378 }379 // Storage: Refungible Allowance (r:1 w:1)380 // Storage: Refungible Balance (r:2 w:2)381 // Storage: Refungible AccountBalance (r:1 w:1)382 // Storage: Refungible Owned (r:0 w:1)383 fn transfer_from_creating() -> Weight {384 (32_132_000 as Weight)385 .saturating_add(RocksDbWeight::get().reads(4 as Weight))386 .saturating_add(RocksDbWeight::get().writes(5 as Weight))387 }388 // Storage: Refungible Allowance (r:1 w:1)389 // Storage: Refungible Balance (r:2 w:2)390 // Storage: Refungible AccountBalance (r:1 w:1)391 // Storage: Refungible Owned (r:0 w:1)392 fn transfer_from_removing() -> Weight {393 (33_237_000 as Weight)394 .saturating_add(RocksDbWeight::get().reads(4 as Weight))395 .saturating_add(RocksDbWeight::get().writes(5 as Weight))396 }397 // Storage: Refungible Allowance (r:1 w:1)398 // Storage: Refungible Balance (r:2 w:2)399 // Storage: Refungible AccountBalance (r:2 w:2)400 // Storage: Refungible Owned (r:0 w:2)401 fn transfer_from_creating_removing() -> Weight {402 (36_399_000 as Weight)403 .saturating_add(RocksDbWeight::get().reads(5 as Weight))404 .saturating_add(RocksDbWeight::get().writes(7 as Weight))405 }406 // Storage: Refungible Allowance (r:1 w:1)407 // Storage: Refungible TotalSupply (r:1 w:1)408 // Storage: Refungible Balance (r:1 w:1)409 // Storage: Refungible AccountBalance (r:1 w:1)410 // Storage: Refungible TokensBurnt (r:1 w:1)411 // Storage: Refungible TokenData (r:0 w:1)412 // Storage: Refungible Owned (r:0 w:1)413 fn burn_from() -> Weight {414 (42_043_000 as Weight)415 .saturating_add(RocksDbWeight::get().reads(5 as Weight))416 .saturating_add(RocksDbWeight::get().writes(7 as Weight))417 }418 // Storage: Refungible TokenData (r:1 w:1)419 fn set_variable_metadata(_b: u32, ) -> Weight {420 (7_364_000 as Weight)421 .saturating_add(RocksDbWeight::get().reads(1 as Weight))422 .saturating_add(RocksDbWeight::get().writes(1 as Weight))423 }424}pallets/unique/src/lib.rsdiffbeforeafterboth--- a/pallets/unique/src/lib.rs
+++ b/pallets/unique/src/lib.rs
@@ -694,9 +694,9 @@
dispatch_call::<T, _>(collection_id, |d| d.create_multiple_items(sender, owner, items_data, &budget))
}
- #[weight = T::CommonWeightInfo::change_collection_properties(properties.len() as u32)]
+ #[weight = T::CommonWeightInfo::set_collection_properties(properties.len() as u32)]
#[transactional]
- pub fn change_collection_properties(
+ pub fn set_collection_properties(
origin,
collection_id: CollectionId,
properties: Vec<Property>
@@ -705,12 +705,12 @@
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
- dispatch_call::<T, _>(collection_id, |d| d.change_collection_properties(sender, properties))
+ dispatch_call::<T, _>(collection_id, |d| d.set_collection_properties(sender, properties))
}
- #[weight = T::CommonWeightInfo::change_token_properties(properties.len() as u32)]
+ #[weight = T::CommonWeightInfo::set_token_properties(properties.len() as u32)]
#[transactional]
- pub fn change_token_properties(
+ pub fn set_token_properties(
origin,
collection_id: CollectionId,
token_id: TokenId,
@@ -720,12 +720,12 @@
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
- dispatch_call::<T, _>(collection_id, |d| d.change_token_properties(sender, token_id, properties))
+ dispatch_call::<T, _>(collection_id, |d| d.set_token_properties(sender, token_id, properties))
}
- #[weight = T::CommonWeightInfo::change_property_permissions(property_permissions.len() as u32)]
+ #[weight = T::CommonWeightInfo::set_property_permissions(property_permissions.len() as u32)]
#[transactional]
- pub fn change_property_permissions(
+ pub fn set_property_permissions(
origin,
collection_id: CollectionId,
property_permissions: Vec<PropertyKeyPermission>,
@@ -734,7 +734,7 @@
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
- dispatch_call::<T, _>(collection_id, |d| d.change_property_permissions(&sender, property_permissions))
+ dispatch_call::<T, _>(collection_id, |d| d.set_property_permissions(&sender, property_permissions))
}
#[weight = T::CommonWeightInfo::create_multiple_items_ex(&data)]
primitives/data-structs/src/lib.rsdiffbeforeafterboth--- a/primitives/data-structs/src/lib.rs
+++ b/primitives/data-structs/src/lib.rs
@@ -698,13 +698,13 @@
let mut props = Self::new(MAX_COLLECTION_PROPERTIES_SIZE);
for property in data.into_iter() {
- props.try_change_property(property)?;
+ props.try_set_property(property)?;
}
Ok(props)
}
- pub fn try_change_property(&mut self, property: Property) -> Result<(), PropertiesError> {
+ pub fn try_set_property(&mut self, property: Property) -> Result<(), PropertiesError> {
let value_len = property.value.len();
if self.consumed_space as usize + value_len > self.space_limit as usize {
@@ -740,17 +740,3 @@
Properties::new(MAX_TOKEN_PROPERTIES_SIZE)
}
}
-
-// #[cfg(not(feature = "std"))]
-// fn properties_map_debug(_properties: &PropertiesMap, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result {
-// write!(f, "<properties>")
-// }
-
-// #[cfg(not(feature = "std"))]
-// fn opt_properties_permissions_map_debug(properties: &Option<PropertiesPermissionMap>, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result {
-// if properties.is_some() {
-// write!(f, "Some(<properties permissions>)")
-// } else {
-// write!(f, "None")
-// }
-// }
runtime/common/src/weights.rsdiffbeforeafterboth--- a/runtime/common/src/weights.rs
+++ b/runtime/common/src/weights.rs
@@ -54,16 +54,16 @@
dispatch_weight::<T>() + max_weight_of!(burn_item())
}
- fn change_collection_properties(amount: u32) -> Weight {
- dispatch_weight::<T>() + max_weight_of!(change_collection_properties(amount))
+ fn set_collection_properties(amount: u32) -> Weight {
+ dispatch_weight::<T>() + max_weight_of!(set_collection_properties(amount))
}
- fn change_token_properties(amount: u32) -> Weight {
- dispatch_weight::<T>() + max_weight_of!(change_token_properties(amount))
+ fn set_token_properties(amount: u32) -> Weight {
+ dispatch_weight::<T>() + max_weight_of!(set_token_properties(amount))
}
- fn change_property_permissions(amount: u32) -> Weight {
- dispatch_weight::<T>() + max_weight_of!(change_property_permissions(amount))
+ fn set_property_permissions(amount: u32) -> Weight {
+ dispatch_weight::<T>() + max_weight_of!(set_property_permissions(amount))
}
fn transfer() -> Weight {