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