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

difftreelog

refactor(interface) remove outdated benchmarks

Yaroslav Bolyukin2021-10-22parent: #d54d8c2.patch.diff
in: master

3 files changed

modifiedpallets/nft/src/benchmarking.rsdiffbeforeafterboth
7use nft_data_structs::*;7use nft_data_structs::*;
8use core::convert::TryInto;8use core::convert::TryInto;
9use sp_runtime::DispatchError;9use sp_runtime::DispatchError;
10use pallet_common::benchmarking::{create_data, create_u16_data};
1011
11const SEED: u32 = 1;12const SEED: u32 = 1;
12
13fn create_data(size: usize) -> Vec<u8> {
14 (0..size).map(|v| (v & 0xff) as u8).collect()
15}
16fn create_u16_data(size: usize) -> Vec<u16> {
17 (0..size).map(|v| (v & 0xffff) as u16).collect()
18}
19
20fn default_nft_data() -> CreateItemData {
21 CreateItemData::NFT(CreateNftData {
22 const_data: create_data(CUSTOM_DATA_LIMIT as usize).try_into().unwrap(),
23 variable_data: create_data(CUSTOM_DATA_LIMIT as usize).try_into().unwrap(),
24 })
25}
26
27fn default_fungible_data() -> CreateItemData {
28 CreateItemData::Fungible(CreateFungibleData { value: 1000 })
29}
30
31fn default_re_fungible_data() -> CreateItemData {
32 CreateItemData::ReFungible(CreateReFungibleData {
33 const_data: create_data(CUSTOM_DATA_LIMIT as usize).try_into().unwrap(),
34 variable_data: create_data(CUSTOM_DATA_LIMIT as usize).try_into().unwrap(),
35 pieces: 1000,
36 })
37}
3813
39fn create_collection_helper<T: Config>(14fn create_collection_helper<T: Config>(
40 owner: T::AccountId,15 owner: T::AccountId,
55 token_prefix,30 token_prefix,
56 mode,31 mode,
57 )?;32 )?;
58 Ok(CreatedCollectionCount::get())33 Ok(<pallet_common::CreatedCollectionCount<T>>::get())
59}34}
60fn create_nft_collection<T: Config>(owner: T::AccountId) -> Result<CollectionId, DispatchError> {35fn create_nft_collection<T: Config>(owner: T::AccountId) -> Result<CollectionId, DispatchError> {
61 create_collection_helper::<T>(owner, CollectionMode::NFT)36 create_collection_helper::<T>(owner, CollectionMode::NFT)
62}37}
63fn create_fungible_collection<T: Config>(
64 owner: T::AccountId,
65) -> Result<CollectionId, DispatchError> {
66 create_collection_helper::<T>(owner, CollectionMode::Fungible(0))
67}
68fn create_refungible_collection<T: Config>(
69 owner: T::AccountId,
70) -> Result<CollectionId, DispatchError> {
71 create_collection_helper::<T>(owner, CollectionMode::ReFungible)
72}
7338
74benchmarks! {39benchmarks! {
7540
82 T::Currency::deposit_creating(&caller, T::CollectionCreationPrice::get());47 T::Currency::deposit_creating(&caller, T::CollectionCreationPrice::get());
83 }: _(RawOrigin::Signed(caller.clone()), col_name.clone(), col_desc.clone(), token_prefix.clone(), mode)48 }: _(RawOrigin::Signed(caller.clone()), col_name.clone(), col_desc.clone(), token_prefix.clone(), mode)
84 verify {49 verify {
85 assert_eq!(<Pallet<T>>::collection_id(2).unwrap().owner, caller);50 assert_eq!(<pallet_common::CollectionById<T>>::get(CollectionId(1)).unwrap().owner, caller);
86 }51 }
8752
88 destroy_collection {53 destroy_collection {
129 let caller: T::AccountId = account("caller", 0, SEED);94 let caller: T::AccountId = account("caller", 0, SEED);
130 let collection = create_nft_collection::<T>(caller.clone())?;95 let collection = create_nft_collection::<T>(caller.clone())?;
131 let new_admin: T::AccountId = account("admin", 0, SEED);96 let new_admin: T::AccountId = account("admin", 0, SEED);
132 <Pallet<T>>::add_collection_admin(RawOrigin::Signed(caller.clone()).into(), 2, T::CrossAccountId::from_sub(new_admin.clone()))?;97 <Pallet<T>>::add_collection_admin(RawOrigin::Signed(caller.clone()).into(), collection, T::CrossAccountId::from_sub(new_admin.clone()))?;
133 }: _(RawOrigin::Signed(caller.clone()), collection, T::CrossAccountId::from_sub(new_admin))98 }: _(RawOrigin::Signed(caller.clone()), collection, T::CrossAccountId::from_sub(new_admin))
13499
135 set_collection_sponsor {100 set_collection_sponsor {
140 confirm_sponsorship {105 confirm_sponsorship {
141 let caller: T::AccountId = account("caller", 0, SEED);106 let caller: T::AccountId = account("caller", 0, SEED);
142 let collection = create_nft_collection::<T>(caller.clone())?;107 let collection = create_nft_collection::<T>(caller.clone())?;
143 <Pallet<T>>::set_collection_sponsor(RawOrigin::Signed(caller.clone()).into(), 2, caller.clone())?;108 <Pallet<T>>::set_collection_sponsor(RawOrigin::Signed(caller.clone()).into(), collection, caller.clone())?;
144 }: _(RawOrigin::Signed(caller.clone()), collection)109 }: _(RawOrigin::Signed(caller.clone()), collection)
145110
146 remove_collection_sponsor {111 remove_collection_sponsor {
147 let caller: T::AccountId = account("caller", 0, SEED);112 let caller: T::AccountId = account("caller", 0, SEED);
148 let collection = create_nft_collection::<T>(caller.clone())?;113 let collection = create_nft_collection::<T>(caller.clone())?;
149 <Pallet<T>>::set_collection_sponsor(RawOrigin::Signed(caller.clone()).into(), 2, caller.clone())?;114 <Pallet<T>>::set_collection_sponsor(RawOrigin::Signed(caller.clone()).into(), collection, caller.clone())?;
150 <Pallet<T>>::confirm_sponsorship(RawOrigin::Signed(caller.clone()).into(), 2)?;115 <Pallet<T>>::confirm_sponsorship(RawOrigin::Signed(caller.clone()).into(), collection)?;
151 }: _(RawOrigin::Signed(caller.clone()), collection)116 }: _(RawOrigin::Signed(caller.clone()), collection)
152
153 // nft item
154 create_item_nft {
155 let b in 0..(CUSTOM_DATA_LIMIT * 2);
156
157 let caller: T::AccountId = account("caller", 0, SEED);
158 let collection = create_nft_collection::<T>(caller.clone())?;
159 let data = CreateItemData::NFT(CreateNftData {
160 const_data: create_data(b.min(CUSTOM_DATA_LIMIT) as usize).try_into().unwrap(),
161 variable_data: create_data(b.saturating_sub(CUSTOM_DATA_LIMIT) as usize).try_into().unwrap(),
162 });
163 }: create_item(RawOrigin::Signed(caller.clone()), collection, T::CrossAccountId::from_sub(caller.clone()), data)
164
165 create_multiple_items_nft {
166 // TODO: Take item data size into account. As create_item_nft bench shows, this parameter has no effect on execution time,
167 // but it may if we increase CUSTOM_DATA_LIMIT
168 let b in 1..1000;
169
170 let caller: T::AccountId = account("caller", 0, SEED);
171 let collection = create_nft_collection::<T>(caller.clone())?;
172 let data = (0..b).map(|_| default_nft_data()).collect();
173 }: create_multiple_items(RawOrigin::Signed(caller.clone()), collection, T::CrossAccountId::from_sub(caller.clone()), data)
174
175 // fungible item
176 create_item_fungible {
177 let caller: T::AccountId = account("caller", 0, SEED);
178 let collection = create_fungible_collection::<T>(caller.clone())?;
179 let data = CreateItemData::Fungible(CreateFungibleData {
180 value: 1000,
181 });
182 }: create_item(RawOrigin::Signed(caller.clone()), collection, T::CrossAccountId::from_sub(caller.clone()), data)
183
184 create_multiple_items_fungible {
185 let b in 1..1000;
186
187 let caller: T::AccountId = account("caller", 0, SEED);
188 let collection = create_fungible_collection::<T>(caller.clone())?;
189 let data = (0..b).map(|_| default_fungible_data()).collect();
190 }: create_multiple_items(RawOrigin::Signed(caller.clone()), collection, T::CrossAccountId::from_sub(caller.clone()), data)
191
192 // refungible item
193 create_item_refungible {
194 let b in 0..(CUSTOM_DATA_LIMIT * 2);
195
196 let caller: T::AccountId = account("caller", 0, SEED);
197 let collection = create_refungible_collection::<T>(caller.clone())?;
198 let data = CreateItemData::ReFungible(CreateReFungibleData {
199 const_data: create_data(b.min(CUSTOM_DATA_LIMIT) as usize).try_into().unwrap(),
200 variable_data: create_data(b.saturating_sub(CUSTOM_DATA_LIMIT) as usize).try_into().unwrap(),
201 pieces: 1000,
202 });
203 }: create_item(RawOrigin::Signed(caller.clone()), collection, T::CrossAccountId::from_sub(caller.clone()), data)
204
205 create_multiple_items_refungible {
206 // TODO: Take item data size into account. As create_item_nft bench shows, this parameter has no effect on execution time,
207 // but it may if we increase CUSTOM_DATA_LIMIT
208 let b in 1..1000;
209
210 let caller: T::AccountId = account("caller", 0, SEED);
211 let collection = create_refungible_collection::<T>(caller.clone())?;
212 let data = (0..b).map(|_| default_re_fungible_data()).collect();
213 }: create_multiple_items(RawOrigin::Signed(caller.clone()), collection, T::CrossAccountId::from_sub(caller.clone()), data)
214
215 burn_item_nft {
216 let caller: T::AccountId = account("caller", 0, SEED);
217 let collection = create_nft_collection::<T>(caller.clone())?;
218 let data = default_nft_data();
219 <Pallet<T>>::create_item(RawOrigin::Signed(caller.clone()).into(), collection, T::CrossAccountId::from_sub(caller.clone()), data)?;
220 }: burn_item(RawOrigin::Signed(caller.clone()), collection, 1, 1)
221
222 transfer_nft {
223 let caller: T::AccountId = account("caller", 0, SEED);
224 let collection = create_nft_collection::<T>(caller.clone())?;
225 let recipient: T::AccountId = account("recipient", 0, SEED);
226 let data = default_nft_data();
227 <Pallet<T>>::create_item(RawOrigin::Signed(caller.clone()).into(), collection, T::CrossAccountId::from_sub(caller.clone()), data)?;
228 }: transfer(RawOrigin::Signed(caller.clone()), T::CrossAccountId::from_sub(recipient.clone()), collection, 1, 1)
229
230 transfer_fungible {
231 let caller: T::AccountId = account("caller", 0, SEED);
232 let collection = create_fungible_collection::<T>(caller.clone())?;
233 let recipient: T::AccountId = account("recipient", 0, SEED);
234 let data = default_fungible_data();
235 <Pallet<T>>::create_item(RawOrigin::Signed(caller.clone()).into(), collection, T::CrossAccountId::from_sub(caller.clone()), data)?;
236 }: transfer(RawOrigin::Signed(caller.clone()), T::CrossAccountId::from_sub(recipient.clone()), collection, 1, 1)
237
238 transfer_refungible {
239 let caller: T::AccountId = account("caller", 0, SEED);
240 let collection = create_refungible_collection::<T>(caller.clone())?;
241 let recipient: T::AccountId = account("recipient", 0, SEED);
242 let data = default_re_fungible_data();
243 <Pallet<T>>::create_item(RawOrigin::Signed(caller.clone()).into(), collection, T::CrossAccountId::from_sub(caller.clone()), data)?;
244 }: transfer(RawOrigin::Signed(caller.clone()), T::CrossAccountId::from_sub(recipient.clone()), collection, 1, 1)
245117
246 set_transfers_enabled_flag {118 set_transfers_enabled_flag {
247 let caller: T::AccountId = account("caller", 0, SEED);119 let caller: T::AccountId = account("caller", 0, SEED);
248 let collection = create_nft_collection::<T>(caller.clone())?;120 let collection = create_nft_collection::<T>(caller.clone())?;
249 }: _(RawOrigin::Signed(caller.clone()), collection, false)121 }: _(RawOrigin::Signed(caller.clone()), collection, false)
250
251 approve_nft {
252 let caller: T::AccountId = account("caller", 0, SEED);
253 let collection = create_nft_collection::<T>(caller.clone())?;
254 let recipient: T::AccountId = account("recipient", 0, SEED);
255 let data = default_nft_data();
256 <Pallet<T>>::create_item(RawOrigin::Signed(caller.clone()).into(), 2, T::CrossAccountId::from_sub(caller.clone()), data)?;
257 }: approve(RawOrigin::Signed(caller.clone()), T::CrossAccountId::from_sub(recipient.clone()), collection, 1, 1)
258
259 // Nft
260 transfer_from_nft {
261 let caller: T::AccountId = account("caller", 0, SEED);
262 let collection = create_nft_collection::<T>(caller.clone())?;
263 let recipient: T::AccountId = account("recipient", 0, SEED);
264 let data = default_nft_data();
265 <Pallet<T>>::create_item(RawOrigin::Signed(caller.clone()).into(), 2, T::CrossAccountId::from_sub(caller.clone()), data)?;
266 <Pallet<T>>::approve(RawOrigin::Signed(caller.clone()).into(), T::CrossAccountId::from_sub(recipient.clone()), 2, 1, 1)?;
267 }: transfer_from(RawOrigin::Signed(caller.clone()), T::CrossAccountId::from_sub(caller.clone()), T::CrossAccountId::from_sub(recipient.clone()), 2, 1, 1)
268
269 // Fungible
270 transfer_from_fungible {
271 let caller: T::AccountId = account("caller", 0, SEED);
272 let collection = create_fungible_collection::<T>(caller.clone())?;
273 let recipient: T::AccountId = account("recipient", 0, SEED);
274 let data = default_fungible_data();
275 <Pallet<T>>::create_item(RawOrigin::Signed(caller.clone()).into(), 2, T::CrossAccountId::from_sub(caller.clone()), data)?;
276 <Pallet<T>>::approve(RawOrigin::Signed(caller.clone()).into(), T::CrossAccountId::from_sub(recipient.clone()), 2, 1, 1)?;
277 }: transfer_from(RawOrigin::Signed(caller.clone()), T::CrossAccountId::from_sub(caller.clone()), T::CrossAccountId::from_sub(recipient.clone()), 2, 1, 1)
278
279 // ReFungible
280 transfer_from_refungible {
281 let caller: T::AccountId = account("caller", 0, SEED);
282 let collection = create_refungible_collection::<T>(caller.clone())?;
283 let recipient: T::AccountId = account("recipient", 0, SEED);
284 let data = default_re_fungible_data();
285 <Pallet<T>>::create_item(RawOrigin::Signed(caller.clone()).into(), 2, T::CrossAccountId::from_sub(caller.clone()), data)?;
286 <Pallet<T>>::approve(RawOrigin::Signed(caller.clone()).into(), T::CrossAccountId::from_sub(recipient.clone()), 2, 1, 1)?;
287 }: transfer_from(RawOrigin::Signed(caller.clone()), T::CrossAccountId::from_sub(caller.clone()), T::CrossAccountId::from_sub(recipient.clone()), 2, 1, 1)
288122
289 set_offchain_schema {123 set_offchain_schema {
290 let b in 0..OFFCHAIN_SCHEMA_LIMIT;124 let b in 0..OFFCHAIN_SCHEMA_LIMIT;
308 let caller: T::AccountId = account("caller", 0, SEED);142 let caller: T::AccountId = account("caller", 0, SEED);
309 let collection = create_nft_collection::<T>(caller.clone())?;143 let collection = create_nft_collection::<T>(caller.clone())?;
310 let data = create_data(b as usize);144 let data = create_data(b as usize);
311 }: set_variable_on_chain_schema(RawOrigin::Signed(caller.clone()), 2, data)145 }: set_variable_on_chain_schema(RawOrigin::Signed(caller.clone()), collection, data)
312
313 set_variable_meta_data_nft {
314 let b in 0..CUSTOM_DATA_LIMIT;
315
316 let caller: T::AccountId = account("caller", 0, SEED);
317 let collection = create_nft_collection::<T>(caller.clone())?;
318 let data = default_nft_data();
319 <Pallet<T>>::create_item(RawOrigin::Signed(caller.clone()).into(), 2, T::CrossAccountId::from_sub(caller.clone()), data)?;
320 let data = create_data(b as usize);
321 }: set_variable_meta_data(RawOrigin::Signed(caller.clone()), collection, 1, data)
322146
323 set_schema_version {147 set_schema_version {
324 let caller: T::AccountId = account("caller", 0, SEED);148 let caller: T::AccountId = account("caller", 0, SEED);
325 let collection = create_nft_collection::<T>(caller.clone())?;149 let collection = create_nft_collection::<T>(caller.clone())?;
326 }: set_schema_version(RawOrigin::Signed(caller.clone()), 2, SchemaVersion::Unique)150 }: set_schema_version(RawOrigin::Signed(caller.clone()), collection, SchemaVersion::Unique)
327151
328 set_collection_limits{152 set_collection_limits{
329 let caller: T::AccountId = account("caller", 0, SEED);153 let caller: T::AccountId = account("caller", 0, SEED);
330 let collection = create_nft_collection::<T>(caller.clone())?;154 let collection = create_nft_collection::<T>(caller.clone())?;
331155
332 let cl = CollectionLimits {156 let cl = CollectionLimits {
333 account_token_ownership_limit: 0,157 account_token_ownership_limit: Some(0),
334 sponsored_data_size: 0,158 sponsored_data_size: 0,
335 token_limit: 1,159 token_limit: 1,
336 sponsor_transfer_timeout: 0,160 sponsor_transfer_timeout: 0,
337 owner_can_destroy: true,161 owner_can_destroy: true,
338 owner_can_transfer: true,162 owner_can_transfer: true,
339 sponsored_data_rate_limit: None,163 sponsored_data_rate_limit: None,
340 };164 };
341 }: set_collection_limits(RawOrigin::Signed(caller.clone()), 2, cl)165 }: set_collection_limits(RawOrigin::Signed(caller.clone()), collection, cl)
166
167 set_meta_update_permission_flag {
168 let caller: T::AccountId = account("caller", 0, SEED);
169 let collection = create_nft_collection::<T>(caller.clone())?;
170 }: _(RawOrigin::Signed(caller.clone()), collection, MetaUpdatePermission::Admin)
342}171}
343172
modifiedpallets/nft/src/lib.rsdiffbeforeafterboth
100100
101type SelfWeightOf<T> = <T as Config>::WeightInfo;101type SelfWeightOf<T> = <T as Config>::WeightInfo;
102
103trait WeightInfoHelpers: WeightInfo {
104 fn transfer() -> Weight {
105 Self::transfer_nft()
106 .max(Self::transfer_fungible())
107 .max(Self::transfer_refungible())
108 }
109 fn transfer_from() -> Weight {
110 Self::transfer_from_nft()
111 .max(Self::transfer_from_fungible())
112 .max(Self::transfer_from_refungible())
113 }
114 fn approve() -> Weight {
115 // TODO: refungible, fungible
116 Self::approve_nft()
117 }
118 fn set_variable_meta_data(data: u32) -> Weight {
119 // TODO: refungible
120 Self::set_variable_meta_data_nft(data)
121 }
122 fn create_item(data: u32) -> Weight {
123 Self::create_item_nft(data)
124 .max(Self::create_item_fungible())
125 .max(Self::create_item_refungible(data))
126 }
127 fn create_multiple_items(amount: u32) -> Weight {
128 Self::create_multiple_items_nft(amount)
129 .max(Self::create_multiple_items_fungible(amount))
130 .max(Self::create_multiple_items_refungible(amount))
131 }
132}
133impl<T: WeightInfo> WeightInfoHelpers for T {}
134102
135// # Used definitions103// # Used definitions
136//104//
754 /// * collection_id: ID of the collection.722 /// * collection_id: ID of the collection.
755 ///723 ///
756 /// * value: New flag value.724 /// * value: New flag value.
757 #[weight = <SelfWeightOf<T>>::set_variable_meta_data(0)]725 #[weight = <SelfWeightOf<T>>::set_meta_update_permission_flag()]
758 #[transactional]726 #[transactional]
759 pub fn set_meta_update_permission_flag(origin, collection_id: CollectionId, value: MetaUpdatePermission) -> DispatchResult {727 pub fn set_meta_update_permission_flag(origin, collection_id: CollectionId, value: MetaUpdatePermission) -> DispatchResult {
760 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);728 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
modifiedpallets/nft/src/weights.rsdiffbeforeafterboth
22
3//! Autogenerated weights for pallet_nft3//! Autogenerated weights for pallet_nft
4//!4//!
5//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.05//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
6//! DATE: 2021-08-31, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`6//! DATE: 2021-10-21, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
7//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1287//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 128
88
9// Executed Command:9// Executed Command:
43 fn set_collection_sponsor() -> Weight;43 fn set_collection_sponsor() -> Weight;
44 fn confirm_sponsorship() -> Weight;44 fn confirm_sponsorship() -> Weight;
45 fn remove_collection_sponsor() -> Weight;45 fn remove_collection_sponsor() -> Weight;
46 fn create_item_nft(b: u32, ) -> Weight;
47 fn create_multiple_items_nft(b: u32, ) -> Weight;
48 fn create_item_fungible() -> Weight;
49 fn create_multiple_items_fungible(b: u32, ) -> Weight;
50 fn create_item_refungible(b: u32, ) -> Weight;
51 fn create_multiple_items_refungible(b: u32, ) -> Weight;
52 fn burn_item_nft() -> Weight;
53 fn transfer_nft() -> Weight;
54 fn transfer_fungible() -> Weight;
55 fn transfer_refungible() -> Weight;
56 fn set_transfers_enabled_flag() -> Weight;46 fn set_transfers_enabled_flag() -> Weight;
57 fn approve_nft() -> Weight;
58 fn transfer_from_nft() -> Weight;
59 fn transfer_from_fungible() -> Weight;
60 fn transfer_from_refungible() -> Weight;
61 fn set_offchain_schema(b: u32, ) -> Weight;47 fn set_offchain_schema(b: u32, ) -> Weight;
62 fn set_const_on_chain_schema(b: u32, ) -> Weight;48 fn set_const_on_chain_schema(b: u32, ) -> Weight;
63 fn set_variable_on_chain_schema(b: u32, ) -> Weight;49 fn set_variable_on_chain_schema(b: u32, ) -> Weight;
64 fn set_variable_meta_data_nft(b: u32, ) -> Weight;
65 fn set_schema_version() -> Weight;50 fn set_schema_version() -> Weight;
66 fn set_collection_limits() -> Weight;51 fn set_collection_limits() -> Weight;
52 fn set_meta_update_permission_flag() -> Weight;
67}53}
6854
69/// Weights for pallet_nft using the Substrate node and recommended hardware.55/// Weights for pallet_nft using the Substrate node and recommended hardware.
70pub struct SubstrateWeight<T>(PhantomData<T>);56pub struct SubstrateWeight<T>(PhantomData<T>);
71impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {57impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
58 // Storage: Common CreatedCollectionCount (r:1 w:1)
59 // Storage: Common DestroyedCollectionCount (r:1 w:0)
60 // Storage: System Account (r:2 w:2)
61 // Storage: Common CollectionById (r:0 w:1)
72 fn create_collection() -> Weight {62 fn create_collection() -> Weight {
73 (25_851_000 as Weight)63 (23_803_000 as Weight)
74 .saturating_add(T::DbWeight::get().reads(8 as Weight))64 .saturating_add(T::DbWeight::get().reads(4 as Weight))
75 .saturating_add(T::DbWeight::get().writes(6 as Weight))65 .saturating_add(T::DbWeight::get().writes(4 as Weight))
76 }66 }
67 // Storage: Common CollectionById (r:1 w:1)
68 // Storage: Common DestroyedCollectionCount (r:1 w:1)
69 // Storage: Nonfungible TokensMinted (r:0 w:1)
70 // Storage: Nonfungible TokensBurnt (r:0 w:1)
77 fn destroy_collection() -> Weight {71 fn destroy_collection() -> Weight {
78 (28_737_000 as Weight)72 (27_831_000 as Weight)
79 .saturating_add(T::DbWeight::get().reads(2 as Weight))73 .saturating_add(T::DbWeight::get().reads(2 as Weight))
80 .saturating_add(T::DbWeight::get().writes(4 as Weight))74 .saturating_add(T::DbWeight::get().writes(4 as Weight))
81 }75 }
76 // Storage: Common CollectionById (r:1 w:0)
77 // Storage: Common Allowlist (r:0 w:1)
82 fn add_to_white_list() -> Weight {78 fn add_to_white_list() -> Weight {
83 (6_237_000 as Weight)79 (6_629_000 as Weight)
84 .saturating_add(T::DbWeight::get().reads(1 as Weight))80 .saturating_add(T::DbWeight::get().reads(1 as Weight))
85 .saturating_add(T::DbWeight::get().writes(1 as Weight))81 .saturating_add(T::DbWeight::get().writes(1 as Weight))
86 }82 }
83 // Storage: Common CollectionById (r:1 w:0)
84 // Storage: Common Allowlist (r:0 w:1)
87 fn remove_from_white_list() -> Weight {85 fn remove_from_white_list() -> Weight {
88 (6_252_000 as Weight)86 (6_596_000 as Weight)
89 .saturating_add(T::DbWeight::get().reads(1 as Weight))87 .saturating_add(T::DbWeight::get().reads(1 as Weight))
90 .saturating_add(T::DbWeight::get().writes(1 as Weight))88 .saturating_add(T::DbWeight::get().writes(1 as Weight))
91 }89 }
90 // Storage: Common CollectionById (r:1 w:1)
92 fn set_public_access_mode() -> Weight {91 fn set_public_access_mode() -> Weight {
93 (6_691_000 as Weight)92 (6_338_000 as Weight)
94 .saturating_add(T::DbWeight::get().reads(1 as Weight))93 .saturating_add(T::DbWeight::get().reads(1 as Weight))
95 .saturating_add(T::DbWeight::get().writes(1 as Weight))94 .saturating_add(T::DbWeight::get().writes(1 as Weight))
96 }95 }
96 // Storage: Common CollectionById (r:1 w:1)
97 fn set_mint_permission() -> Weight {97 fn set_mint_permission() -> Weight {
98 (6_630_000 as Weight)98 (6_383_000 as Weight)
99 .saturating_add(T::DbWeight::get().reads(1 as Weight))99 .saturating_add(T::DbWeight::get().reads(1 as Weight))
100 .saturating_add(T::DbWeight::get().writes(1 as Weight))100 .saturating_add(T::DbWeight::get().writes(1 as Weight))
101 }101 }
102 // Storage: Common CollectionById (r:1 w:1)
102 fn change_collection_owner() -> Weight {103 fn change_collection_owner() -> Weight {
103 (6_521_000 as Weight)104 (6_493_000 as Weight)
104 .saturating_add(T::DbWeight::get().reads(1 as Weight))105 .saturating_add(T::DbWeight::get().reads(1 as Weight))
105 .saturating_add(T::DbWeight::get().writes(1 as Weight))106 .saturating_add(T::DbWeight::get().writes(1 as Weight))
106 }107 }
108 // Storage: Common CollectionById (r:1 w:0)
109 // Storage: Common IsAdmin (r:0 w:1)
107 fn add_collection_admin() -> Weight {110 fn add_collection_admin() -> Weight {
108 (8_057_000 as Weight)111 (6_850_000 as Weight)
109 .saturating_add(T::DbWeight::get().reads(2 as Weight))112 .saturating_add(T::DbWeight::get().reads(1 as Weight))
110 .saturating_add(T::DbWeight::get().writes(1 as Weight))113 .saturating_add(T::DbWeight::get().writes(1 as Weight))
111 }114 }
115 // Storage: Common CollectionById (r:1 w:0)
116 // Storage: Common IsAdmin (r:0 w:1)
112 fn remove_collection_admin() -> Weight {117 fn remove_collection_admin() -> Weight {
113 (8_307_000 as Weight)118 (6_615_000 as Weight)
114 .saturating_add(T::DbWeight::get().reads(2 as Weight))119 .saturating_add(T::DbWeight::get().reads(1 as Weight))
115 .saturating_add(T::DbWeight::get().writes(1 as Weight))120 .saturating_add(T::DbWeight::get().writes(1 as Weight))
116 }121 }
122 // Storage: Common CollectionById (r:1 w:1)
117 fn set_collection_sponsor() -> Weight {123 fn set_collection_sponsor() -> Weight {
118 (6_484_000 as Weight)124 (6_430_000 as Weight)
119 .saturating_add(T::DbWeight::get().reads(1 as Weight))125 .saturating_add(T::DbWeight::get().reads(1 as Weight))
120 .saturating_add(T::DbWeight::get().writes(1 as Weight))126 .saturating_add(T::DbWeight::get().writes(1 as Weight))
121 }127 }
128 // Storage: Common CollectionById (r:1 w:1)
122 fn confirm_sponsorship() -> Weight {129 fn confirm_sponsorship() -> Weight {
123 (6_530_000 as Weight)130 (6_125_000 as Weight)
124 .saturating_add(T::DbWeight::get().reads(1 as Weight))131 .saturating_add(T::DbWeight::get().reads(1 as Weight))
125 .saturating_add(T::DbWeight::get().writes(1 as Weight))132 .saturating_add(T::DbWeight::get().writes(1 as Weight))
126 }133 }
134 // Storage: Common CollectionById (r:1 w:1)
127 fn remove_collection_sponsor() -> Weight {135 fn remove_collection_sponsor() -> Weight {
128 (6_733_000 as Weight)136 (6_236_000 as Weight)
129 .saturating_add(T::DbWeight::get().reads(1 as Weight))137 .saturating_add(T::DbWeight::get().reads(1 as Weight))
130 .saturating_add(T::DbWeight::get().writes(1 as Weight))138 .saturating_add(T::DbWeight::get().writes(1 as Weight))
131 }139 }
132 fn create_item_nft(_b: u32, ) -> Weight {140 // Storage: Common CollectionById (r:1 w:1)
133 (167_909_000 as Weight)
134 .saturating_add(T::DbWeight::get().reads(11 as Weight))
135 .saturating_add(T::DbWeight::get().writes(8 as Weight))
136 }
137 fn create_multiple_items_nft(b: u32, ) -> Weight {
138 (336_830_000 as Weight)
139 // Standard Error: 42_000
140 .saturating_add((11_627_000 as Weight).saturating_mul(b as Weight))
141 .saturating_add(T::DbWeight::get().reads(11 as Weight))
142 .saturating_add(T::DbWeight::get().writes(7 as Weight))
143 .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(b as Weight)))
144 }
145 fn create_item_fungible() -> Weight {
146 (24_123_000 as Weight)
147 .saturating_add(T::DbWeight::get().reads(9 as Weight))
148 .saturating_add(T::DbWeight::get().writes(4 as Weight))
149 }
150 fn create_multiple_items_fungible(b: u32, ) -> Weight {
151 (48_227_000 as Weight)
152 // Standard Error: 13_000
153 .saturating_add((2_918_000 as Weight).saturating_mul(b as Weight))
154 .saturating_add(T::DbWeight::get().reads(9 as Weight))
155 .saturating_add(T::DbWeight::get().writes(4 as Weight))
156 }
157 fn create_item_refungible(_b: u32, ) -> Weight {
158 (26_293_000 as Weight)
159 .saturating_add(T::DbWeight::get().reads(9 as Weight))
160 .saturating_add(T::DbWeight::get().writes(7 as Weight))
161 }
162 fn create_multiple_items_refungible(b: u32, ) -> Weight {
163 (0 as Weight)
164 // Standard Error: 16_000
165 .saturating_add((8_374_000 as Weight).saturating_mul(b as Weight))
166 .saturating_add(T::DbWeight::get().reads(9 as Weight))
167 .saturating_add(T::DbWeight::get().writes(6 as Weight))
168 .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(b as Weight)))
169 }
170 fn burn_item_nft() -> Weight {
171 (32_237_000 as Weight)
172 .saturating_add(T::DbWeight::get().reads(9 as Weight))
173 .saturating_add(T::DbWeight::get().writes(7 as Weight))
174 }
175 fn transfer_nft() -> Weight {
176 (192_578_000 as Weight)
177 .saturating_add(T::DbWeight::get().reads(14 as Weight))
178 .saturating_add(T::DbWeight::get().writes(10 as Weight))
179 }
180 fn transfer_fungible() -> Weight {
181 (170_749_000 as Weight)
182 .saturating_add(T::DbWeight::get().reads(11 as Weight))
183 .saturating_add(T::DbWeight::get().writes(7 as Weight))
184 }
185 fn transfer_refungible() -> Weight {
186 (35_949_000 as Weight)
187 .saturating_add(T::DbWeight::get().reads(10 as Weight))
188 .saturating_add(T::DbWeight::get().writes(7 as Weight))
189 }
190 fn set_transfers_enabled_flag() -> Weight {141 fn set_transfers_enabled_flag() -> Weight {
191 (6_376_000 as Weight)142 (6_500_000 as Weight)
192 .saturating_add(T::DbWeight::get().reads(1 as Weight))143 .saturating_add(T::DbWeight::get().reads(1 as Weight))
193 .saturating_add(T::DbWeight::get().writes(1 as Weight))144 .saturating_add(T::DbWeight::get().writes(1 as Weight))
194 }145 }
195 fn approve_nft() -> Weight {146 // Storage: Common CollectionById (r:1 w:1)
196 (169_825_000 as Weight)
197 .saturating_add(T::DbWeight::get().reads(9 as Weight))
198 .saturating_add(T::DbWeight::get().writes(4 as Weight))
199 }
200 fn transfer_from_nft() -> Weight {
201 (197_912_000 as Weight)
202 .saturating_add(T::DbWeight::get().reads(15 as Weight))
203 .saturating_add(T::DbWeight::get().writes(11 as Weight))
204 }
205 fn transfer_from_fungible() -> Weight {
206 (183_789_000 as Weight)
207 .saturating_add(T::DbWeight::get().reads(12 as Weight))
208 .saturating_add(T::DbWeight::get().writes(8 as Weight))
209 }
210 fn transfer_from_refungible() -> Weight {
211 (37_149_000 as Weight)
212 .saturating_add(T::DbWeight::get().reads(11 as Weight))
213 .saturating_add(T::DbWeight::get().writes(8 as Weight))
214 }
215 fn set_offchain_schema(_b: u32, ) -> Weight {147 fn set_offchain_schema(_b: u32, ) -> Weight {
216 (6_435_000 as Weight)148 (6_538_000 as Weight)
217 .saturating_add(T::DbWeight::get().reads(1 as Weight))149 .saturating_add(T::DbWeight::get().reads(1 as Weight))
218 .saturating_add(T::DbWeight::get().writes(1 as Weight))150 .saturating_add(T::DbWeight::get().writes(1 as Weight))
219 }151 }
152 // Storage: Common CollectionById (r:1 w:1)
220 fn set_const_on_chain_schema(_b: u32, ) -> Weight {153 fn set_const_on_chain_schema(_b: u32, ) -> Weight {
221 (6_646_000 as Weight)154 (6_542_000 as Weight)
222 .saturating_add(T::DbWeight::get().reads(1 as Weight))155 .saturating_add(T::DbWeight::get().reads(1 as Weight))
223 .saturating_add(T::DbWeight::get().writes(1 as Weight))156 .saturating_add(T::DbWeight::get().writes(1 as Weight))
224 }157 }
225 fn set_variable_on_chain_schema(_b: u32, ) -> Weight {158 // Storage: Common CollectionById (r:1 w:1)
159 fn set_variable_on_chain_schema(b: u32, ) -> Weight {
226 (6_542_000 as Weight)160 (6_092_000 as Weight)
161 // Standard Error: 0
162 .saturating_add((2_000 as Weight).saturating_mul(b as Weight))
227 .saturating_add(T::DbWeight::get().reads(1 as Weight))163 .saturating_add(T::DbWeight::get().reads(1 as Weight))
228 .saturating_add(T::DbWeight::get().writes(1 as Weight))164 .saturating_add(T::DbWeight::get().writes(1 as Weight))
229 }165 }
230 fn set_variable_meta_data_nft(_b: u32, ) -> Weight {166 // Storage: Common CollectionById (r:1 w:1)
231 (14_697_000 as Weight)
232 .saturating_add(T::DbWeight::get().reads(2 as Weight))
233 .saturating_add(T::DbWeight::get().writes(1 as Weight))
234 }
235 fn set_schema_version() -> Weight {167 fn set_schema_version() -> Weight {
236 (6_566_000 as Weight)168 (6_470_000 as Weight)
237 .saturating_add(T::DbWeight::get().reads(1 as Weight))169 .saturating_add(T::DbWeight::get().reads(1 as Weight))
238 .saturating_add(T::DbWeight::get().writes(1 as Weight))170 .saturating_add(T::DbWeight::get().writes(1 as Weight))
239 }171 }
172 // Storage: Common CollectionById (r:1 w:1)
240 fn set_collection_limits() -> Weight {173 fn set_collection_limits() -> Weight {
241 (6_349_000 as Weight)174 (6_841_000 as Weight)
242 .saturating_add(T::DbWeight::get().reads(1 as Weight))175 .saturating_add(T::DbWeight::get().reads(1 as Weight))
243 .saturating_add(T::DbWeight::get().writes(1 as Weight))176 .saturating_add(T::DbWeight::get().writes(1 as Weight))
244 }177 }
178 // Storage: Common CollectionById (r:1 w:1)
179 fn set_meta_update_permission_flag() -> Weight {
180 (6_278_000 as Weight)
181 .saturating_add(T::DbWeight::get().reads(1 as Weight))
182 .saturating_add(T::DbWeight::get().writes(1 as Weight))
183 }
245}184}
246185
247// For backwards compatibility and tests186// For backwards compatibility and tests
248impl WeightInfo for () {187impl WeightInfo for () {
188 // Storage: Common CreatedCollectionCount (r:1 w:1)
189 // Storage: Common DestroyedCollectionCount (r:1 w:0)
190 // Storage: System Account (r:2 w:2)
191 // Storage: Common CollectionById (r:0 w:1)
249 fn create_collection() -> Weight {192 fn create_collection() -> Weight {
250 (25_851_000 as Weight)193 (23_803_000 as Weight)
251 .saturating_add(RocksDbWeight::get().reads(8 as Weight))194 .saturating_add(RocksDbWeight::get().reads(4 as Weight))
252 .saturating_add(RocksDbWeight::get().writes(6 as Weight))195 .saturating_add(RocksDbWeight::get().writes(4 as Weight))
253 }196 }
197 // Storage: Common CollectionById (r:1 w:1)
198 // Storage: Common DestroyedCollectionCount (r:1 w:1)
199 // Storage: Nonfungible TokensMinted (r:0 w:1)
200 // Storage: Nonfungible TokensBurnt (r:0 w:1)
254 fn destroy_collection() -> Weight {201 fn destroy_collection() -> Weight {
255 (28_737_000 as Weight)202 (27_831_000 as Weight)
256 .saturating_add(RocksDbWeight::get().reads(2 as Weight))203 .saturating_add(RocksDbWeight::get().reads(2 as Weight))
257 .saturating_add(RocksDbWeight::get().writes(4 as Weight))204 .saturating_add(RocksDbWeight::get().writes(4 as Weight))
258 }205 }
206 // Storage: Common CollectionById (r:1 w:0)
207 // Storage: Common Allowlist (r:0 w:1)
259 fn add_to_white_list() -> Weight {208 fn add_to_white_list() -> Weight {
260 (6_237_000 as Weight)209 (6_629_000 as Weight)
261 .saturating_add(RocksDbWeight::get().reads(1 as Weight))210 .saturating_add(RocksDbWeight::get().reads(1 as Weight))
262 .saturating_add(RocksDbWeight::get().writes(1 as Weight))211 .saturating_add(RocksDbWeight::get().writes(1 as Weight))
263 }212 }
213 // Storage: Common CollectionById (r:1 w:0)
214 // Storage: Common Allowlist (r:0 w:1)
264 fn remove_from_white_list() -> Weight {215 fn remove_from_white_list() -> Weight {
265 (6_252_000 as Weight)216 (6_596_000 as Weight)
266 .saturating_add(RocksDbWeight::get().reads(1 as Weight))217 .saturating_add(RocksDbWeight::get().reads(1 as Weight))
267 .saturating_add(RocksDbWeight::get().writes(1 as Weight))218 .saturating_add(RocksDbWeight::get().writes(1 as Weight))
268 }219 }
220 // Storage: Common CollectionById (r:1 w:1)
269 fn set_public_access_mode() -> Weight {221 fn set_public_access_mode() -> Weight {
270 (6_691_000 as Weight)222 (6_338_000 as Weight)
271 .saturating_add(RocksDbWeight::get().reads(1 as Weight))223 .saturating_add(RocksDbWeight::get().reads(1 as Weight))
272 .saturating_add(RocksDbWeight::get().writes(1 as Weight))224 .saturating_add(RocksDbWeight::get().writes(1 as Weight))
273 }225 }
226 // Storage: Common CollectionById (r:1 w:1)
274 fn set_mint_permission() -> Weight {227 fn set_mint_permission() -> Weight {
275 (6_630_000 as Weight)228 (6_383_000 as Weight)
276 .saturating_add(RocksDbWeight::get().reads(1 as Weight))229 .saturating_add(RocksDbWeight::get().reads(1 as Weight))
277 .saturating_add(RocksDbWeight::get().writes(1 as Weight))230 .saturating_add(RocksDbWeight::get().writes(1 as Weight))
278 }231 }
232 // Storage: Common CollectionById (r:1 w:1)
279 fn change_collection_owner() -> Weight {233 fn change_collection_owner() -> Weight {
280 (6_521_000 as Weight)234 (6_493_000 as Weight)
281 .saturating_add(RocksDbWeight::get().reads(1 as Weight))235 .saturating_add(RocksDbWeight::get().reads(1 as Weight))
282 .saturating_add(RocksDbWeight::get().writes(1 as Weight))236 .saturating_add(RocksDbWeight::get().writes(1 as Weight))
283 }237 }
238 // Storage: Common CollectionById (r:1 w:0)
239 // Storage: Common IsAdmin (r:0 w:1)
284 fn add_collection_admin() -> Weight {240 fn add_collection_admin() -> Weight {
285 (8_057_000 as Weight)241 (6_850_000 as Weight)
286 .saturating_add(RocksDbWeight::get().reads(2 as Weight))242 .saturating_add(RocksDbWeight::get().reads(1 as Weight))
287 .saturating_add(RocksDbWeight::get().writes(1 as Weight))243 .saturating_add(RocksDbWeight::get().writes(1 as Weight))
288 }244 }
245 // Storage: Common CollectionById (r:1 w:0)
246 // Storage: Common IsAdmin (r:0 w:1)
289 fn remove_collection_admin() -> Weight {247 fn remove_collection_admin() -> Weight {
290 (8_307_000 as Weight)248 (6_615_000 as Weight)
291 .saturating_add(RocksDbWeight::get().reads(2 as Weight))249 .saturating_add(RocksDbWeight::get().reads(1 as Weight))
292 .saturating_add(RocksDbWeight::get().writes(1 as Weight))250 .saturating_add(RocksDbWeight::get().writes(1 as Weight))
293 }251 }
252 // Storage: Common CollectionById (r:1 w:1)
294 fn set_collection_sponsor() -> Weight {253 fn set_collection_sponsor() -> Weight {
295 (6_484_000 as Weight)254 (6_430_000 as Weight)
296 .saturating_add(RocksDbWeight::get().reads(1 as Weight))255 .saturating_add(RocksDbWeight::get().reads(1 as Weight))
297 .saturating_add(RocksDbWeight::get().writes(1 as Weight))256 .saturating_add(RocksDbWeight::get().writes(1 as Weight))
298 }257 }
258 // Storage: Common CollectionById (r:1 w:1)
299 fn confirm_sponsorship() -> Weight {259 fn confirm_sponsorship() -> Weight {
300 (6_530_000 as Weight)260 (6_125_000 as Weight)
301 .saturating_add(RocksDbWeight::get().reads(1 as Weight))261 .saturating_add(RocksDbWeight::get().reads(1 as Weight))
302 .saturating_add(RocksDbWeight::get().writes(1 as Weight))262 .saturating_add(RocksDbWeight::get().writes(1 as Weight))
303 }263 }
264 // Storage: Common CollectionById (r:1 w:1)
304 fn remove_collection_sponsor() -> Weight {265 fn remove_collection_sponsor() -> Weight {
305 (6_733_000 as Weight)266 (6_236_000 as Weight)
306 .saturating_add(RocksDbWeight::get().reads(1 as Weight))267 .saturating_add(RocksDbWeight::get().reads(1 as Weight))
307 .saturating_add(RocksDbWeight::get().writes(1 as Weight))268 .saturating_add(RocksDbWeight::get().writes(1 as Weight))
308 }269 }
309 fn create_item_nft(b: u32, ) -> Weight {270 // Storage: Common CollectionById (r:1 w:1)
310 (167_180_000 as Weight)
311 // Standard Error: 1_000
312 .saturating_add((10_000 as Weight).saturating_mul(b as Weight))
313 .saturating_add(RocksDbWeight::get().reads(11 as Weight))
314 .saturating_add(RocksDbWeight::get().writes(8 as Weight))
315 }
316 fn create_multiple_items_nft(b: u32, ) -> Weight {
317 (336_830_000 as Weight)
318 // Standard Error: 42_000
319 .saturating_add((11_627_000 as Weight).saturating_mul(b as Weight))
320 .saturating_add(RocksDbWeight::get().reads(11 as Weight))
321 .saturating_add(RocksDbWeight::get().writes(7 as Weight))
322 .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(b as Weight)))
323 }
324 fn create_item_fungible() -> Weight {
325 (24_123_000 as Weight)
326 .saturating_add(RocksDbWeight::get().reads(9 as Weight))
327 .saturating_add(RocksDbWeight::get().writes(4 as Weight))
328 }
329 fn create_multiple_items_fungible(b: u32, ) -> Weight {
330 (13_217_000 as Weight)
331 // Standard Error: 4_000
332 .saturating_add((2_971_000 as Weight).saturating_mul(b as Weight))
333 .saturating_add(RocksDbWeight::get().reads(9 as Weight))
334 .saturating_add(RocksDbWeight::get().writes(4 as Weight))
335 }
336 fn create_item_refungible(_b: u32, ) -> Weight {
337 (26_293_000 as Weight)
338 .saturating_add(RocksDbWeight::get().reads(9 as Weight))
339 .saturating_add(RocksDbWeight::get().writes(7 as Weight))
340 }
341 fn create_multiple_items_refungible(b: u32, ) -> Weight {
342 (0 as Weight)
343 // Standard Error: 16_000
344 .saturating_add((8_374_000 as Weight).saturating_mul(b as Weight))
345 .saturating_add(RocksDbWeight::get().reads(9 as Weight))
346 .saturating_add(RocksDbWeight::get().writes(6 as Weight))
347 .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(b as Weight)))
348 }
349 fn burn_item_nft() -> Weight {
350 (32_237_000 as Weight)
351 .saturating_add(RocksDbWeight::get().reads(9 as Weight))
352 .saturating_add(RocksDbWeight::get().writes(7 as Weight))
353 }
354 fn transfer_nft() -> Weight {
355 (192_578_000 as Weight)
356 .saturating_add(RocksDbWeight::get().reads(14 as Weight))
357 .saturating_add(RocksDbWeight::get().writes(10 as Weight))
358 }
359 fn transfer_fungible() -> Weight {
360 (170_749_000 as Weight)
361 .saturating_add(RocksDbWeight::get().reads(11 as Weight))
362 .saturating_add(RocksDbWeight::get().writes(7 as Weight))
363 }
364 fn transfer_refungible() -> Weight {
365 (35_949_000 as Weight)
366 .saturating_add(RocksDbWeight::get().reads(10 as Weight))
367 .saturating_add(RocksDbWeight::get().writes(7 as Weight))
368 }
369 fn set_transfers_enabled_flag() -> Weight {271 fn set_transfers_enabled_flag() -> Weight {
370 (6_376_000 as Weight)272 (6_500_000 as Weight)
371 .saturating_add(RocksDbWeight::get().reads(1 as Weight))273 .saturating_add(RocksDbWeight::get().reads(1 as Weight))
372 .saturating_add(RocksDbWeight::get().writes(1 as Weight))274 .saturating_add(RocksDbWeight::get().writes(1 as Weight))
373 }275 }
374 fn approve_nft() -> Weight {276 // Storage: Common CollectionById (r:1 w:1)
375 (169_825_000 as Weight)
376 .saturating_add(RocksDbWeight::get().reads(9 as Weight))
377 .saturating_add(RocksDbWeight::get().writes(4 as Weight))
378 }
379 fn transfer_from_nft() -> Weight {
380 (197_912_000 as Weight)
381 .saturating_add(RocksDbWeight::get().reads(15 as Weight))
382 .saturating_add(RocksDbWeight::get().writes(11 as Weight))
383 }
384 fn transfer_from_fungible() -> Weight {
385 (183_789_000 as Weight)
386 .saturating_add(RocksDbWeight::get().reads(12 as Weight))
387 .saturating_add(RocksDbWeight::get().writes(8 as Weight))
388 }
389 fn transfer_from_refungible() -> Weight {
390 (37_149_000 as Weight)
391 .saturating_add(RocksDbWeight::get().reads(11 as Weight))
392 .saturating_add(RocksDbWeight::get().writes(8 as Weight))
393 }
394 fn set_offchain_schema(_b: u32, ) -> Weight {277 fn set_offchain_schema(_b: u32, ) -> Weight {
395 (6_435_000 as Weight)278 (6_538_000 as Weight)
396 .saturating_add(RocksDbWeight::get().reads(1 as Weight))279 .saturating_add(RocksDbWeight::get().reads(1 as Weight))
397 .saturating_add(RocksDbWeight::get().writes(1 as Weight))280 .saturating_add(RocksDbWeight::get().writes(1 as Weight))
398 }281 }
282 // Storage: Common CollectionById (r:1 w:1)
399 fn set_const_on_chain_schema(_b: u32, ) -> Weight {283 fn set_const_on_chain_schema(_b: u32, ) -> Weight {
400 (6_646_000 as Weight)284 (6_542_000 as Weight)
401 .saturating_add(RocksDbWeight::get().reads(1 as Weight))285 .saturating_add(RocksDbWeight::get().reads(1 as Weight))
402 .saturating_add(RocksDbWeight::get().writes(1 as Weight))286 .saturating_add(RocksDbWeight::get().writes(1 as Weight))
403 }287 }
404 fn set_variable_on_chain_schema(_b: u32, ) -> Weight {288 // Storage: Common CollectionById (r:1 w:1)
289 fn set_variable_on_chain_schema(b: u32, ) -> Weight {
405 (6_542_000 as Weight)290 (6_092_000 as Weight)
291 // Standard Error: 0
292 .saturating_add((2_000 as Weight).saturating_mul(b as Weight))
406 .saturating_add(RocksDbWeight::get().reads(1 as Weight))293 .saturating_add(RocksDbWeight::get().reads(1 as Weight))
407 .saturating_add(RocksDbWeight::get().writes(1 as Weight))294 .saturating_add(RocksDbWeight::get().writes(1 as Weight))
408 }295 }
409 fn set_variable_meta_data_nft(_b: u32, ) -> Weight {296 // Storage: Common CollectionById (r:1 w:1)
410 (14_697_000 as Weight)
411 .saturating_add(RocksDbWeight::get().reads(2 as Weight))
412 .saturating_add(RocksDbWeight::get().writes(1 as Weight))
413 }
414 fn set_schema_version() -> Weight {297 fn set_schema_version() -> Weight {
415 (6_566_000 as Weight)298 (6_470_000 as Weight)
416 .saturating_add(RocksDbWeight::get().reads(1 as Weight))299 .saturating_add(RocksDbWeight::get().reads(1 as Weight))
417 .saturating_add(RocksDbWeight::get().writes(1 as Weight))300 .saturating_add(RocksDbWeight::get().writes(1 as Weight))
418 }301 }
302 // Storage: Common CollectionById (r:1 w:1)
419 fn set_collection_limits() -> Weight {303 fn set_collection_limits() -> Weight {
420 (6_349_000 as Weight)304 (6_841_000 as Weight)
305 .saturating_add(RocksDbWeight::get().reads(1 as Weight))
306 .saturating_add(RocksDbWeight::get().writes(1 as Weight))
307 }
308 // Storage: Common CollectionById (r:1 w:1)
309 fn set_meta_update_permission_flag() -> Weight {
310 (6_278_000 as Weight)
421 .saturating_add(RocksDbWeight::get().reads(1 as Weight))311 .saturating_add(RocksDbWeight::get().reads(1 as Weight))
422 .saturating_add(RocksDbWeight::get().writes(1 as Weight))312 .saturating_add(RocksDbWeight::get().writes(1 as Weight))
423 }313 }