12345678910111213141516171819202122232425#![cfg_attr(rustfmt, rustfmt_skip)]26#![allow(unused_parens)]27#![allow(unused_imports)]2829use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};30use sp_std::marker::PhantomData;313233pub trait WeightInfo {34 fn create_item() -> Weight;35 fn create_multiple_items(b: u32, ) -> Weight;36 fn burn_from() -> Weight;37 fn burn_item_partial() -> Weight;38 fn burn_item_fully() -> Weight;39 fn transfer_normal() -> Weight;40 fn transfer_creating() -> Weight;41 fn transfer_removing() -> Weight;42 fn transfer_creating_removing() -> Weight;43 fn approve() -> Weight;44 fn transfer_from_normal() -> Weight;45 fn transfer_from_creating() -> Weight;46 fn transfer_from_removing() -> Weight;47 fn transfer_from_creating_removing() -> Weight;48 fn set_variable_metadata(b: u32, ) -> Weight;49}505152pub struct SubstrateWeight<T>(PhantomData<T>);53impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {54 55 56 57 58 59 60 fn create_item() -> Weight {61 (18_681_000 as Weight)62 .saturating_add(T::DbWeight::get().reads(2 as Weight))63 .saturating_add(T::DbWeight::get().writes(6 as Weight))64 }65 66 67 68 69 70 71 fn create_multiple_items(b: u32, ) -> Weight {72 (13_869_000 as Weight)73 74 .saturating_add((5_611_000 as Weight).saturating_mul(b as Weight))75 .saturating_add(T::DbWeight::get().reads(2 as Weight))76 .saturating_add(T::DbWeight::get().writes(2 as Weight))77 .saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))78 }79 80 81 82 83 fn burn_item_partial() -> Weight {84 (21_591_000 as Weight)85 .saturating_add(T::DbWeight::get().reads(3 as Weight))86 .saturating_add(T::DbWeight::get().writes(4 as Weight))87 }88 89 90 91 92 93 94 fn burn_item_fully() -> Weight {95 (29_257_000 as Weight)96 .saturating_add(T::DbWeight::get().reads(4 as Weight))97 .saturating_add(T::DbWeight::get().writes(6 as Weight))98 }99 100 fn transfer_normal() -> Weight {101 (17_733_000 as Weight)102 .saturating_add(T::DbWeight::get().reads(2 as Weight))103 .saturating_add(T::DbWeight::get().writes(2 as Weight))104 }105 106 107 108 fn transfer_creating() -> Weight {109 (20_943_000 as Weight)110 .saturating_add(T::DbWeight::get().reads(3 as Weight))111 .saturating_add(T::DbWeight::get().writes(4 as Weight))112 }113 114 115 116 fn transfer_removing() -> Weight {117 (22_406_000 as Weight)118 .saturating_add(T::DbWeight::get().reads(3 as Weight))119 .saturating_add(T::DbWeight::get().writes(4 as Weight))120 }121 122 123 124 fn transfer_creating_removing() -> Weight {125 (24_762_000 as Weight)126 .saturating_add(T::DbWeight::get().reads(4 as Weight))127 .saturating_add(T::DbWeight::get().writes(6 as Weight))128 }129 130 131 fn approve() -> Weight {132 (14_109_000 as Weight)133 .saturating_add(T::DbWeight::get().reads(1 as Weight))134 .saturating_add(T::DbWeight::get().writes(1 as Weight))135 }136 137 138 fn transfer_from_normal() -> Weight {139 (25_348_000 as Weight)140 .saturating_add(T::DbWeight::get().reads(3 as Weight))141 .saturating_add(T::DbWeight::get().writes(3 as Weight))142 }143 144 145 146 147 fn transfer_from_creating() -> Weight {148 (28_647_000 as Weight)149 .saturating_add(T::DbWeight::get().reads(4 as Weight))150 .saturating_add(T::DbWeight::get().writes(5 as Weight))151 }152 153 154 155 156 fn transfer_from_removing() -> Weight {157 (30_472_000 as Weight)158 .saturating_add(T::DbWeight::get().reads(4 as Weight))159 .saturating_add(T::DbWeight::get().writes(5 as Weight))160 }161 162 163 164 165 fn transfer_from_creating_removing() -> Weight {166 (32_362_000 as Weight)167 .saturating_add(T::DbWeight::get().reads(5 as Weight))168 .saturating_add(T::DbWeight::get().writes(7 as Weight))169 }170 171 172 173 174 175 176 177 fn burn_from() -> Weight {178 (60_903_000 as Weight)179 .saturating_add(T::DbWeight::get().reads(5 as Weight))180 .saturating_add(T::DbWeight::get().writes(7 as Weight))181 }182 183 fn set_variable_metadata(_b: u32, ) -> Weight {184 (6_801_000 as Weight)185 .saturating_add(T::DbWeight::get().reads(1 as Weight))186 .saturating_add(T::DbWeight::get().writes(1 as Weight))187 }188}189190191impl WeightInfo for () {192 193 194 195 196 197 198 fn create_item() -> Weight {199 (18_681_000 as Weight)200 .saturating_add(RocksDbWeight::get().reads(2 as Weight))201 .saturating_add(RocksDbWeight::get().writes(6 as Weight))202 }203 204 205 206 207 208 209 fn create_multiple_items(b: u32, ) -> Weight {210 (13_869_000 as Weight)211 212 .saturating_add((5_611_000 as Weight).saturating_mul(b as Weight))213 .saturating_add(RocksDbWeight::get().reads(2 as Weight))214 .saturating_add(RocksDbWeight::get().writes(2 as Weight))215 .saturating_add(RocksDbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))216 }217 218 219 220 221 fn burn_item_partial() -> Weight {222 (21_591_000 as Weight)223 .saturating_add(RocksDbWeight::get().reads(3 as Weight))224 .saturating_add(RocksDbWeight::get().writes(4 as Weight))225 }226 227 228 229 230 231 232 fn burn_item_fully() -> Weight {233 (29_257_000 as Weight)234 .saturating_add(RocksDbWeight::get().reads(4 as Weight))235 .saturating_add(RocksDbWeight::get().writes(6 as Weight))236 }237 238 fn transfer_normal() -> Weight {239 (17_733_000 as Weight)240 .saturating_add(RocksDbWeight::get().reads(2 as Weight))241 .saturating_add(RocksDbWeight::get().writes(2 as Weight))242 }243 244 245 246 fn transfer_creating() -> Weight {247 (20_943_000 as Weight)248 .saturating_add(RocksDbWeight::get().reads(3 as Weight))249 .saturating_add(RocksDbWeight::get().writes(4 as Weight))250 }251 252 253 254 fn transfer_removing() -> Weight {255 (22_406_000 as Weight)256 .saturating_add(RocksDbWeight::get().reads(3 as Weight))257 .saturating_add(RocksDbWeight::get().writes(4 as Weight))258 }259 260 261 262 fn transfer_creating_removing() -> Weight {263 (24_762_000 as Weight)264 .saturating_add(RocksDbWeight::get().reads(4 as Weight))265 .saturating_add(RocksDbWeight::get().writes(6 as Weight))266 }267 268 269 fn approve() -> Weight {270 (14_109_000 as Weight)271 .saturating_add(RocksDbWeight::get().reads(1 as Weight))272 .saturating_add(RocksDbWeight::get().writes(1 as Weight))273 }274 275 276 fn transfer_from_normal() -> Weight {277 (25_348_000 as Weight)278 .saturating_add(RocksDbWeight::get().reads(3 as Weight))279 .saturating_add(RocksDbWeight::get().writes(3 as Weight))280 }281 282 283 284 285 fn transfer_from_creating() -> Weight {286 (28_647_000 as Weight)287 .saturating_add(RocksDbWeight::get().reads(4 as Weight))288 .saturating_add(RocksDbWeight::get().writes(5 as Weight))289 }290 291 292 293 294 fn transfer_from_removing() -> Weight {295 (30_472_000 as Weight)296 .saturating_add(RocksDbWeight::get().reads(4 as Weight))297 .saturating_add(RocksDbWeight::get().writes(5 as Weight))298 }299 300 301 302 303 fn transfer_from_creating_removing() -> Weight {304 (32_362_000 as Weight)305 .saturating_add(RocksDbWeight::get().reads(5 as Weight))306 .saturating_add(RocksDbWeight::get().writes(7 as Weight))307 }308 309 310 311 312 313 314 315 fn burn_from() -> Weight {316 (60_903_000 as Weight)317 .saturating_add(RocksDbWeight::get().reads(5 as Weight))318 .saturating_add(RocksDbWeight::get().writes(7 as Weight))319 }320 321 fn set_variable_metadata(_b: u32, ) -> Weight {322 (6_801_000 as Weight)323 .saturating_add(RocksDbWeight::get().reads(1 as Weight))324 .saturating_add(RocksDbWeight::get().writes(1 as Weight))325 }326}