12345678910111213141516171819202122232425#![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;323334pub 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 delete_collection_properties(amount: u32) -> Weight;43 fn set_token_properties(amount: u32) -> Weight;44 fn delete_token_properties(amount: u32) -> Weight;45 fn set_property_permissions(amount: u32) -> Weight;46 fn transfer_normal() -> Weight;47 fn transfer_creating() -> Weight;48 fn transfer_removing() -> Weight;49 fn transfer_creating_removing() -> Weight;50 fn approve() -> Weight;51 fn transfer_from_normal() -> Weight;52 fn transfer_from_creating() -> Weight;53 fn transfer_from_removing() -> Weight;54 fn transfer_from_creating_removing() -> Weight;55 fn burn_from() -> Weight;56 fn set_variable_metadata(b: u32, ) -> Weight;57}585960pub struct SubstrateWeight<T>(PhantomData<T>);61impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {62 63 64 65 66 67 68 fn create_item() -> Weight {69 (21_255_000 as Weight)70 .saturating_add(T::DbWeight::get().reads(2 as Weight))71 .saturating_add(T::DbWeight::get().writes(6 as Weight))72 }73 74 75 76 77 78 79 fn create_multiple_items(b: u32, ) -> Weight {80 (18_052_000 as Weight)81 82 .saturating_add((5_549_000 as Weight).saturating_mul(b as Weight))83 .saturating_add(T::DbWeight::get().reads(2 as Weight))84 .saturating_add(T::DbWeight::get().writes(2 as Weight))85 .saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))86 }87 88 89 90 91 92 93 fn create_multiple_items_ex_multiple_items(b: u32, ) -> Weight {94 (15_766_000 as Weight)95 96 .saturating_add((8_187_000 as Weight).saturating_mul(b as Weight))97 .saturating_add(T::DbWeight::get().reads(1 as Weight))98 .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))99 .saturating_add(T::DbWeight::get().writes(1 as Weight))100 .saturating_add(T::DbWeight::get().writes((5 as Weight).saturating_mul(b as Weight)))101 }102 103 104 105 106 107 108 fn create_multiple_items_ex_multiple_owners(b: u32, ) -> Weight {109 (5_675_000 as Weight)110 111 .saturating_add((6_315_000 as Weight).saturating_mul(b as Weight))112 .saturating_add(T::DbWeight::get().reads(1 as Weight))113 .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))114 .saturating_add(T::DbWeight::get().writes(3 as Weight))115 .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))116 }117 118 119 120 121 fn burn_item_partial() -> Weight {122 (23_518_000 as Weight)123 .saturating_add(T::DbWeight::get().reads(3 as Weight))124 .saturating_add(T::DbWeight::get().writes(4 as Weight))125 }126 127 128 129 130 131 132 fn burn_item_fully() -> Weight {133 (32_489_000 as Weight)134 .saturating_add(T::DbWeight::get().reads(4 as Weight))135 .saturating_add(T::DbWeight::get().writes(6 as Weight))136 }137138 fn set_collection_properties(_amount: u32) -> Weight {139 140 0141 }142143 fn delete_collection_properties(_amount: u32) -> Weight {144 145 0146 }147148 fn set_token_properties(_amount: u32) -> Weight {149 150 0151 }152153 fn delete_token_properties(_amount: u32) -> Weight {154 155 0156 }157158 fn set_property_permissions(_amount: u32) -> Weight {159 160 0161 }162163 164 fn transfer_normal() -> Weight {165 (19_766_000 as Weight)166 .saturating_add(T::DbWeight::get().reads(2 as Weight))167 .saturating_add(T::DbWeight::get().writes(2 as Weight))168 }169 170 171 172 fn transfer_creating() -> Weight {173 (23_360_000 as Weight)174 .saturating_add(T::DbWeight::get().reads(3 as Weight))175 .saturating_add(T::DbWeight::get().writes(4 as Weight))176 }177 178 179 180 fn transfer_removing() -> Weight {181 (25_344_000 as Weight)182 .saturating_add(T::DbWeight::get().reads(3 as Weight))183 .saturating_add(T::DbWeight::get().writes(4 as Weight))184 }185 186 187 188 fn transfer_creating_removing() -> Weight {189 (28_553_000 as Weight)190 .saturating_add(T::DbWeight::get().reads(4 as Weight))191 .saturating_add(T::DbWeight::get().writes(6 as Weight))192 }193 194 195 fn approve() -> Weight {196 (15_356_000 as Weight)197 .saturating_add(T::DbWeight::get().reads(1 as Weight))198 .saturating_add(T::DbWeight::get().writes(1 as Weight))199 }200 201 202 fn transfer_from_normal() -> Weight {203 (28_832_000 as Weight)204 .saturating_add(T::DbWeight::get().reads(3 as Weight))205 .saturating_add(T::DbWeight::get().writes(3 as Weight))206 }207 208 209 210 211 fn transfer_from_creating() -> Weight {212 (32_132_000 as Weight)213 .saturating_add(T::DbWeight::get().reads(4 as Weight))214 .saturating_add(T::DbWeight::get().writes(5 as Weight))215 }216 217 218 219 220 fn transfer_from_removing() -> Weight {221 (33_237_000 as Weight)222 .saturating_add(T::DbWeight::get().reads(4 as Weight))223 .saturating_add(T::DbWeight::get().writes(5 as Weight))224 }225 226 227 228 229 fn transfer_from_creating_removing() -> Weight {230 (36_399_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 235 236 237 238 239 240 241 fn burn_from() -> Weight {242 (42_043_000 as Weight)243 .saturating_add(T::DbWeight::get().reads(5 as Weight))244 .saturating_add(T::DbWeight::get().writes(7 as Weight))245 }246 247 fn set_variable_metadata(_b: u32, ) -> Weight {248 (7_364_000 as Weight)249 .saturating_add(T::DbWeight::get().reads(1 as Weight))250 .saturating_add(T::DbWeight::get().writes(1 as Weight))251 }252}253254255impl WeightInfo for () {256 257 258 259 260 261 262 fn create_item() -> Weight {263 (21_255_000 as Weight)264 .saturating_add(RocksDbWeight::get().reads(2 as Weight))265 .saturating_add(RocksDbWeight::get().writes(6 as Weight))266 }267 268 269 270 271 272 273 fn create_multiple_items(b: u32, ) -> Weight {274 (18_052_000 as Weight)275 276 .saturating_add((5_549_000 as Weight).saturating_mul(b as Weight))277 .saturating_add(RocksDbWeight::get().reads(2 as Weight))278 .saturating_add(RocksDbWeight::get().writes(2 as Weight))279 .saturating_add(RocksDbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))280 }281 282 283 284 285 286 287 fn create_multiple_items_ex_multiple_items(b: u32, ) -> Weight {288 (15_766_000 as Weight)289 290 .saturating_add((8_187_000 as Weight).saturating_mul(b as Weight))291 .saturating_add(RocksDbWeight::get().reads(1 as Weight))292 .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))293 .saturating_add(RocksDbWeight::get().writes(1 as Weight))294 .saturating_add(RocksDbWeight::get().writes((5 as Weight).saturating_mul(b as Weight)))295 }296 297 298 299 300 301 302 fn create_multiple_items_ex_multiple_owners(b: u32, ) -> Weight {303 (5_675_000 as Weight)304 305 .saturating_add((6_315_000 as Weight).saturating_mul(b as Weight))306 .saturating_add(RocksDbWeight::get().reads(1 as Weight))307 .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))308 .saturating_add(RocksDbWeight::get().writes(3 as Weight))309 .saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))310 }311 312 313 314 315 fn burn_item_partial() -> Weight {316 (23_518_000 as Weight)317 .saturating_add(RocksDbWeight::get().reads(3 as Weight))318 .saturating_add(RocksDbWeight::get().writes(4 as Weight))319 }320 321 322 323 324 325 326 fn burn_item_fully() -> Weight {327 (32_489_000 as Weight)328 .saturating_add(RocksDbWeight::get().reads(4 as Weight))329 .saturating_add(RocksDbWeight::get().writes(6 as Weight))330 }331332 fn set_collection_properties(_amount: u32) -> Weight {333 334 0335 }336337 fn delete_collection_properties(_amount: u32) -> Weight {338 339 0340 }341342 fn set_token_properties(_amount: u32) -> Weight {343 344 0345 }346347 fn delete_token_properties(_amount: u32) -> Weight {348 349 0350 }351352 fn set_property_permissions(_amount: u32) -> Weight {353 354 0355 }356357 358 fn transfer_normal() -> Weight {359 (19_766_000 as Weight)360 .saturating_add(RocksDbWeight::get().reads(2 as Weight))361 .saturating_add(RocksDbWeight::get().writes(2 as Weight))362 }363 364 365 366 fn transfer_creating() -> Weight {367 (23_360_000 as Weight)368 .saturating_add(RocksDbWeight::get().reads(3 as Weight))369 .saturating_add(RocksDbWeight::get().writes(4 as Weight))370 }371 372 373 374 fn transfer_removing() -> Weight {375 (25_344_000 as Weight)376 .saturating_add(RocksDbWeight::get().reads(3 as Weight))377 .saturating_add(RocksDbWeight::get().writes(4 as Weight))378 }379 380 381 382 fn transfer_creating_removing() -> Weight {383 (28_553_000 as Weight)384 .saturating_add(RocksDbWeight::get().reads(4 as Weight))385 .saturating_add(RocksDbWeight::get().writes(6 as Weight))386 }387 388 389 fn approve() -> Weight {390 (15_356_000 as Weight)391 .saturating_add(RocksDbWeight::get().reads(1 as Weight))392 .saturating_add(RocksDbWeight::get().writes(1 as Weight))393 }394 395 396 fn transfer_from_normal() -> Weight {397 (28_832_000 as Weight)398 .saturating_add(RocksDbWeight::get().reads(3 as Weight))399 .saturating_add(RocksDbWeight::get().writes(3 as Weight))400 }401 402 403 404 405 fn transfer_from_creating() -> Weight {406 (32_132_000 as Weight)407 .saturating_add(RocksDbWeight::get().reads(4 as Weight))408 .saturating_add(RocksDbWeight::get().writes(5 as Weight))409 }410 411 412 413 414 fn transfer_from_removing() -> Weight {415 (33_237_000 as Weight)416 .saturating_add(RocksDbWeight::get().reads(4 as Weight))417 .saturating_add(RocksDbWeight::get().writes(5 as Weight))418 }419 420 421 422 423 fn transfer_from_creating_removing() -> Weight {424 (36_399_000 as Weight)425 .saturating_add(RocksDbWeight::get().reads(5 as Weight))426 .saturating_add(RocksDbWeight::get().writes(7 as Weight))427 }428 429 430 431 432 433 434 435 fn burn_from() -> Weight {436 (42_043_000 as Weight)437 .saturating_add(RocksDbWeight::get().reads(5 as Weight))438 .saturating_add(RocksDbWeight::get().writes(7 as Weight))439 }440 441 fn set_variable_metadata(_b: u32, ) -> Weight {442 (7_364_000 as Weight)443 .saturating_add(RocksDbWeight::get().reads(1 as Weight))444 .saturating_add(RocksDbWeight::get().writes(1 as Weight))445 }446}