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