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(b: u32, ) -> Weight;38 fn burn_item() -> Weight;39 fn set_collection_properties(amount: u32) -> Weight;40 fn delete_collection_properties(amount: u32) -> Weight;41 fn set_token_properties(amount: u32) -> Weight;42 fn delete_token_properties(amount: u32) -> Weight;43 fn set_property_permissions(amount: u32) -> Weight;44 fn transfer() -> Weight;45 fn approve() -> Weight;46 fn transfer_from() -> Weight;47 fn burn_from() -> 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 fn create_item() -> Weight {59 (18_450_000 as Weight)60 .saturating_add(T::DbWeight::get().reads(2 as Weight))61 .saturating_add(T::DbWeight::get().writes(4 as Weight))62 }63 64 65 66 67 fn create_multiple_items(b: u32, ) -> Weight {68 (10_228_000 as Weight)69 70 .saturating_add((4_392_000 as Weight).saturating_mul(b as Weight))71 .saturating_add(T::DbWeight::get().reads(2 as Weight))72 .saturating_add(T::DbWeight::get().writes(2 as Weight))73 .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(b as Weight)))74 }75 76 77 78 79 fn create_multiple_items_ex(b: u32, ) -> Weight {80 (6_543_000 as Weight)81 82 .saturating_add((7_175_000 as Weight).saturating_mul(b as Weight))83 .saturating_add(T::DbWeight::get().reads(1 as Weight))84 .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))85 .saturating_add(T::DbWeight::get().writes(1 as Weight))86 .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))87 }88 89 90 91 92 93 fn burn_item() -> Weight {94 (24_554_000 as Weight)95 .saturating_add(T::DbWeight::get().reads(4 as Weight))96 .saturating_add(T::DbWeight::get().writes(4 as Weight))97 }9899 fn set_collection_properties(amount: u32) -> Weight {100 101 (50_000_000 as Weight).saturating_mul(amount as Weight)102 }103104 fn delete_collection_properties(amount: u32) -> Weight {105 106 (50_000_000 as Weight).saturating_mul(amount as Weight)107 }108109 fn set_token_properties(amount: u32) -> Weight {110 111 (50_000_000 as Weight).saturating_mul(amount as Weight)112 }113114 fn delete_token_properties(amount: u32) -> Weight {115 116 (50_000_000 as Weight).saturating_mul(amount as Weight)117 }118119 fn set_property_permissions(amount: u32) -> Weight {120 121 (50_000_000 as Weight).saturating_mul(amount as Weight)122 }123124 125 126 127 128 fn transfer() -> Weight {129 (28_339_000 as Weight)130 .saturating_add(T::DbWeight::get().reads(4 as Weight))131 .saturating_add(T::DbWeight::get().writes(5 as Weight))132 }133 134 135 fn approve() -> Weight {136 (17_616_000 as Weight)137 .saturating_add(T::DbWeight::get().reads(2 as Weight))138 .saturating_add(T::DbWeight::get().writes(1 as Weight))139 }140 141 142 143 144 fn transfer_from() -> Weight {145 (32_196_000 as Weight)146 .saturating_add(T::DbWeight::get().reads(4 as Weight))147 .saturating_add(T::DbWeight::get().writes(6 as Weight))148 }149 150 151 152 153 154 fn burn_from() -> Weight {155 (27_580_000 as Weight)156 .saturating_add(T::DbWeight::get().reads(4 as Weight))157 .saturating_add(T::DbWeight::get().writes(5 as Weight))158 }159 160 fn set_variable_metadata(_b: u32, ) -> Weight {161 (7_700_000 as Weight)162 .saturating_add(T::DbWeight::get().reads(1 as Weight))163 .saturating_add(T::DbWeight::get().writes(1 as Weight))164 }165}166167168impl WeightInfo for () {169 170 171 172 173 fn create_item() -> Weight {174 (18_450_000 as Weight)175 .saturating_add(RocksDbWeight::get().reads(2 as Weight))176 .saturating_add(RocksDbWeight::get().writes(4 as Weight))177 }178 179 180 181 182 fn create_multiple_items(b: u32, ) -> Weight {183 (10_228_000 as Weight)184 185 .saturating_add((4_392_000 as Weight).saturating_mul(b as Weight))186 .saturating_add(RocksDbWeight::get().reads(2 as Weight))187 .saturating_add(RocksDbWeight::get().writes(2 as Weight))188 .saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(b as Weight)))189 }190 191 192 193 194 fn create_multiple_items_ex(b: u32, ) -> Weight {195 (6_543_000 as Weight)196 197 .saturating_add((7_175_000 as Weight).saturating_mul(b as Weight))198 .saturating_add(RocksDbWeight::get().reads(1 as Weight))199 .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))200 .saturating_add(RocksDbWeight::get().writes(1 as Weight))201 .saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))202 }203 204 205 206 207 208 fn burn_item() -> Weight {209 (24_554_000 as Weight)210 .saturating_add(RocksDbWeight::get().reads(4 as Weight))211 .saturating_add(RocksDbWeight::get().writes(4 as Weight))212 }213214 fn set_collection_properties(amount: u32) -> Weight {215 216 (50_000_000 as Weight).saturating_mul(amount as Weight)217 }218219 fn delete_collection_properties(amount: u32) -> Weight {220 221 (50_000_000 as Weight).saturating_mul(amount as Weight)222 }223224 fn set_token_properties(amount: u32) -> Weight {225 226 (50_000_000 as Weight).saturating_mul(amount as Weight)227 }228229 fn delete_token_properties(amount: u32) -> Weight {230 231 (50_000_000 as Weight).saturating_mul(amount as Weight)232 }233234 fn set_property_permissions(amount: u32) -> Weight {235 236 (50_000_000 as Weight).saturating_mul(amount as Weight)237 }238239 240 241 242 243 fn transfer() -> Weight {244 (28_339_000 as Weight)245 .saturating_add(RocksDbWeight::get().reads(4 as Weight))246 .saturating_add(RocksDbWeight::get().writes(5 as Weight))247 }248 249 250 fn approve() -> Weight {251 (17_616_000 as Weight)252 .saturating_add(RocksDbWeight::get().reads(2 as Weight))253 .saturating_add(RocksDbWeight::get().writes(1 as Weight))254 }255 256 257 258 259 fn transfer_from() -> Weight {260 (32_196_000 as Weight)261 .saturating_add(RocksDbWeight::get().reads(4 as Weight))262 .saturating_add(RocksDbWeight::get().writes(6 as Weight))263 }264 265 266 267 268 269 fn burn_from() -> Weight {270 (27_580_000 as Weight)271 .saturating_add(RocksDbWeight::get().reads(4 as Weight))272 .saturating_add(RocksDbWeight::get().writes(5 as Weight))273 }274 275 fn set_variable_metadata(_b: u32, ) -> Weight {276 (7_700_000 as Weight)277 .saturating_add(RocksDbWeight::get().reads(1 as Weight))278 .saturating_add(RocksDbWeight::get().writes(1 as Weight))279 }280}