git.delta.rocks / unique-network / refs/commits / f2f19bf45d08

difftreelog

minor: add bechmarks for RFT collection & token properties

Trubnikov Sergey2022-07-20parent: #14be6d1.patch.diff
in: master

3 files changed

modifiedpallets/refungible/src/benchmarking.rsdiffbeforeafterboth
18use crate::{Pallet, Config, RefungibleHandle};18use crate::{Pallet, Config, RefungibleHandle};
1919
20use sp_std::prelude::*;20use sp_std::prelude::*;
21use pallet_common::benchmarking::{create_collection_raw, create_data};21use pallet_common::benchmarking::{create_collection_raw, property_key, property_value, create_data};
22use frame_benchmarking::{benchmarks, account};22use frame_benchmarking::{benchmarks, account};
23use up_data_structs::{CollectionMode, MAX_ITEMS_PER_BATCH, CUSTOM_DATA_LIMIT, budget::Unlimited};23use up_data_structs::{CollectionMode, MAX_ITEMS_PER_BATCH, MAX_PROPERTIES_PER_ITEM, CUSTOM_DATA_LIMIT, budget::Unlimited};
24use pallet_common::bench_init;24use pallet_common::bench_init;
25use core::convert::TryInto;25use core::convert::TryInto;
26use core::iter::IntoIterator;26use core::iter::IntoIterator;
205 <Pallet<T>>::set_allowance(&collection, &sender, &burner, item, 200)?;205 <Pallet<T>>::set_allowance(&collection, &sender, &burner, item, 200)?;
206 }: {<Pallet<T>>::burn_from(&collection, &burner, &sender, item, 200, &Unlimited)?}206 }: {<Pallet<T>>::burn_from(&collection, &burner, &sender, item, 200, &Unlimited)?}
207
208 set_token_property_permissions {
209 let b in 0..MAX_PROPERTIES_PER_ITEM;
210 bench_init!{
211 owner: sub; collection: collection(owner);
212 owner: cross_from_sub;
213 };
214 let perms = (0..b).map(|k| PropertyKeyPermission {
215 key: property_key(k as usize),
216 permission: PropertyPermission {
217 mutable: false,
218 collection_admin: false,
219 token_owner: false,
220 },
221 }).collect::<Vec<_>>();
222 }: {<Pallet<T>>::set_token_property_permissions(&collection, &owner, perms)?}
223
224 set_token_properties {
225 let b in 0..MAX_PROPERTIES_PER_ITEM;
226 bench_init!{
227 owner: sub; collection: collection(owner);
228 owner: cross_from_sub;
229 };
230 let perms = (0..b).map(|k| PropertyKeyPermission {
231 key: property_key(k as usize),
232 permission: PropertyPermission {
233 mutable: false,
234 collection_admin: true,
235 token_owner: true,
236 },
237 }).collect::<Vec<_>>();
238 <Pallet<T>>::set_token_property_permissions(&collection, &owner, perms)?;
239 let props = (0..b).map(|k| Property {
240 key: property_key(k as usize),
241 value: property_value(),
242 }).collect::<Vec<_>>();
243 let item = create_max_item(&collection, &owner, [(owner.clone(), 200)])?;
244 }: {<Pallet<T>>::set_token_properties(&collection, &owner, item, props.into_iter(), false, &Unlimited)?}
245
246 delete_token_properties {
247 let b in 0..MAX_PROPERTIES_PER_ITEM;
248 bench_init!{
249 owner: sub; collection: collection(owner);
250 owner: cross_from_sub;
251 };
252 let perms = (0..b).map(|k| PropertyKeyPermission {
253 key: property_key(k as usize),
254 permission: PropertyPermission {
255 mutable: true,
256 collection_admin: true,
257 token_owner: true,
258 },
259 }).collect::<Vec<_>>();
260 <Pallet<T>>::set_token_property_permissions(&collection, &owner, perms)?;
261 let props = (0..b).map(|k| Property {
262 key: property_key(k as usize),
263 value: property_value(),
264 }).collect::<Vec<_>>();
265 let item = create_max_item(&collection, &owner, [(owner.clone(), 200)])?;
266 <Pallet<T>>::set_token_properties(&collection, &owner, item, props.into_iter(), false, &Unlimited)?;
267 let to_delete = (0..b).map(|k| property_key(k as usize)).collect::<Vec<_>>();
268 }: {<Pallet<T>>::delete_token_properties(&collection, &owner, item, to_delete.into_iter(), &Unlimited)?}
207269
208 repartition_item {270 repartition_item {
209 bench_init!{271 bench_init!{
modifiedpallets/refungible/src/common.rsdiffbeforeafterboth
22 CollectionId, TokenId, CreateItemExData, CreateRefungibleExData, budget::Budget, Property,22 CollectionId, TokenId, CreateItemExData, CreateRefungibleExData, budget::Budget, Property,
23 PropertyKey, PropertyValue, PropertyKeyPermission, CreateItemData,23 PropertyKey, PropertyValue, PropertyKeyPermission, CreateItemData,
24};24};
25use pallet_common::{CommonCollectionOperations, CommonWeightInfo, RefungibleExtensions, with_weight};25use pallet_common::{CommonCollectionOperations, CommonWeightInfo, RefungibleExtensions, with_weight, weights::WeightInfo as _};
26use pallet_structure::Error as StructureError;26use pallet_structure::Error as StructureError;
27use sp_runtime::{DispatchError};27use sp_runtime::{DispatchError};
28use sp_std::{vec::Vec, vec};28use sp_std::{vec::Vec, vec};
67 max_weight_of!(burn_item_partial(), burn_item_fully())67 max_weight_of!(burn_item_partial(), burn_item_fully())
68 }68 }
6969
70 fn set_collection_properties(_amount: u32) -> Weight {70 fn set_collection_properties(amount: u32) -> Weight {
71 // Error71 <pallet_common::SelfWeightOf<T>>::set_collection_properties(amount)
72 0
73 }72 }
7473
75 fn delete_collection_properties(_amount: u32) -> Weight {74 fn delete_collection_properties(amount: u32) -> Weight {
76 // Error75 <pallet_common::SelfWeightOf<T>>::delete_collection_properties(amount)
77 0
78 }76 }
7977
80 fn set_token_properties(_amount: u32) -> Weight {78 fn set_token_properties(amount: u32) -> Weight {
81 // Error79 <SelfWeightOf<T>>::set_token_properties(amount)
82 0
83 }80 }
8481
85 fn delete_token_properties(_amount: u32) -> Weight {82 fn delete_token_properties(amount: u32) -> Weight {
86 // Error83 <SelfWeightOf<T>>::delete_token_properties(amount)
87 0
88 }84 }
8985
90 fn set_token_property_permissions(_amount: u32) -> Weight {86 fn set_token_property_permissions(amount: u32) -> Weight {
91 // Error87 <SelfWeightOf<T>>::set_token_property_permissions(amount)
92 0
93 }88 }
9489
95 fn transfer() -> Weight {90 fn transfer() -> Weight {
modifiedpallets/refungible/src/weights.rsdiffbeforeafterboth
3//! Autogenerated weights for pallet_refungible3//! Autogenerated weights for pallet_refungible
4//!4//!
5//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev5//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
6//! DATE: 2022-06-27, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`6//! DATE: 2022-07-20, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`
7//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 10247//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
88
9// Executed Command:9// Executed Command:
49 fn transfer_from_removing() -> Weight;49 fn transfer_from_removing() -> Weight;
50 fn transfer_from_creating_removing() -> Weight;50 fn transfer_from_creating_removing() -> Weight;
51 fn burn_from() -> Weight;51 fn burn_from() -> Weight;
52 fn set_token_property_permissions(b: u32, ) -> Weight;
53 fn set_token_properties(b: u32, ) -> Weight;
54 fn delete_token_properties(b: u32, ) -> Weight;
52 fn repartition_item() -> Weight;55 fn repartition_item() -> Weight;
53}56}
5457
62 // Storage: Refungible TokenData (r:0 w:1)65 // Storage: Refungible TokenData (r:0 w:1)
63 // Storage: Refungible Owned (r:0 w:1)66 // Storage: Refungible Owned (r:0 w:1)
64 fn create_item() -> Weight {67 fn create_item() -> Weight {
65 (17_553_000 as Weight)68 (21_310_000 as Weight)
66 .saturating_add(T::DbWeight::get().reads(2 as Weight))69 .saturating_add(T::DbWeight::get().reads(2 as Weight))
67 .saturating_add(T::DbWeight::get().writes(6 as Weight))70 .saturating_add(T::DbWeight::get().writes(6 as Weight))
68 }71 }
73 // Storage: Refungible TokenData (r:0 w:4)76 // Storage: Refungible TokenData (r:0 w:4)
74 // Storage: Refungible Owned (r:0 w:4)77 // Storage: Refungible Owned (r:0 w:4)
75 fn create_multiple_items(b: u32, ) -> Weight {78 fn create_multiple_items(b: u32, ) -> Weight {
76 (10_654_000 as Weight)79 (9_552_000 as Weight)
77 // Standard Error: 1_00080 // Standard Error: 2_000
78 .saturating_add((5_114_000 as Weight).saturating_mul(b as Weight))81 .saturating_add((7_056_000 as Weight).saturating_mul(b as Weight))
79 .saturating_add(T::DbWeight::get().reads(2 as Weight))82 .saturating_add(T::DbWeight::get().reads(2 as Weight))
80 .saturating_add(T::DbWeight::get().writes(2 as Weight))83 .saturating_add(T::DbWeight::get().writes(2 as Weight))
81 .saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))84 .saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))
87 // Storage: Refungible TokenData (r:0 w:4)90 // Storage: Refungible TokenData (r:0 w:4)
88 // Storage: Refungible Owned (r:0 w:4)91 // Storage: Refungible Owned (r:0 w:4)
89 fn create_multiple_items_ex_multiple_items(b: u32, ) -> Weight {92 fn create_multiple_items_ex_multiple_items(b: u32, ) -> Weight {
90 (3_587_000 as Weight)93 (4_857_000 as Weight)
91 // Standard Error: 2_00094 // Standard Error: 2_000
92 .saturating_add((7_931_000 as Weight).saturating_mul(b as Weight))95 .saturating_add((9_838_000 as Weight).saturating_mul(b as Weight))
93 .saturating_add(T::DbWeight::get().reads(1 as Weight))96 .saturating_add(T::DbWeight::get().reads(1 as Weight))
94 .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))97 .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))
95 .saturating_add(T::DbWeight::get().writes(1 as Weight))98 .saturating_add(T::DbWeight::get().writes(1 as Weight))
102 // Storage: Refungible Balance (r:0 w:4)105 // Storage: Refungible Balance (r:0 w:4)
103 // Storage: Refungible Owned (r:0 w:4)106 // Storage: Refungible Owned (r:0 w:4)
104 fn create_multiple_items_ex_multiple_owners(b: u32, ) -> Weight {107 fn create_multiple_items_ex_multiple_owners(b: u32, ) -> Weight {
105 (1_980_000 as Weight)108 (11_335_000 as Weight)
106 // Standard Error: 2_000109 // Standard Error: 2_000
107 .saturating_add((6_305_000 as Weight).saturating_mul(b as Weight))110 .saturating_add((6_784_000 as Weight).saturating_mul(b as Weight))
108 .saturating_add(T::DbWeight::get().reads(1 as Weight))111 .saturating_add(T::DbWeight::get().reads(1 as Weight))
109 .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))112 .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))
110 .saturating_add(T::DbWeight::get().writes(3 as Weight))113 .saturating_add(T::DbWeight::get().writes(3 as Weight))
115 // Storage: Refungible AccountBalance (r:1 w:1)118 // Storage: Refungible AccountBalance (r:1 w:1)
116 // Storage: Refungible Owned (r:0 w:1)119 // Storage: Refungible Owned (r:0 w:1)
117 fn burn_item_partial() -> Weight {120 fn burn_item_partial() -> Weight {
118 (21_010_000 as Weight)121 (21_239_000 as Weight)
119 .saturating_add(T::DbWeight::get().reads(3 as Weight))122 .saturating_add(T::DbWeight::get().reads(3 as Weight))
120 .saturating_add(T::DbWeight::get().writes(4 as Weight))123 .saturating_add(T::DbWeight::get().writes(4 as Weight))
121 }124 }
125 // Storage: Refungible TokensBurnt (r:1 w:1)128 // Storage: Refungible TokensBurnt (r:1 w:1)
126 // Storage: Refungible TokenData (r:0 w:1)129 // Storage: Refungible TokenData (r:0 w:1)
127 // Storage: Refungible Owned (r:0 w:1)130 // Storage: Refungible Owned (r:0 w:1)
131 // Storage: Refungible TokenProperties (r:0 w:1)
128 fn burn_item_fully() -> Weight {132 fn burn_item_fully() -> Weight {
129 (28_413_000 as Weight)133 (29_426_000 as Weight)
130 .saturating_add(T::DbWeight::get().reads(4 as Weight))134 .saturating_add(T::DbWeight::get().reads(4 as Weight))
131 .saturating_add(T::DbWeight::get().writes(6 as Weight))135 .saturating_add(T::DbWeight::get().writes(7 as Weight))
132 }136 }
133 // Storage: Refungible Balance (r:2 w:2)137 // Storage: Refungible Balance (r:2 w:2)
134 fn transfer_normal() -> Weight {138 fn transfer_normal() -> Weight {
135 (17_513_000 as Weight)139 (17_743_000 as Weight)
136 .saturating_add(T::DbWeight::get().reads(2 as Weight))140 .saturating_add(T::DbWeight::get().reads(2 as Weight))
137 .saturating_add(T::DbWeight::get().writes(2 as Weight))141 .saturating_add(T::DbWeight::get().writes(2 as Weight))
138 }142 }
139 // Storage: Refungible Balance (r:2 w:2)143 // Storage: Refungible Balance (r:2 w:2)
140 // Storage: Refungible AccountBalance (r:1 w:1)144 // Storage: Refungible AccountBalance (r:1 w:1)
141 // Storage: Refungible Owned (r:0 w:1)145 // Storage: Refungible Owned (r:0 w:1)
142 fn transfer_creating() -> Weight {146 fn transfer_creating() -> Weight {
143 (20_469_000 as Weight)147 (20_699_000 as Weight)
144 .saturating_add(T::DbWeight::get().reads(3 as Weight))148 .saturating_add(T::DbWeight::get().reads(3 as Weight))
145 .saturating_add(T::DbWeight::get().writes(4 as Weight))149 .saturating_add(T::DbWeight::get().writes(4 as Weight))
146 }150 }
147 // Storage: Refungible Balance (r:2 w:2)151 // Storage: Refungible Balance (r:2 w:2)
148 // Storage: Refungible AccountBalance (r:1 w:1)152 // Storage: Refungible AccountBalance (r:1 w:1)
149 // Storage: Refungible Owned (r:0 w:1)153 // Storage: Refungible Owned (r:0 w:1)
150 fn transfer_removing() -> Weight {154 fn transfer_removing() -> Weight {
151 (22_472_000 as Weight)155 (22_833_000 as Weight)
152 .saturating_add(T::DbWeight::get().reads(3 as Weight))156 .saturating_add(T::DbWeight::get().reads(3 as Weight))
153 .saturating_add(T::DbWeight::get().writes(4 as Weight))157 .saturating_add(T::DbWeight::get().writes(4 as Weight))
154 }158 }
155 // Storage: Refungible Balance (r:2 w:2)159 // Storage: Refungible Balance (r:2 w:2)
156 // Storage: Refungible AccountBalance (r:2 w:2)160 // Storage: Refungible AccountBalance (r:2 w:2)
157 // Storage: Refungible Owned (r:0 w:2)161 // Storage: Refungible Owned (r:0 w:2)
158 fn transfer_creating_removing() -> Weight {162 fn transfer_creating_removing() -> Weight {
159 (24_866_000 as Weight)163 (24_936_000 as Weight)
160 .saturating_add(T::DbWeight::get().reads(4 as Weight))164 .saturating_add(T::DbWeight::get().reads(4 as Weight))
161 .saturating_add(T::DbWeight::get().writes(6 as Weight))165 .saturating_add(T::DbWeight::get().writes(6 as Weight))
162 }166 }
163 // Storage: Refungible Balance (r:1 w:0)167 // Storage: Refungible Balance (r:1 w:0)
164 // Storage: Refungible Allowance (r:0 w:1)168 // Storage: Refungible Allowance (r:0 w:1)
165 fn approve() -> Weight {169 fn approve() -> Weight {
166 (13_475_000 as Weight)170 (13_446_000 as Weight)
167 .saturating_add(T::DbWeight::get().reads(1 as Weight))171 .saturating_add(T::DbWeight::get().reads(1 as Weight))
168 .saturating_add(T::DbWeight::get().writes(1 as Weight))172 .saturating_add(T::DbWeight::get().writes(1 as Weight))
169 }173 }
170 // Storage: Refungible Allowance (r:1 w:1)174 // Storage: Refungible Allowance (r:1 w:1)
171 // Storage: Refungible Balance (r:2 w:2)175 // Storage: Refungible Balance (r:2 w:2)
172 fn transfer_from_normal() -> Weight {176 fn transfer_from_normal() -> Weight {
173 (24_707_000 as Weight)177 (24_777_000 as Weight)
174 .saturating_add(T::DbWeight::get().reads(3 as Weight))178 .saturating_add(T::DbWeight::get().reads(3 as Weight))
175 .saturating_add(T::DbWeight::get().writes(3 as Weight))179 .saturating_add(T::DbWeight::get().writes(3 as Weight))
176 }180 }
179 // Storage: Refungible AccountBalance (r:1 w:1)183 // Storage: Refungible AccountBalance (r:1 w:1)
180 // Storage: Refungible Owned (r:0 w:1)184 // Storage: Refungible Owned (r:0 w:1)
181 fn transfer_from_creating() -> Weight {185 fn transfer_from_creating() -> Weight {
182 (27_812_000 as Weight)186 (28_483_000 as Weight)
183 .saturating_add(T::DbWeight::get().reads(4 as Weight))187 .saturating_add(T::DbWeight::get().reads(4 as Weight))
184 .saturating_add(T::DbWeight::get().writes(5 as Weight))188 .saturating_add(T::DbWeight::get().writes(5 as Weight))
185 }189 }
188 // Storage: Refungible AccountBalance (r:1 w:1)192 // Storage: Refungible AccountBalance (r:1 w:1)
189 // Storage: Refungible Owned (r:0 w:1)193 // Storage: Refungible Owned (r:0 w:1)
190 fn transfer_from_removing() -> Weight {194 fn transfer_from_removing() -> Weight {
191 (29_966_000 as Weight)195 (29_896_000 as Weight)
192 .saturating_add(T::DbWeight::get().reads(4 as Weight))196 .saturating_add(T::DbWeight::get().reads(4 as Weight))
193 .saturating_add(T::DbWeight::get().writes(5 as Weight))197 .saturating_add(T::DbWeight::get().writes(5 as Weight))
194 }198 }
197 // Storage: Refungible AccountBalance (r:2 w:2)201 // Storage: Refungible AccountBalance (r:2 w:2)
198 // Storage: Refungible Owned (r:0 w:2)202 // Storage: Refungible Owned (r:0 w:2)
199 fn transfer_from_creating_removing() -> Weight {203 fn transfer_from_creating_removing() -> Weight {
200 (31_660_000 as Weight)204 (32_070_000 as Weight)
201 .saturating_add(T::DbWeight::get().reads(5 as Weight))205 .saturating_add(T::DbWeight::get().reads(5 as Weight))
202 .saturating_add(T::DbWeight::get().writes(7 as Weight))206 .saturating_add(T::DbWeight::get().writes(7 as Weight))
203 }207 }
208 // Storage: Refungible TokensBurnt (r:1 w:1)212 // Storage: Refungible TokensBurnt (r:1 w:1)
209 // Storage: Refungible TokenData (r:0 w:1)213 // Storage: Refungible TokenData (r:0 w:1)
210 // Storage: Refungible Owned (r:0 w:1)214 // Storage: Refungible Owned (r:0 w:1)
215 // Storage: Refungible TokenProperties (r:0 w:1)
211 fn burn_from() -> Weight {216 fn burn_from() -> Weight {
212 (36_248_000 as Weight)217 (36_789_000 as Weight)
213 .saturating_add(T::DbWeight::get().reads(5 as Weight))218 .saturating_add(T::DbWeight::get().reads(5 as Weight))
214 .saturating_add(T::DbWeight::get().writes(7 as Weight))219 .saturating_add(T::DbWeight::get().writes(8 as Weight))
215 }220 }
221 // Storage: Common CollectionPropertyPermissions (r:1 w:1)
222 fn set_token_property_permissions(b: u32, ) -> Weight {
223 (0 as Weight)
224 // Standard Error: 62_000
225 .saturating_add((15_803_000 as Weight).saturating_mul(b as Weight))
226 .saturating_add(T::DbWeight::get().reads(1 as Weight))
227 .saturating_add(T::DbWeight::get().writes(1 as Weight))
228 }
229 // Storage: Common CollectionPropertyPermissions (r:1 w:0)
230 // Storage: Refungible TokenProperties (r:1 w:1)
231 fn set_token_properties(b: u32, ) -> Weight {
232 (0 as Weight)
233 // Standard Error: 1_668_000
234 .saturating_add((302_308_000 as Weight).saturating_mul(b as Weight))
235 .saturating_add(T::DbWeight::get().reads(2 as Weight))
236 .saturating_add(T::DbWeight::get().writes(1 as Weight))
237 }
238 // Storage: Common CollectionPropertyPermissions (r:1 w:0)
239 // Storage: Refungible TokenProperties (r:1 w:1)
240 fn delete_token_properties(b: u32, ) -> Weight {
241 (0 as Weight)
242 // Standard Error: 1_619_000
243 .saturating_add((294_574_000 as Weight).saturating_mul(b as Weight))
244 .saturating_add(T::DbWeight::get().reads(2 as Weight))
245 .saturating_add(T::DbWeight::get().writes(1 as Weight))
246 }
216 // Storage: Refungible TotalSupply (r:1 w:1)247 // Storage: Refungible TotalSupply (r:1 w:1)
217 // Storage: Refungible Balance (r:1 w:1)248 // Storage: Refungible Balance (r:1 w:1)
218 fn repartition_item() -> Weight {249 fn repartition_item() -> Weight {
219 (8_226_000 as Weight)250 (8_325_000 as Weight)
220 .saturating_add(T::DbWeight::get().reads(2 as Weight))251 .saturating_add(T::DbWeight::get().reads(2 as Weight))
221 .saturating_add(T::DbWeight::get().writes(2 as Weight))252 .saturating_add(T::DbWeight::get().writes(2 as Weight))
222 }253 }
231 // Storage: Refungible TokenData (r:0 w:1)262 // Storage: Refungible TokenData (r:0 w:1)
232 // Storage: Refungible Owned (r:0 w:1)263 // Storage: Refungible Owned (r:0 w:1)
233 fn create_item() -> Weight {264 fn create_item() -> Weight {
234 (17_553_000 as Weight)265 (21_310_000 as Weight)
235 .saturating_add(RocksDbWeight::get().reads(2 as Weight))266 .saturating_add(RocksDbWeight::get().reads(2 as Weight))
236 .saturating_add(RocksDbWeight::get().writes(6 as Weight))267 .saturating_add(RocksDbWeight::get().writes(6 as Weight))
237 }268 }
242 // Storage: Refungible TokenData (r:0 w:4)273 // Storage: Refungible TokenData (r:0 w:4)
243 // Storage: Refungible Owned (r:0 w:4)274 // Storage: Refungible Owned (r:0 w:4)
244 fn create_multiple_items(b: u32, ) -> Weight {275 fn create_multiple_items(b: u32, ) -> Weight {
245 (10_654_000 as Weight)276 (9_552_000 as Weight)
246 // Standard Error: 1_000277 // Standard Error: 2_000
247 .saturating_add((5_114_000 as Weight).saturating_mul(b as Weight))278 .saturating_add((7_056_000 as Weight).saturating_mul(b as Weight))
248 .saturating_add(RocksDbWeight::get().reads(2 as Weight))279 .saturating_add(RocksDbWeight::get().reads(2 as Weight))
249 .saturating_add(RocksDbWeight::get().writes(2 as Weight))280 .saturating_add(RocksDbWeight::get().writes(2 as Weight))
250 .saturating_add(RocksDbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))281 .saturating_add(RocksDbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))
256 // Storage: Refungible TokenData (r:0 w:4)287 // Storage: Refungible TokenData (r:0 w:4)
257 // Storage: Refungible Owned (r:0 w:4)288 // Storage: Refungible Owned (r:0 w:4)
258 fn create_multiple_items_ex_multiple_items(b: u32, ) -> Weight {289 fn create_multiple_items_ex_multiple_items(b: u32, ) -> Weight {
259 (3_587_000 as Weight)290 (4_857_000 as Weight)
260 // Standard Error: 2_000291 // Standard Error: 2_000
261 .saturating_add((7_931_000 as Weight).saturating_mul(b as Weight))292 .saturating_add((9_838_000 as Weight).saturating_mul(b as Weight))
262 .saturating_add(RocksDbWeight::get().reads(1 as Weight))293 .saturating_add(RocksDbWeight::get().reads(1 as Weight))
263 .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))294 .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))
264 .saturating_add(RocksDbWeight::get().writes(1 as Weight))295 .saturating_add(RocksDbWeight::get().writes(1 as Weight))
271 // Storage: Refungible Balance (r:0 w:4)302 // Storage: Refungible Balance (r:0 w:4)
272 // Storage: Refungible Owned (r:0 w:4)303 // Storage: Refungible Owned (r:0 w:4)
273 fn create_multiple_items_ex_multiple_owners(b: u32, ) -> Weight {304 fn create_multiple_items_ex_multiple_owners(b: u32, ) -> Weight {
274 (1_980_000 as Weight)305 (11_335_000 as Weight)
275 // Standard Error: 2_000306 // Standard Error: 2_000
276 .saturating_add((6_305_000 as Weight).saturating_mul(b as Weight))307 .saturating_add((6_784_000 as Weight).saturating_mul(b as Weight))
277 .saturating_add(RocksDbWeight::get().reads(1 as Weight))308 .saturating_add(RocksDbWeight::get().reads(1 as Weight))
278 .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))309 .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))
279 .saturating_add(RocksDbWeight::get().writes(3 as Weight))310 .saturating_add(RocksDbWeight::get().writes(3 as Weight))
284 // Storage: Refungible AccountBalance (r:1 w:1)315 // Storage: Refungible AccountBalance (r:1 w:1)
285 // Storage: Refungible Owned (r:0 w:1)316 // Storage: Refungible Owned (r:0 w:1)
286 fn burn_item_partial() -> Weight {317 fn burn_item_partial() -> Weight {
287 (21_010_000 as Weight)318 (21_239_000 as Weight)
288 .saturating_add(RocksDbWeight::get().reads(3 as Weight))319 .saturating_add(RocksDbWeight::get().reads(3 as Weight))
289 .saturating_add(RocksDbWeight::get().writes(4 as Weight))320 .saturating_add(RocksDbWeight::get().writes(4 as Weight))
290 }321 }
294 // Storage: Refungible TokensBurnt (r:1 w:1)325 // Storage: Refungible TokensBurnt (r:1 w:1)
295 // Storage: Refungible TokenData (r:0 w:1)326 // Storage: Refungible TokenData (r:0 w:1)
296 // Storage: Refungible Owned (r:0 w:1)327 // Storage: Refungible Owned (r:0 w:1)
328 // Storage: Refungible TokenProperties (r:0 w:1)
297 fn burn_item_fully() -> Weight {329 fn burn_item_fully() -> Weight {
298 (28_413_000 as Weight)330 (29_426_000 as Weight)
299 .saturating_add(RocksDbWeight::get().reads(4 as Weight))331 .saturating_add(RocksDbWeight::get().reads(4 as Weight))
300 .saturating_add(RocksDbWeight::get().writes(6 as Weight))332 .saturating_add(RocksDbWeight::get().writes(7 as Weight))
301 }333 }
302 // Storage: Refungible Balance (r:2 w:2)334 // Storage: Refungible Balance (r:2 w:2)
303 fn transfer_normal() -> Weight {335 fn transfer_normal() -> Weight {
304 (17_513_000 as Weight)336 (17_743_000 as Weight)
305 .saturating_add(RocksDbWeight::get().reads(2 as Weight))337 .saturating_add(RocksDbWeight::get().reads(2 as Weight))
306 .saturating_add(RocksDbWeight::get().writes(2 as Weight))338 .saturating_add(RocksDbWeight::get().writes(2 as Weight))
307 }339 }
308 // Storage: Refungible Balance (r:2 w:2)340 // Storage: Refungible Balance (r:2 w:2)
309 // Storage: Refungible AccountBalance (r:1 w:1)341 // Storage: Refungible AccountBalance (r:1 w:1)
310 // Storage: Refungible Owned (r:0 w:1)342 // Storage: Refungible Owned (r:0 w:1)
311 fn transfer_creating() -> Weight {343 fn transfer_creating() -> Weight {
312 (20_469_000 as Weight)344 (20_699_000 as Weight)
313 .saturating_add(RocksDbWeight::get().reads(3 as Weight))345 .saturating_add(RocksDbWeight::get().reads(3 as Weight))
314 .saturating_add(RocksDbWeight::get().writes(4 as Weight))346 .saturating_add(RocksDbWeight::get().writes(4 as Weight))
315 }347 }
316 // Storage: Refungible Balance (r:2 w:2)348 // Storage: Refungible Balance (r:2 w:2)
317 // Storage: Refungible AccountBalance (r:1 w:1)349 // Storage: Refungible AccountBalance (r:1 w:1)
318 // Storage: Refungible Owned (r:0 w:1)350 // Storage: Refungible Owned (r:0 w:1)
319 fn transfer_removing() -> Weight {351 fn transfer_removing() -> Weight {
320 (22_472_000 as Weight)352 (22_833_000 as Weight)
321 .saturating_add(RocksDbWeight::get().reads(3 as Weight))353 .saturating_add(RocksDbWeight::get().reads(3 as Weight))
322 .saturating_add(RocksDbWeight::get().writes(4 as Weight))354 .saturating_add(RocksDbWeight::get().writes(4 as Weight))
323 }355 }
324 // Storage: Refungible Balance (r:2 w:2)356 // Storage: Refungible Balance (r:2 w:2)
325 // Storage: Refungible AccountBalance (r:2 w:2)357 // Storage: Refungible AccountBalance (r:2 w:2)
326 // Storage: Refungible Owned (r:0 w:2)358 // Storage: Refungible Owned (r:0 w:2)
327 fn transfer_creating_removing() -> Weight {359 fn transfer_creating_removing() -> Weight {
328 (24_866_000 as Weight)360 (24_936_000 as Weight)
329 .saturating_add(RocksDbWeight::get().reads(4 as Weight))361 .saturating_add(RocksDbWeight::get().reads(4 as Weight))
330 .saturating_add(RocksDbWeight::get().writes(6 as Weight))362 .saturating_add(RocksDbWeight::get().writes(6 as Weight))
331 }363 }
332 // Storage: Refungible Balance (r:1 w:0)364 // Storage: Refungible Balance (r:1 w:0)
333 // Storage: Refungible Allowance (r:0 w:1)365 // Storage: Refungible Allowance (r:0 w:1)
334 fn approve() -> Weight {366 fn approve() -> Weight {
335 (13_475_000 as Weight)367 (13_446_000 as Weight)
336 .saturating_add(RocksDbWeight::get().reads(1 as Weight))368 .saturating_add(RocksDbWeight::get().reads(1 as Weight))
337 .saturating_add(RocksDbWeight::get().writes(1 as Weight))369 .saturating_add(RocksDbWeight::get().writes(1 as Weight))
338 }370 }
339 // Storage: Refungible Allowance (r:1 w:1)371 // Storage: Refungible Allowance (r:1 w:1)
340 // Storage: Refungible Balance (r:2 w:2)372 // Storage: Refungible Balance (r:2 w:2)
341 fn transfer_from_normal() -> Weight {373 fn transfer_from_normal() -> Weight {
342 (24_707_000 as Weight)374 (24_777_000 as Weight)
343 .saturating_add(RocksDbWeight::get().reads(3 as Weight))375 .saturating_add(RocksDbWeight::get().reads(3 as Weight))
344 .saturating_add(RocksDbWeight::get().writes(3 as Weight))376 .saturating_add(RocksDbWeight::get().writes(3 as Weight))
345 }377 }
348 // Storage: Refungible AccountBalance (r:1 w:1)380 // Storage: Refungible AccountBalance (r:1 w:1)
349 // Storage: Refungible Owned (r:0 w:1)381 // Storage: Refungible Owned (r:0 w:1)
350 fn transfer_from_creating() -> Weight {382 fn transfer_from_creating() -> Weight {
351 (27_812_000 as Weight)383 (28_483_000 as Weight)
352 .saturating_add(RocksDbWeight::get().reads(4 as Weight))384 .saturating_add(RocksDbWeight::get().reads(4 as Weight))
353 .saturating_add(RocksDbWeight::get().writes(5 as Weight))385 .saturating_add(RocksDbWeight::get().writes(5 as Weight))
354 }386 }
357 // Storage: Refungible AccountBalance (r:1 w:1)389 // Storage: Refungible AccountBalance (r:1 w:1)
358 // Storage: Refungible Owned (r:0 w:1)390 // Storage: Refungible Owned (r:0 w:1)
359 fn transfer_from_removing() -> Weight {391 fn transfer_from_removing() -> Weight {
360 (29_966_000 as Weight)392 (29_896_000 as Weight)
361 .saturating_add(RocksDbWeight::get().reads(4 as Weight))393 .saturating_add(RocksDbWeight::get().reads(4 as Weight))
362 .saturating_add(RocksDbWeight::get().writes(5 as Weight))394 .saturating_add(RocksDbWeight::get().writes(5 as Weight))
363 }395 }
366 // Storage: Refungible AccountBalance (r:2 w:2)398 // Storage: Refungible AccountBalance (r:2 w:2)
367 // Storage: Refungible Owned (r:0 w:2)399 // Storage: Refungible Owned (r:0 w:2)
368 fn transfer_from_creating_removing() -> Weight {400 fn transfer_from_creating_removing() -> Weight {
369 (31_660_000 as Weight)401 (32_070_000 as Weight)
370 .saturating_add(RocksDbWeight::get().reads(5 as Weight))402 .saturating_add(RocksDbWeight::get().reads(5 as Weight))
371 .saturating_add(RocksDbWeight::get().writes(7 as Weight))403 .saturating_add(RocksDbWeight::get().writes(7 as Weight))
372 }404 }
377 // Storage: Refungible TokensBurnt (r:1 w:1)409 // Storage: Refungible TokensBurnt (r:1 w:1)
378 // Storage: Refungible TokenData (r:0 w:1)410 // Storage: Refungible TokenData (r:0 w:1)
379 // Storage: Refungible Owned (r:0 w:1)411 // Storage: Refungible Owned (r:0 w:1)
412 // Storage: Refungible TokenProperties (r:0 w:1)
380 fn burn_from() -> Weight {413 fn burn_from() -> Weight {
381 (36_248_000 as Weight)414 (36_789_000 as Weight)
382 .saturating_add(RocksDbWeight::get().reads(5 as Weight))415 .saturating_add(RocksDbWeight::get().reads(5 as Weight))
383 .saturating_add(RocksDbWeight::get().writes(7 as Weight))416 .saturating_add(RocksDbWeight::get().writes(8 as Weight))
417 }
418 // Storage: Common CollectionPropertyPermissions (r:1 w:1)
419 fn set_token_property_permissions(b: u32, ) -> Weight {
420 (0 as Weight)
421 // Standard Error: 62_000
422 .saturating_add((15_803_000 as Weight).saturating_mul(b as Weight))
423 .saturating_add(RocksDbWeight::get().reads(1 as Weight))
424 .saturating_add(RocksDbWeight::get().writes(1 as Weight))
425 }
426 // Storage: Common CollectionPropertyPermissions (r:1 w:0)
427 // Storage: Refungible TokenProperties (r:1 w:1)
428 fn set_token_properties(b: u32, ) -> Weight {
429 (0 as Weight)
430 // Standard Error: 1_668_000
431 .saturating_add((302_308_000 as Weight).saturating_mul(b as Weight))
432 .saturating_add(RocksDbWeight::get().reads(2 as Weight))
433 .saturating_add(RocksDbWeight::get().writes(1 as Weight))
434 }
435 // Storage: Common CollectionPropertyPermissions (r:1 w:0)
436 // Storage: Refungible TokenProperties (r:1 w:1)
437 fn delete_token_properties(b: u32, ) -> Weight {
438 (0 as Weight)
439 // Standard Error: 1_619_000
440 .saturating_add((294_574_000 as Weight).saturating_mul(b as Weight))
441 .saturating_add(RocksDbWeight::get().reads(2 as Weight))
442 .saturating_add(RocksDbWeight::get().writes(1 as Weight))
384 }443 }
385 // Storage: Refungible TotalSupply (r:1 w:1)444 // Storage: Refungible TotalSupply (r:1 w:1)
386 // Storage: Refungible Balance (r:1 w:1)445 // Storage: Refungible Balance (r:1 w:1)
387 fn repartition_item() -> Weight {446 fn repartition_item() -> Weight {
388 (8_226_000 as Weight)447 (8_325_000 as Weight)
389 .saturating_add(RocksDbWeight::get().reads(2 as Weight))448 .saturating_add(RocksDbWeight::get().reads(2 as Weight))
390 .saturating_add(RocksDbWeight::get().writes(2 as Weight))449 .saturating_add(RocksDbWeight::get().writes(2 as Weight))
391 }450 }