pallet_asset_conversion/weights.rs
1// This file is part of Substrate.
2
3// Copyright (C) Parity Technologies (UK) Ltd.
4// SPDX-License-Identifier: Apache-2.0
5
6// Licensed under the Apache License, Version 2.0 (the "License");
7// you may not use this file except in compliance with the License.
8// You may obtain a copy of the License at
9//
10// http://www.apache.org/licenses/LICENSE-2.0
11//
12// Unless required by applicable law or agreed to in writing, software
13// distributed under the License is distributed on an "AS IS" BASIS,
14// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15// See the License for the specific language governing permissions and
16// limitations under the License.
17
18// This file is part of Substrate.
19
20// Copyright (C) Parity Technologies (UK) Ltd.
21// SPDX-License-Identifier: Apache-2.0
22
23// Licensed under the Apache License, Version 2.0 (the "License");
24// you may not use this file except in compliance with the License.
25// You may obtain a copy of the License at
26//
27// http://www.apache.org/licenses/LICENSE-2.0
28//
29// Unless required by applicable law or agreed to in writing, software
30// distributed under the License is distributed on an "AS IS" BASIS,
31// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32// See the License for the specific language governing permissions and
33// limitations under the License.
34
35//! Autogenerated weights for `pallet_asset_conversion`
36//!
37//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
38//! DATE: 2026-06-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
39//! WORST CASE MAP SIZE: `1000000`
40//! HOSTNAME: `f42bd6818274`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
41//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024`
42
43// Executed Command:
44// frame-omni-bencher
45// v1
46// benchmark
47// pallet
48// --extrinsic=*
49// --runtime=target/production/wbuild/kitchensink-runtime/kitchensink_runtime.wasm
50// --pallet=pallet_asset_conversion
51// --header=/__w/polkadot-sdk/polkadot-sdk/substrate/HEADER-APACHE2
52// --output=/__w/polkadot-sdk/polkadot-sdk/substrate/frame/asset-conversion/src/weights.rs
53// --wasm-execution=compiled
54// --steps=50
55// --repeat=20
56// --heap-pages=4096
57// --template=substrate/.maintain/frame-weight-template.hbs
58// --no-storage-info
59// --no-min-squares
60// --no-median-slopes
61// --exclude-pallets=pallet_xcm,pallet_xcm_benchmarks::fungible,pallet_xcm_benchmarks::generic,pallet_nomination_pools,pallet_remark,pallet_transaction_storage
62
63#![cfg_attr(rustfmt, rustfmt_skip)]
64#![allow(unused_parens)]
65#![allow(unused_imports)]
66#![allow(missing_docs)]
67#![allow(dead_code)]
68
69use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
70use core::marker::PhantomData;
71
72/// Weight functions needed for `pallet_asset_conversion`.
73pub trait WeightInfo {
74 fn create_pool() -> Weight;
75 fn create_pool_with_fee() -> Weight;
76 fn set_pool_fee() -> Weight;
77 fn add_liquidity() -> Weight;
78 fn remove_liquidity() -> Weight;
79 fn swap_exact_tokens_for_tokens(n: u32, ) -> Weight;
80 fn swap_tokens_for_exact_tokens(n: u32, ) -> Weight;
81 fn touch(n: u32, ) -> Weight;
82 fn get_reserves() -> Weight;
83}
84
85/// Weights for `pallet_asset_conversion` using the Substrate node and recommended hardware.
86pub struct SubstrateWeight<T>(PhantomData<T>);
87impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
88 /// Storage: `AssetConversion::Pools` (r:1 w:1)
89 /// Proof: `AssetConversion::Pools` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
90 /// Storage: `System::Account` (r:2 w:1)
91 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
92 /// Storage: `Assets::Asset` (r:2 w:0)
93 /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
94 /// Storage: `AssetConversion::NextPoolAssetId` (r:1 w:1)
95 /// Proof: `AssetConversion::NextPoolAssetId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
96 /// Storage: `PoolAssets::Asset` (r:1 w:1)
97 /// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
98 /// Storage: `PoolAssets::NextAssetId` (r:1 w:0)
99 /// Proof: `PoolAssets::NextAssetId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
100 /// Storage: `PoolAssets::Account` (r:1 w:1)
101 /// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
102 fn create_pool() -> Weight {
103 // Proof Size summary in bytes:
104 // Measured: `1015`
105 // Estimated: `6360`
106 // Minimum execution time: 100_805_000 picoseconds.
107 Weight::from_parts(105_415_000, 6360)
108 .saturating_add(T::DbWeight::get().reads(9_u64))
109 .saturating_add(T::DbWeight::get().writes(5_u64))
110 }
111 /// Storage: `AssetConversion::Pools` (r:1 w:1)
112 /// Proof: `AssetConversion::Pools` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
113 /// Storage: `System::Account` (r:2 w:1)
114 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
115 /// Storage: `Assets::Asset` (r:2 w:0)
116 /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
117 /// Storage: `AssetConversion::NextPoolAssetId` (r:1 w:1)
118 /// Proof: `AssetConversion::NextPoolAssetId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
119 /// Storage: `PoolAssets::Asset` (r:1 w:1)
120 /// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
121 /// Storage: `PoolAssets::NextAssetId` (r:1 w:0)
122 /// Proof: `PoolAssets::NextAssetId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
123 /// Storage: `PoolAssets::Account` (r:1 w:1)
124 /// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
125 /// Storage: `AssetConversion::PoolFees` (r:0 w:1)
126 /// Proof: `AssetConversion::PoolFees` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
127 fn create_pool_with_fee() -> Weight {
128 // Proof Size summary in bytes:
129 // Measured: `1015`
130 // Estimated: `6360`
131 // Minimum execution time: 104_258_000 picoseconds.
132 Weight::from_parts(108_930_000, 6360)
133 .saturating_add(T::DbWeight::get().reads(9_u64))
134 .saturating_add(T::DbWeight::get().writes(6_u64))
135 }
136 /// Storage: `AssetConversion::Pools` (r:1 w:0)
137 /// Proof: `AssetConversion::Pools` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
138 /// Storage: `AssetConversion::PoolFees` (r:0 w:1)
139 /// Proof: `AssetConversion::PoolFees` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
140 fn set_pool_fee() -> Weight {
141 // Proof Size summary in bytes:
142 // Measured: `157`
143 // Estimated: `3495`
144 // Minimum execution time: 16_359_000 picoseconds.
145 Weight::from_parts(17_732_000, 3495)
146 .saturating_add(T::DbWeight::get().reads(1_u64))
147 .saturating_add(T::DbWeight::get().writes(1_u64))
148 }
149 /// Storage: `AssetConversion::Pools` (r:1 w:0)
150 /// Proof: `AssetConversion::Pools` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
151 /// Storage: `Assets::Asset` (r:2 w:2)
152 /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
153 /// Storage: `Assets::Account` (r:4 w:4)
154 /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
155 /// Storage: `System::Account` (r:1 w:1)
156 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
157 /// Storage: `PoolAssets::Asset` (r:1 w:1)
158 /// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
159 /// Storage: `PoolAssets::Account` (r:2 w:2)
160 /// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
161 fn add_liquidity() -> Weight {
162 // Proof Size summary in bytes:
163 // Measured: `1612`
164 // Estimated: `11426`
165 // Minimum execution time: 156_705_000 picoseconds.
166 Weight::from_parts(164_075_000, 11426)
167 .saturating_add(T::DbWeight::get().reads(11_u64))
168 .saturating_add(T::DbWeight::get().writes(10_u64))
169 }
170 /// Storage: `AssetConversion::Pools` (r:1 w:0)
171 /// Proof: `AssetConversion::Pools` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
172 /// Storage: `Assets::Asset` (r:2 w:2)
173 /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
174 /// Storage: `Assets::Account` (r:4 w:4)
175 /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
176 /// Storage: `PoolAssets::Asset` (r:1 w:1)
177 /// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
178 /// Storage: `PoolAssets::Account` (r:1 w:1)
179 /// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
180 fn remove_liquidity() -> Weight {
181 // Proof Size summary in bytes:
182 // Measured: `1716`
183 // Estimated: `11426`
184 // Minimum execution time: 139_667_000 picoseconds.
185 Weight::from_parts(145_676_000, 11426)
186 .saturating_add(T::DbWeight::get().reads(9_u64))
187 .saturating_add(T::DbWeight::get().writes(8_u64))
188 }
189 /// Storage: `AssetConversion::PoolFees` (r:3 w:0)
190 /// Proof: `AssetConversion::PoolFees` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
191 /// Storage: `Assets::Asset` (r:4 w:4)
192 /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
193 /// Storage: `Assets::Account` (r:8 w:8)
194 /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
195 /// The range of component `n` is `[2, 4]`.
196 fn swap_exact_tokens_for_tokens(n: u32, ) -> Weight {
197 // Proof Size summary in bytes:
198 // Measured: `271 + n * (419 ±0)`
199 // Estimated: `3495 + n * (5218 ±0)`
200 // Minimum execution time: 100_422_000 picoseconds.
201 Weight::from_parts(103_421_000, 3495)
202 // Standard Error: 121_516
203 .saturating_add(Weight::from_parts(13_428_385, 0).saturating_mul(n.into()))
204 .saturating_add(T::DbWeight::get().reads(7_u64))
205 .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
206 .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(n.into())))
207 .saturating_add(Weight::from_parts(0, 5218).saturating_mul(n.into()))
208 }
209 /// Storage: `AssetConversion::PoolFees` (r:3 w:0)
210 /// Proof: `AssetConversion::PoolFees` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
211 /// Storage: `Assets::Asset` (r:4 w:4)
212 /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
213 /// Storage: `Assets::Account` (r:8 w:8)
214 /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
215 /// The range of component `n` is `[2, 4]`.
216 fn swap_tokens_for_exact_tokens(n: u32, ) -> Weight {
217 // Proof Size summary in bytes:
218 // Measured: `271 + n * (419 ±0)`
219 // Estimated: `3495 + n * (5218 ±25)`
220 // Minimum execution time: 100_804_000 picoseconds.
221 Weight::from_parts(103_507_000, 3495)
222 // Standard Error: 121_464
223 .saturating_add(Weight::from_parts(13_470_638, 0).saturating_mul(n.into()))
224 .saturating_add(T::DbWeight::get().reads(7_u64))
225 .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
226 .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(n.into())))
227 .saturating_add(Weight::from_parts(0, 5218).saturating_mul(n.into()))
228 }
229 /// Storage: `AssetConversion::Pools` (r:1 w:0)
230 /// Proof: `AssetConversion::Pools` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
231 /// Storage: `Assets::Asset` (r:2 w:2)
232 /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
233 /// Storage: `System::Account` (r:1 w:0)
234 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
235 /// Storage: `Assets::Account` (r:2 w:2)
236 /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
237 /// Storage: `PoolAssets::Asset` (r:1 w:1)
238 /// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
239 /// Storage: `PoolAssets::Account` (r:1 w:1)
240 /// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
241 /// The range of component `n` is `[0, 3]`.
242 fn touch(n: u32, ) -> Weight {
243 // Proof Size summary in bytes:
244 // Measured: `1676`
245 // Estimated: `6360`
246 // Minimum execution time: 53_122_000 picoseconds.
247 Weight::from_parts(57_344_527, 6360)
248 // Standard Error: 25_964
249 .saturating_add(Weight::from_parts(21_340_234, 0).saturating_mul(n.into()))
250 .saturating_add(T::DbWeight::get().reads(8_u64))
251 .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(n.into())))
252 }
253 /// Storage: `Assets::Asset` (r:2 w:0)
254 /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
255 /// Storage: `Assets::Account` (r:2 w:0)
256 /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
257 fn get_reserves() -> Weight {
258 // Proof Size summary in bytes:
259 // Measured: `915`
260 // Estimated: `6360`
261 // Minimum execution time: 23_606_000 picoseconds.
262 Weight::from_parts(25_001_000, 6360)
263 .saturating_add(T::DbWeight::get().reads(4_u64))
264 }
265}
266
267// For backwards compatibility and tests.
268impl WeightInfo for () {
269 /// Storage: `AssetConversion::Pools` (r:1 w:1)
270 /// Proof: `AssetConversion::Pools` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
271 /// Storage: `System::Account` (r:2 w:1)
272 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
273 /// Storage: `Assets::Asset` (r:2 w:0)
274 /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
275 /// Storage: `AssetConversion::NextPoolAssetId` (r:1 w:1)
276 /// Proof: `AssetConversion::NextPoolAssetId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
277 /// Storage: `PoolAssets::Asset` (r:1 w:1)
278 /// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
279 /// Storage: `PoolAssets::NextAssetId` (r:1 w:0)
280 /// Proof: `PoolAssets::NextAssetId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
281 /// Storage: `PoolAssets::Account` (r:1 w:1)
282 /// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
283 fn create_pool() -> Weight {
284 // Proof Size summary in bytes:
285 // Measured: `1015`
286 // Estimated: `6360`
287 // Minimum execution time: 100_805_000 picoseconds.
288 Weight::from_parts(105_415_000, 6360)
289 .saturating_add(RocksDbWeight::get().reads(9_u64))
290 .saturating_add(RocksDbWeight::get().writes(5_u64))
291 }
292 /// Storage: `AssetConversion::Pools` (r:1 w:1)
293 /// Proof: `AssetConversion::Pools` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
294 /// Storage: `System::Account` (r:2 w:1)
295 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
296 /// Storage: `Assets::Asset` (r:2 w:0)
297 /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
298 /// Storage: `AssetConversion::NextPoolAssetId` (r:1 w:1)
299 /// Proof: `AssetConversion::NextPoolAssetId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
300 /// Storage: `PoolAssets::Asset` (r:1 w:1)
301 /// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
302 /// Storage: `PoolAssets::NextAssetId` (r:1 w:0)
303 /// Proof: `PoolAssets::NextAssetId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
304 /// Storage: `PoolAssets::Account` (r:1 w:1)
305 /// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
306 /// Storage: `AssetConversion::PoolFees` (r:0 w:1)
307 /// Proof: `AssetConversion::PoolFees` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
308 fn create_pool_with_fee() -> Weight {
309 // Proof Size summary in bytes:
310 // Measured: `1015`
311 // Estimated: `6360`
312 // Minimum execution time: 104_258_000 picoseconds.
313 Weight::from_parts(108_930_000, 6360)
314 .saturating_add(RocksDbWeight::get().reads(9_u64))
315 .saturating_add(RocksDbWeight::get().writes(6_u64))
316 }
317 /// Storage: `AssetConversion::Pools` (r:1 w:0)
318 /// Proof: `AssetConversion::Pools` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
319 /// Storage: `AssetConversion::PoolFees` (r:0 w:1)
320 /// Proof: `AssetConversion::PoolFees` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
321 fn set_pool_fee() -> Weight {
322 // Proof Size summary in bytes:
323 // Measured: `157`
324 // Estimated: `3495`
325 // Minimum execution time: 16_359_000 picoseconds.
326 Weight::from_parts(17_732_000, 3495)
327 .saturating_add(RocksDbWeight::get().reads(1_u64))
328 .saturating_add(RocksDbWeight::get().writes(1_u64))
329 }
330 /// Storage: `AssetConversion::Pools` (r:1 w:0)
331 /// Proof: `AssetConversion::Pools` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
332 /// Storage: `Assets::Asset` (r:2 w:2)
333 /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
334 /// Storage: `Assets::Account` (r:4 w:4)
335 /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
336 /// Storage: `System::Account` (r:1 w:1)
337 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
338 /// Storage: `PoolAssets::Asset` (r:1 w:1)
339 /// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
340 /// Storage: `PoolAssets::Account` (r:2 w:2)
341 /// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
342 fn add_liquidity() -> Weight {
343 // Proof Size summary in bytes:
344 // Measured: `1612`
345 // Estimated: `11426`
346 // Minimum execution time: 156_705_000 picoseconds.
347 Weight::from_parts(164_075_000, 11426)
348 .saturating_add(RocksDbWeight::get().reads(11_u64))
349 .saturating_add(RocksDbWeight::get().writes(10_u64))
350 }
351 /// Storage: `AssetConversion::Pools` (r:1 w:0)
352 /// Proof: `AssetConversion::Pools` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
353 /// Storage: `Assets::Asset` (r:2 w:2)
354 /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
355 /// Storage: `Assets::Account` (r:4 w:4)
356 /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
357 /// Storage: `PoolAssets::Asset` (r:1 w:1)
358 /// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
359 /// Storage: `PoolAssets::Account` (r:1 w:1)
360 /// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
361 fn remove_liquidity() -> Weight {
362 // Proof Size summary in bytes:
363 // Measured: `1716`
364 // Estimated: `11426`
365 // Minimum execution time: 139_667_000 picoseconds.
366 Weight::from_parts(145_676_000, 11426)
367 .saturating_add(RocksDbWeight::get().reads(9_u64))
368 .saturating_add(RocksDbWeight::get().writes(8_u64))
369 }
370 /// Storage: `AssetConversion::PoolFees` (r:3 w:0)
371 /// Proof: `AssetConversion::PoolFees` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
372 /// Storage: `Assets::Asset` (r:4 w:4)
373 /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
374 /// Storage: `Assets::Account` (r:8 w:8)
375 /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
376 /// The range of component `n` is `[2, 4]`.
377 fn swap_exact_tokens_for_tokens(n: u32, ) -> Weight {
378 // Proof Size summary in bytes:
379 // Measured: `271 + n * (419 ±0)`
380 // Estimated: `3495 + n * (5218 ±0)`
381 // Minimum execution time: 100_422_000 picoseconds.
382 Weight::from_parts(103_421_000, 3495)
383 // Standard Error: 121_516
384 .saturating_add(Weight::from_parts(13_428_385, 0).saturating_mul(n.into()))
385 .saturating_add(RocksDbWeight::get().reads(7_u64))
386 .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(n.into())))
387 .saturating_add(RocksDbWeight::get().writes((3_u64).saturating_mul(n.into())))
388 .saturating_add(Weight::from_parts(0, 5218).saturating_mul(n.into()))
389 }
390 /// Storage: `AssetConversion::PoolFees` (r:3 w:0)
391 /// Proof: `AssetConversion::PoolFees` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
392 /// Storage: `Assets::Asset` (r:4 w:4)
393 /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
394 /// Storage: `Assets::Account` (r:8 w:8)
395 /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
396 /// The range of component `n` is `[2, 4]`.
397 fn swap_tokens_for_exact_tokens(n: u32, ) -> Weight {
398 // Proof Size summary in bytes:
399 // Measured: `271 + n * (419 ±0)`
400 // Estimated: `3495 + n * (5218 ±25)`
401 // Minimum execution time: 100_804_000 picoseconds.
402 Weight::from_parts(103_507_000, 3495)
403 // Standard Error: 121_464
404 .saturating_add(Weight::from_parts(13_470_638, 0).saturating_mul(n.into()))
405 .saturating_add(RocksDbWeight::get().reads(7_u64))
406 .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(n.into())))
407 .saturating_add(RocksDbWeight::get().writes((3_u64).saturating_mul(n.into())))
408 .saturating_add(Weight::from_parts(0, 5218).saturating_mul(n.into()))
409 }
410 /// Storage: `AssetConversion::Pools` (r:1 w:0)
411 /// Proof: `AssetConversion::Pools` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
412 /// Storage: `Assets::Asset` (r:2 w:2)
413 /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
414 /// Storage: `System::Account` (r:1 w:0)
415 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
416 /// Storage: `Assets::Account` (r:2 w:2)
417 /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
418 /// Storage: `PoolAssets::Asset` (r:1 w:1)
419 /// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
420 /// Storage: `PoolAssets::Account` (r:1 w:1)
421 /// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
422 /// The range of component `n` is `[0, 3]`.
423 fn touch(n: u32, ) -> Weight {
424 // Proof Size summary in bytes:
425 // Measured: `1676`
426 // Estimated: `6360`
427 // Minimum execution time: 53_122_000 picoseconds.
428 Weight::from_parts(57_344_527, 6360)
429 // Standard Error: 25_964
430 .saturating_add(Weight::from_parts(21_340_234, 0).saturating_mul(n.into()))
431 .saturating_add(RocksDbWeight::get().reads(8_u64))
432 .saturating_add(RocksDbWeight::get().writes((2_u64).saturating_mul(n.into())))
433 }
434 /// Storage: `Assets::Asset` (r:2 w:0)
435 /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
436 /// Storage: `Assets::Account` (r:2 w:0)
437 /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
438 fn get_reserves() -> Weight {
439 // Proof Size summary in bytes:
440 // Measured: `915`
441 // Estimated: `6360`
442 // Minimum execution time: 23_606_000 picoseconds.
443 Weight::from_parts(25_001_000, 6360)
444 .saturating_add(RocksDbWeight::get().reads(4_u64))
445 }
446}