referrerpolicy=no-referrer-when-downgrade

asset_hub_westend_runtime/weights/
pallet_asset_conversion.rs

1// Copyright (C) Parity Technologies (UK) Ltd.
2// SPDX-License-Identifier: Apache-2.0
3
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// 	http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16//! Autogenerated weights for `pallet_asset_conversion`
17//!
18//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
19//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
20//! WORST CASE MAP SIZE: `1000000`
21//! HOSTNAME: `73b9817d6032`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
22//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
23
24// Executed Command:
25// frame-omni-bencher
26// v1
27// benchmark
28// pallet
29// --extrinsic=*
30// --runtime=target/production/wbuild/asset-hub-westend-runtime/asset_hub_westend_runtime.wasm
31// --pallet=pallet_asset_conversion
32// --header=/__w/polkadot-sdk/polkadot-sdk/cumulus/file_header.txt
33// --output=./cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights
34// --wasm-execution=compiled
35// --steps=50
36// --repeat=20
37// --heap-pages=4096
38// --no-storage-info
39// --no-min-squares
40// --no-median-slopes
41
42#![cfg_attr(rustfmt, rustfmt_skip)]
43#![allow(unused_parens)]
44#![allow(unused_imports)]
45#![allow(missing_docs)]
46
47use frame_support::{traits::Get, weights::Weight};
48use core::marker::PhantomData;
49
50/// Weight functions for `pallet_asset_conversion`.
51pub struct WeightInfo<T>(PhantomData<T>);
52impl<T: frame_system::Config> pallet_asset_conversion::WeightInfo for WeightInfo<T> {
53	/// Storage: `AssetConversion::Pools` (r:1 w:1)
54	/// Proof: `AssetConversion::Pools` (`max_values`: None, `max_size`: Some(1224), added: 3699, mode: `MaxEncodedLen`)
55	/// Storage: `ForeignAssets::Asset` (r:1 w:0)
56	/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
57	/// Storage: `AssetConversion::NextPoolAssetId` (r:1 w:1)
58	/// Proof: `AssetConversion::NextPoolAssetId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
59	/// Storage: `PoolAssets::Asset` (r:1 w:1)
60	/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
61	/// Storage: `PoolAssets::NextAssetId` (r:1 w:0)
62	/// Proof: `PoolAssets::NextAssetId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
63	/// Storage: `System::Account` (r:1 w:0)
64	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
65	/// Storage: `PoolAssets::Account` (r:1 w:1)
66	/// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
67	fn create_pool() -> Weight {
68		// Proof Size summary in bytes:
69		//  Measured:  `365`
70		//  Estimated: `4689`
71		// Minimum execution time: 59_914_000 picoseconds.
72		Weight::from_parts(62_246_000, 0)
73			.saturating_add(Weight::from_parts(0, 4689))
74			.saturating_add(T::DbWeight::get().reads(7))
75			.saturating_add(T::DbWeight::get().writes(4))
76	}
77	/// Storage: `AssetConversion::Pools` (r:1 w:0)
78	/// Proof: `AssetConversion::Pools` (`max_values`: None, `max_size`: Some(1224), added: 3699, mode: `MaxEncodedLen`)
79	/// Storage: `ForeignAssets::Asset` (r:1 w:1)
80	/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
81	/// Storage: `ForeignAssets::Account` (r:2 w:2)
82	/// Proof: `ForeignAssets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`)
83	/// Storage: `System::Account` (r:1 w:1)
84	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
85	/// Storage: `ForeignAssetsFreezer::FrozenBalances` (r:1 w:0)
86	/// Proof: `ForeignAssetsFreezer::FrozenBalances` (`max_values`: None, `max_size`: Some(682), added: 3157, mode: `MaxEncodedLen`)
87	/// Storage: `PoolAssets::Asset` (r:1 w:1)
88	/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
89	/// Storage: `PoolAssets::Account` (r:2 w:2)
90	/// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
91	fn add_liquidity() -> Weight {
92		// Proof Size summary in bytes:
93		//  Measured:  `929`
94		//  Estimated: `7404`
95		// Minimum execution time: 158_776_000 picoseconds.
96		Weight::from_parts(162_604_000, 0)
97			.saturating_add(Weight::from_parts(0, 7404))
98			.saturating_add(T::DbWeight::get().reads(9))
99			.saturating_add(T::DbWeight::get().writes(7))
100	}
101	/// Storage: `AssetConversion::Pools` (r:1 w:0)
102	/// Proof: `AssetConversion::Pools` (`max_values`: None, `max_size`: Some(1224), added: 3699, mode: `MaxEncodedLen`)
103	/// Storage: `ForeignAssets::Asset` (r:1 w:1)
104	/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
105	/// Storage: `ForeignAssets::Account` (r:2 w:2)
106	/// Proof: `ForeignAssets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`)
107	/// Storage: `ForeignAssetsFreezer::FrozenBalances` (r:1 w:0)
108	/// Proof: `ForeignAssetsFreezer::FrozenBalances` (`max_values`: None, `max_size`: Some(682), added: 3157, mode: `MaxEncodedLen`)
109	/// Storage: `System::Account` (r:1 w:1)
110	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
111	/// Storage: `PoolAssets::Asset` (r:1 w:1)
112	/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
113	/// Storage: `PoolAssets::Account` (r:1 w:1)
114	/// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
115	/// Storage: `PoolAssetsFreezer::FrozenBalances` (r:1 w:0)
116	/// Proof: `PoolAssetsFreezer::FrozenBalances` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
117	fn remove_liquidity() -> Weight {
118		// Proof Size summary in bytes:
119		//  Measured:  `1175`
120		//  Estimated: `7404`
121		// Minimum execution time: 164_106_000 picoseconds.
122		Weight::from_parts(167_613_000, 0)
123			.saturating_add(Weight::from_parts(0, 7404))
124			.saturating_add(T::DbWeight::get().reads(9))
125			.saturating_add(T::DbWeight::get().writes(6))
126	}
127	/// Storage: `ForeignAssets::Asset` (r:2 w:2)
128	/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
129	/// Storage: `ForeignAssets::Account` (r:4 w:4)
130	/// Proof: `ForeignAssets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`)
131	/// Storage: `ForeignAssetsFreezer::FrozenBalances` (r:3 w:0)
132	/// Proof: `ForeignAssetsFreezer::FrozenBalances` (`max_values`: None, `max_size`: Some(682), added: 3157, mode: `MaxEncodedLen`)
133	/// Storage: `System::Account` (r:2 w:2)
134	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
135	/// The range of component `n` is `[2, 3]`.
136	fn swap_exact_tokens_for_tokens(n: u32, ) -> Weight {
137		// Proof Size summary in bytes:
138		//  Measured:  `0 + n * (507 ±0)`
139		//  Estimated: `7404 + n * (3157 ±0)`
140		// Minimum execution time: 108_139_000 picoseconds.
141		Weight::from_parts(110_553_000, 0)
142			.saturating_add(Weight::from_parts(0, 7404))
143			// Standard Error: 211_449
144			.saturating_add(Weight::from_parts(1_718_841, 0).saturating_mul(n.into()))
145			.saturating_add(T::DbWeight::get().reads(6))
146			.saturating_add(T::DbWeight::get().writes(4))
147			.saturating_add(Weight::from_parts(0, 3157).saturating_mul(n.into()))
148	}
149	/// Storage: `System::Account` (r:2 w:2)
150	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
151	/// Storage: `ForeignAssets::Asset` (r:2 w:2)
152	/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
153	/// Storage: `ForeignAssets::Account` (r:4 w:4)
154	/// Proof: `ForeignAssets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`)
155	/// Storage: `ForeignAssetsFreezer::FrozenBalances` (r:3 w:0)
156	/// Proof: `ForeignAssetsFreezer::FrozenBalances` (`max_values`: None, `max_size`: Some(682), added: 3157, mode: `MaxEncodedLen`)
157	/// The range of component `n` is `[2, 3]`.
158	fn swap_tokens_for_exact_tokens(n: u32, ) -> Weight {
159		// Proof Size summary in bytes:
160		//  Measured:  `0 + n * (507 ±0)`
161		//  Estimated: `7404 + n * (3157 ±19)`
162		// Minimum execution time: 108_674_000 picoseconds.
163		Weight::from_parts(111_004_000, 0)
164			.saturating_add(Weight::from_parts(0, 7404))
165			// Standard Error: 229_084
166			.saturating_add(Weight::from_parts(1_871_247, 0).saturating_mul(n.into()))
167			.saturating_add(T::DbWeight::get().reads(6))
168			.saturating_add(T::DbWeight::get().writes(4))
169			.saturating_add(Weight::from_parts(0, 3157).saturating_mul(n.into()))
170	}
171	/// Storage: `AssetConversion::Pools` (r:1 w:0)
172	/// Proof: `AssetConversion::Pools` (`max_values`: None, `max_size`: Some(1224), added: 3699, mode: `MaxEncodedLen`)
173	/// Storage: `ForeignAssets::Asset` (r:1 w:1)
174	/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
175	/// Storage: `System::Account` (r:1 w:0)
176	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
177	/// Storage: `ForeignAssets::Account` (r:1 w:1)
178	/// Proof: `ForeignAssets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`)
179	/// Storage: `PoolAssets::Asset` (r:1 w:1)
180	/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
181	/// Storage: `PoolAssets::Account` (r:1 w:1)
182	/// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
183	/// The range of component `n` is `[0, 3]`.
184	fn touch(n: u32, ) -> Weight {
185		// Proof Size summary in bytes:
186		//  Measured:  `938`
187		//  Estimated: `4689`
188		// Minimum execution time: 43_487_000 picoseconds.
189		Weight::from_parts(49_440_869, 0)
190			.saturating_add(Weight::from_parts(0, 4689))
191			// Standard Error: 295_313
192			.saturating_add(Weight::from_parts(11_739_824, 0).saturating_mul(n.into()))
193			.saturating_add(T::DbWeight::get().reads(6))
194			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
195	}
196}