git.delta.rocks / unique-network / refs/commits / 28ed45667882

difftreelog

fix nft weights

Yaroslav Bolyukin2022-05-23parent: #d15bc44.patch.diff
in: master

1 file changed

modifiedpallets/nonfungible/src/weights.rsdiffbeforeafterboth
36 fn create_multiple_items(b: u32, ) -> Weight;36 fn create_multiple_items(b: u32, ) -> Weight;
37 fn create_multiple_items_ex(b: u32, ) -> Weight;37 fn create_multiple_items_ex(b: u32, ) -> Weight;
38 fn burn_item() -> Weight;38 fn burn_item() -> Weight;
39 fn set_collection_properties(amount: u32) -> Weight;39 fn transfer() -> Weight;
40 fn delete_collection_properties(amount: u32) -> Weight;40 fn approve() -> Weight;
41 fn set_token_properties(amount: u32) -> Weight;41 fn transfer_from() -> Weight;
42 fn delete_token_properties(amount: u32) -> Weight;42 fn burn_from() -> Weight;
43 fn set_property_permissions(amount: u32) -> Weight;43 fn set_property_permissions(b: u32) -> Weight;
44 fn transfer() -> Weight;44 fn set_token_properties(b: u32) -> Weight;
45 fn approve() -> Weight;45 fn delete_token_properties(b: u32) -> Weight;
46 fn transfer_from() -> Weight;
47 fn burn_from() -> Weight;
48}46}
4947
50/// Weights for pallet_nonfungible using the Substrate node and recommended hardware.48/// Weights for pallet_nonfungible using the Substrate node and recommended hardware.
95 .saturating_add(T::DbWeight::get().writes(4 as Weight))93 .saturating_add(T::DbWeight::get().writes(4 as Weight))
96 }94 }
97
98 fn set_collection_properties(amount: u32) -> Weight {
99 // TODO calculate appropriate weight
100 (50_000_000 as Weight).saturating_mul(amount as Weight)
101 }
102
103 fn delete_collection_properties(amount: u32) -> Weight {
104 // TODO calculate appropriate weight
105 (50_000_000 as Weight).saturating_mul(amount as Weight)
106 }
107
108 fn set_token_properties(amount: u32) -> Weight {
109 // TODO calculate appropriate weight
110 (50_000_000 as Weight).saturating_mul(amount as Weight)
111 }
112
113 fn delete_token_properties(amount: u32) -> Weight {
114 // TODO calculate appropriate weight
115 (50_000_000 as Weight).saturating_mul(amount as Weight)
116 }
117
118 fn set_property_permissions(amount: u32) -> Weight {
119 // TODO calculate appropriate weight
120 (50_000_000 as Weight).saturating_mul(amount as Weight)
121 }
12295
123 // Storage: Nonfungible TokenData (r:1 w:1)96 // Storage: Nonfungible TokenData (r:1 w:1)
124 // Storage: Nonfungible AccountBalance (r:2 w:2)97 // Storage: Nonfungible AccountBalance (r:2 w:2)
151 // Storage: Nonfungible AccountBalance (r:1 w:1)124 // Storage: Nonfungible AccountBalance (r:1 w:1)
152 // Storage: Nonfungible Owned (r:0 w:1)125 // Storage: Nonfungible Owned (r:0 w:1)
153 fn burn_from() -> Weight {126 fn burn_from() -> Weight {
127 (27_580_000 as Weight)
128 .saturating_add(T::DbWeight::get().reads(4 as Weight))
129 .saturating_add(T::DbWeight::get().writes(5 as Weight))
154 }130 }
155 // Storage: Common CollectionPropertyPermissions (r:1 w:1)131 // Storage: Common CollectionPropertyPermissions (r:1 w:1)
156 fn set_property_permissions(b: u32, ) -> Weight {132 fn set_property_permissions(b: u32, ) -> Weight {
229 .saturating_add(RocksDbWeight::get().writes(4 as Weight))205 .saturating_add(RocksDbWeight::get().writes(4 as Weight))
230 }206 }
231
232 fn set_collection_properties(amount: u32) -> Weight {
233 // TODO calculate appropriate weight
234 (50_000_000 as Weight).saturating_mul(amount as Weight)
235 }
236
237 fn delete_collection_properties(amount: u32) -> Weight {
238 // TODO calculate appropriate weight
239 (50_000_000 as Weight).saturating_mul(amount as Weight)
240 }
241
242 fn set_token_properties(amount: u32) -> Weight {
243 // TODO calculate appropriate weight
244 (50_000_000 as Weight).saturating_mul(amount as Weight)
245 }
246
247 fn delete_token_properties(amount: u32) -> Weight {
248 // TODO calculate appropriate weight
249 (50_000_000 as Weight).saturating_mul(amount as Weight)
250 }
251
252 fn set_property_permissions(amount: u32) -> Weight {
253 // TODO calculate appropriate weight
254 (50_000_000 as Weight).saturating_mul(amount as Weight)
255 }
256207
257 // Storage: Nonfungible TokenData (r:1 w:1)208 // Storage: Nonfungible TokenData (r:1 w:1)
258 // Storage: Nonfungible AccountBalance (r:2 w:2)209 // Storage: Nonfungible AccountBalance (r:2 w:2)
285 // Storage: Nonfungible AccountBalance (r:1 w:1)236 // Storage: Nonfungible AccountBalance (r:1 w:1)
286 // Storage: Nonfungible Owned (r:0 w:1)237 // Storage: Nonfungible Owned (r:0 w:1)
287 fn burn_from() -> Weight {238 fn burn_from() -> Weight {
239 (27_580_000 as Weight)
240 .saturating_add(RocksDbWeight::get().reads(4 as Weight))
241 .saturating_add(RocksDbWeight::get().writes(5 as Weight))
288 }242 }
289 // Storage: Common CollectionPropertyPermissions (r:1 w:1)243 // Storage: Common CollectionPropertyPermissions (r:1 w:1)
290 fn set_property_permissions(b: u32, ) -> Weight {244 fn set_property_permissions(b: u32, ) -> Weight {