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_ex(b: u32, ) -> Weight;37 fn burn_item() -> Weight;38 fn set_collection_properties(amount: u32) -> Weight;39 fn delete_collection_properties(amount: u32) -> Weight;40 fn set_token_properties(amount: u32) -> Weight;41 fn delete_token_properties(amount: u32) -> Weight;42 fn set_property_permissions(amount: u32) -> Weight;43 fn transfer() -> Weight;44 fn approve() -> Weight;45 fn transfer_from() -> Weight;46 fn burn_from() -> Weight;47}484950pub struct SubstrateWeight<T>(PhantomData<T>);51impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {52 53 54 fn create_item() -> Weight {55 (14_407_000 as Weight)56 .saturating_add(T::DbWeight::get().reads(2 as Weight))57 .saturating_add(T::DbWeight::get().writes(2 as Weight))58 }59 60 61 fn create_multiple_items_ex(b: u32, ) -> Weight {62 (13_030_000 as Weight)63 64 .saturating_add((3_779_000 as Weight).saturating_mul(b as Weight))65 .saturating_add(T::DbWeight::get().reads(1 as Weight))66 .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))67 .saturating_add(T::DbWeight::get().writes(1 as Weight))68 .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(b as Weight)))69 }70 71 72 fn burn_item() -> Weight {73 (15_565_000 as Weight)74 .saturating_add(T::DbWeight::get().reads(2 as Weight))75 .saturating_add(T::DbWeight::get().writes(2 as Weight))76 }7778 fn set_collection_properties(_amount: u32) -> Weight {79 80 081 }8283 fn delete_collection_properties(_amount: u32) -> Weight {84 85 086 }8788 fn set_token_properties(_amount: u32) -> Weight {89 90 091 }9293 fn delete_token_properties(_amount: u32) -> Weight {94 95 096 }9798 fn set_property_permissions(_amount: u32) -> Weight {99 100 0101 }102103 104 fn transfer() -> Weight {105 (17_713_000 as Weight)106 .saturating_add(T::DbWeight::get().reads(2 as Weight))107 .saturating_add(T::DbWeight::get().writes(2 as Weight))108 }109 110 111 fn approve() -> Weight {112 (14_834_000 as Weight)113 .saturating_add(T::DbWeight::get().reads(1 as Weight))114 .saturating_add(T::DbWeight::get().writes(1 as Weight))115 }116 117 118 fn transfer_from() -> Weight {119 (25_189_000 as Weight)120 .saturating_add(T::DbWeight::get().reads(3 as Weight))121 .saturating_add(T::DbWeight::get().writes(3 as Weight))122 }123 124 125 126 fn burn_from() -> Weight {127 (24_065_000 as Weight)128 .saturating_add(T::DbWeight::get().reads(3 as Weight))129 .saturating_add(T::DbWeight::get().writes(3 as Weight))130 }131}132133134impl WeightInfo for () {135 136 137 fn create_item() -> Weight {138 (14_407_000 as Weight)139 .saturating_add(RocksDbWeight::get().reads(2 as Weight))140 .saturating_add(RocksDbWeight::get().writes(2 as Weight))141 }142 143 144 fn create_multiple_items_ex(b: u32, ) -> Weight {145 (13_030_000 as Weight)146 147 .saturating_add((3_779_000 as Weight).saturating_mul(b as Weight))148 .saturating_add(RocksDbWeight::get().reads(1 as Weight))149 .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))150 .saturating_add(RocksDbWeight::get().writes(1 as Weight))151 .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(b as Weight)))152 }153 154 155 fn burn_item() -> Weight {156 (15_565_000 as Weight)157 .saturating_add(RocksDbWeight::get().reads(2 as Weight))158 .saturating_add(RocksDbWeight::get().writes(2 as Weight))159 }160161 fn set_collection_properties(_amount: u32) -> Weight {162 163 0164 }165166 fn delete_collection_properties(_amount: u32) -> Weight {167 168 0169 }170171 fn set_token_properties(_amount: u32) -> Weight {172 173 0174 }175176 fn delete_token_properties(_amount: u32) -> Weight {177 178 0179 }180181 fn set_property_permissions(_amount: u32) -> Weight {182 183 0184 }185186 187 fn transfer() -> Weight {188 (17_713_000 as Weight)189 .saturating_add(RocksDbWeight::get().reads(2 as Weight))190 .saturating_add(RocksDbWeight::get().writes(2 as Weight))191 }192 193 194 fn approve() -> Weight {195 (14_834_000 as Weight)196 .saturating_add(RocksDbWeight::get().reads(1 as Weight))197 .saturating_add(RocksDbWeight::get().writes(1 as Weight))198 }199 200 201 fn transfer_from() -> Weight {202 (25_189_000 as Weight)203 .saturating_add(RocksDbWeight::get().reads(3 as Weight))204 .saturating_add(RocksDbWeight::get().writes(3 as Weight))205 }206 207 208 209 fn burn_from() -> Weight {210 (24_065_000 as Weight)211 .saturating_add(RocksDbWeight::get().reads(3 as Weight))212 .saturating_add(RocksDbWeight::get().writes(3 as Weight))213 }214}