pallet_xcm_transactor/weights.rs
1// Copyright 2019-2025 PureStake Inc.
2// This file is part of Moonbeam.
3
4// Moonbeam is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or
7// (at your option) any later version.
8
9// Moonbeam is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU General Public License for more details.
13
14// You should have received a copy of the GNU General Public License
15// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.
16
17
18//! Autogenerated weights for xcm_transactor
19//!
20//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
21//! DATE: 2023-04-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22//! WORST CASE MAP SIZE: `1000000`
23//! HOSTNAME: `benchmarker`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
24//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
25
26// Executed Command:
27// ./target/release/moonbeam
28// benchmark
29// pallet
30// --execution=wasm
31// --wasm-execution=compiled
32// --pallet
33// *
34// --extrinsic
35// *
36// --steps
37// 50
38// --repeat
39// 20
40// --template=./benchmarking/frame-weight-template.hbs
41// --json-file
42// raw.json
43// --output
44// weights/
45
46#![cfg_attr(rustfmt, rustfmt_skip)]
47#![allow(unused_parens)]
48#![allow(unused_imports)]
49
50use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
51use sp_std::marker::PhantomData;
52
53/// Weight functions needed for xcm_transactor.
54pub trait WeightInfo {
55 fn register() -> Weight;
56 fn deregister() -> Weight;
57 fn set_transact_info() -> Weight;
58 fn remove_transact_info() -> Weight;
59 fn set_fee_per_second() -> Weight;
60 fn transact_through_derivative() -> Weight;
61 fn transact_through_sovereign() -> Weight;
62 fn transact_through_signed() -> Weight;
63 fn hrmp_manage() -> Weight;
64}
65
66/// Weights for xcm_transactor using the Substrate node and recommended hardware.
67pub struct SubstrateWeight<T>(PhantomData<T>);
68impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
69 /// Storage: XcmTransactor IndexToAccount (r:1 w:1)
70 /// Proof Skipped: XcmTransactor IndexToAccount (max_values: None, max_size: None, mode: Measured)
71 fn register() -> Weight {
72 // Proof Size summary in bytes:
73 // Measured: `76`
74 // Estimated: `3541`
75 // Minimum execution time: 17_609_000 picoseconds.
76 Weight::from_parts(18_079_000, 3541)
77 .saturating_add(T::DbWeight::get().reads(1_u64))
78 .saturating_add(T::DbWeight::get().writes(1_u64))
79 }
80 /// Storage: XcmTransactor IndexToAccount (r:0 w:1)
81 /// Proof Skipped: XcmTransactor IndexToAccount (max_values: None, max_size: None, mode: Measured)
82 fn deregister() -> Weight {
83 // Proof Size summary in bytes:
84 // Measured: `0`
85 // Estimated: `0`
86 // Minimum execution time: 12_958_000 picoseconds.
87 Weight::from_parts(13_219_000, 0)
88 .saturating_add(T::DbWeight::get().writes(1_u64))
89 }
90 /// Storage: XcmTransactor TransactInfoWithWeightLimit (r:0 w:1)
91 /// Proof Skipped: XcmTransactor TransactInfoWithWeightLimit (max_values: None, max_size: None, mode: Measured)
92 fn set_transact_info() -> Weight {
93 // Proof Size summary in bytes:
94 // Measured: `0`
95 // Estimated: `0`
96 // Minimum execution time: 16_396_000 picoseconds.
97 Weight::from_parts(16_967_000, 0)
98 .saturating_add(T::DbWeight::get().writes(1_u64))
99 }
100 /// Storage: XcmTransactor TransactInfoWithWeightLimit (r:0 w:1)
101 /// Proof Skipped: XcmTransactor TransactInfoWithWeightLimit (max_values: None, max_size: None, mode: Measured)
102 fn remove_transact_info() -> Weight {
103 // Proof Size summary in bytes:
104 // Measured: `0`
105 // Estimated: `0`
106 // Minimum execution time: 15_457_000 picoseconds.
107 Weight::from_parts(15_752_000, 0)
108 .saturating_add(T::DbWeight::get().writes(1_u64))
109 }
110 /// Storage: XcmTransactor DestinationAssetFeePerSecond (r:0 w:1)
111 /// Proof Skipped: XcmTransactor DestinationAssetFeePerSecond (max_values: None, max_size: None, mode: Measured)
112 fn set_fee_per_second() -> Weight {
113 // Proof Size summary in bytes:
114 // Measured: `0`
115 // Estimated: `0`
116 // Minimum execution time: 16_164_000 picoseconds.
117 Weight::from_parts(16_519_000, 0)
118 .saturating_add(T::DbWeight::get().writes(1_u64))
119 }
120 /// Storage: AssetManager AssetIdType (r:1 w:0)
121 /// Proof Skipped: AssetManager AssetIdType (max_values: None, max_size: None, mode: Measured)
122 /// Storage: XcmTransactor IndexToAccount (r:1 w:0)
123 /// Proof Skipped: XcmTransactor IndexToAccount (max_values: None, max_size: None, mode: Measured)
124 /// Storage: XcmTransactor TransactInfoWithWeightLimit (r:1 w:0)
125 /// Proof Skipped: XcmTransactor TransactInfoWithWeightLimit (max_values: None, max_size: None, mode: Measured)
126 /// Storage: XcmTransactor DestinationAssetFeePerSecond (r:1 w:0)
127 /// Proof Skipped: XcmTransactor DestinationAssetFeePerSecond (max_values: None, max_size: None, mode: Measured)
128 /// Storage: AssetManager AssetTypeId (r:1 w:0)
129 /// Proof Skipped: AssetManager AssetTypeId (max_values: None, max_size: None, mode: Measured)
130 /// Storage: Assets Asset (r:1 w:0)
131 /// Proof: Assets Asset (max_values: None, max_size: Some(174), added: 2649, mode: MaxEncodedLen)
132 fn transact_through_derivative() -> Weight {
133 // Proof Size summary in bytes:
134 // Measured: `443`
135 // Estimated: `23179`
136 // Minimum execution time: 37_628_000 picoseconds.
137 Weight::from_parts(38_250_000, 23179)
138 .saturating_add(T::DbWeight::get().reads(6_u64))
139 }
140 /// Storage: AssetManager AssetIdType (r:1 w:0)
141 /// Proof Skipped: AssetManager AssetIdType (max_values: None, max_size: None, mode: Measured)
142 /// Storage: XcmTransactor TransactInfoWithWeightLimit (r:1 w:0)
143 /// Proof Skipped: XcmTransactor TransactInfoWithWeightLimit (max_values: None, max_size: None, mode: Measured)
144 /// Storage: XcmTransactor DestinationAssetFeePerSecond (r:1 w:0)
145 /// Proof Skipped: XcmTransactor DestinationAssetFeePerSecond (max_values: None, max_size: None, mode: Measured)
146 /// Storage: AssetManager AssetTypeId (r:1 w:0)
147 /// Proof Skipped: AssetManager AssetTypeId (max_values: None, max_size: None, mode: Measured)
148 /// Storage: Assets Asset (r:1 w:0)
149 /// Proof: Assets Asset (max_values: None, max_size: Some(174), added: 2649, mode: MaxEncodedLen)
150 fn transact_through_sovereign() -> Weight {
151 // Proof Size summary in bytes:
152 // Measured: `381`
153 // Estimated: `19023`
154 // Minimum execution time: 31_621_000 picoseconds.
155 Weight::from_parts(32_023_000, 19023)
156 .saturating_add(T::DbWeight::get().reads(5_u64))
157 }
158 /// Storage: AssetManager AssetIdType (r:1 w:0)
159 /// Proof Skipped: AssetManager AssetIdType (max_values: None, max_size: None, mode: Measured)
160 /// Storage: XcmTransactor TransactInfoWithWeightLimit (r:1 w:0)
161 /// Proof Skipped: XcmTransactor TransactInfoWithWeightLimit (max_values: None, max_size: None, mode: Measured)
162 /// Storage: XcmTransactor DestinationAssetFeePerSecond (r:1 w:0)
163 /// Proof Skipped: XcmTransactor DestinationAssetFeePerSecond (max_values: None, max_size: None, mode: Measured)
164 /// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
165 /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured)
166 /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1)
167 /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
168 /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0)
169 /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
170 /// Storage: ParachainSystem HostConfiguration (r:1 w:0)
171 /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured)
172 /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
173 /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured)
174 fn transact_through_signed() -> Weight {
175 // Proof Size summary in bytes:
176 // Measured: `425`
177 // Estimated: `23200`
178 // Minimum execution time: 67_658_000 picoseconds.
179 Weight::from_parts(68_448_000, 23200)
180 .saturating_add(T::DbWeight::get().reads(8_u64))
181 .saturating_add(T::DbWeight::get().writes(2_u64))
182 }
183 /// Storage: AssetManager AssetIdType (r:1 w:0)
184 /// Proof Skipped: AssetManager AssetIdType (max_values: None, max_size: None, mode: Measured)
185 /// Storage: XcmTransactor TransactInfoWithWeightLimit (r:1 w:0)
186 /// Proof Skipped: XcmTransactor TransactInfoWithWeightLimit (max_values: None, max_size: None, mode: Measured)
187 /// Storage: XcmTransactor DestinationAssetFeePerSecond (r:1 w:0)
188 /// Proof Skipped: XcmTransactor DestinationAssetFeePerSecond (max_values: None, max_size: None, mode: Measured)
189 /// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
190 /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured)
191 /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1)
192 /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
193 /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0)
194 /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
195 /// Storage: ParachainSystem HostConfiguration (r:1 w:0)
196 /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured)
197 /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
198 /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured)
199 fn hrmp_manage() -> Weight {
200 // Proof Size summary in bytes:
201 // Measured: `425`
202 // Estimated: `23200`
203 // Minimum execution time: 69_320_000 picoseconds.
204 Weight::from_parts(69_951_000, 23200)
205 .saturating_add(T::DbWeight::get().reads(8_u64))
206 .saturating_add(T::DbWeight::get().writes(2_u64))
207 }
208}
209
210// For backwards compatibility and tests
211impl WeightInfo for () {
212 /// Storage: XcmTransactor IndexToAccount (r:1 w:1)
213 /// Proof Skipped: XcmTransactor IndexToAccount (max_values: None, max_size: None, mode: Measured)
214 fn register() -> Weight {
215 // Proof Size summary in bytes:
216 // Measured: `76`
217 // Estimated: `3541`
218 // Minimum execution time: 17_609_000 picoseconds.
219 Weight::from_parts(18_079_000, 3541)
220 .saturating_add(RocksDbWeight::get().reads(1_u64))
221 .saturating_add(RocksDbWeight::get().writes(1_u64))
222 }
223 /// Storage: XcmTransactor IndexToAccount (r:0 w:1)
224 /// Proof Skipped: XcmTransactor IndexToAccount (max_values: None, max_size: None, mode: Measured)
225 fn deregister() -> Weight {
226 // Proof Size summary in bytes:
227 // Measured: `0`
228 // Estimated: `0`
229 // Minimum execution time: 12_958_000 picoseconds.
230 Weight::from_parts(13_219_000, 0)
231 .saturating_add(RocksDbWeight::get().writes(1_u64))
232 }
233 /// Storage: XcmTransactor TransactInfoWithWeightLimit (r:0 w:1)
234 /// Proof Skipped: XcmTransactor TransactInfoWithWeightLimit (max_values: None, max_size: None, mode: Measured)
235 fn set_transact_info() -> Weight {
236 // Proof Size summary in bytes:
237 // Measured: `0`
238 // Estimated: `0`
239 // Minimum execution time: 16_396_000 picoseconds.
240 Weight::from_parts(16_967_000, 0)
241 .saturating_add(RocksDbWeight::get().writes(1_u64))
242 }
243 /// Storage: XcmTransactor TransactInfoWithWeightLimit (r:0 w:1)
244 /// Proof Skipped: XcmTransactor TransactInfoWithWeightLimit (max_values: None, max_size: None, mode: Measured)
245 fn remove_transact_info() -> Weight {
246 // Proof Size summary in bytes:
247 // Measured: `0`
248 // Estimated: `0`
249 // Minimum execution time: 15_457_000 picoseconds.
250 Weight::from_parts(15_752_000, 0)
251 .saturating_add(RocksDbWeight::get().writes(1_u64))
252 }
253 /// Storage: XcmTransactor DestinationAssetFeePerSecond (r:0 w:1)
254 /// Proof Skipped: XcmTransactor DestinationAssetFeePerSecond (max_values: None, max_size: None, mode: Measured)
255 fn set_fee_per_second() -> Weight {
256 // Proof Size summary in bytes:
257 // Measured: `0`
258 // Estimated: `0`
259 // Minimum execution time: 16_164_000 picoseconds.
260 Weight::from_parts(16_519_000, 0)
261 .saturating_add(RocksDbWeight::get().writes(1_u64))
262 }
263 /// Storage: AssetManager AssetIdType (r:1 w:0)
264 /// Proof Skipped: AssetManager AssetIdType (max_values: None, max_size: None, mode: Measured)
265 /// Storage: XcmTransactor IndexToAccount (r:1 w:0)
266 /// Proof Skipped: XcmTransactor IndexToAccount (max_values: None, max_size: None, mode: Measured)
267 /// Storage: XcmTransactor TransactInfoWithWeightLimit (r:1 w:0)
268 /// Proof Skipped: XcmTransactor TransactInfoWithWeightLimit (max_values: None, max_size: None, mode: Measured)
269 /// Storage: XcmTransactor DestinationAssetFeePerSecond (r:1 w:0)
270 /// Proof Skipped: XcmTransactor DestinationAssetFeePerSecond (max_values: None, max_size: None, mode: Measured)
271 /// Storage: AssetManager AssetTypeId (r:1 w:0)
272 /// Proof Skipped: AssetManager AssetTypeId (max_values: None, max_size: None, mode: Measured)
273 /// Storage: Assets Asset (r:1 w:0)
274 /// Proof: Assets Asset (max_values: None, max_size: Some(174), added: 2649, mode: MaxEncodedLen)
275 fn transact_through_derivative() -> Weight {
276 // Proof Size summary in bytes:
277 // Measured: `443`
278 // Estimated: `23179`
279 // Minimum execution time: 37_628_000 picoseconds.
280 Weight::from_parts(38_250_000, 23179)
281 .saturating_add(RocksDbWeight::get().reads(6_u64))
282 }
283 /// Storage: AssetManager AssetIdType (r:1 w:0)
284 /// Proof Skipped: AssetManager AssetIdType (max_values: None, max_size: None, mode: Measured)
285 /// Storage: XcmTransactor TransactInfoWithWeightLimit (r:1 w:0)
286 /// Proof Skipped: XcmTransactor TransactInfoWithWeightLimit (max_values: None, max_size: None, mode: Measured)
287 /// Storage: XcmTransactor DestinationAssetFeePerSecond (r:1 w:0)
288 /// Proof Skipped: XcmTransactor DestinationAssetFeePerSecond (max_values: None, max_size: None, mode: Measured)
289 /// Storage: AssetManager AssetTypeId (r:1 w:0)
290 /// Proof Skipped: AssetManager AssetTypeId (max_values: None, max_size: None, mode: Measured)
291 /// Storage: Assets Asset (r:1 w:0)
292 /// Proof: Assets Asset (max_values: None, max_size: Some(174), added: 2649, mode: MaxEncodedLen)
293 fn transact_through_sovereign() -> Weight {
294 // Proof Size summary in bytes:
295 // Measured: `381`
296 // Estimated: `19023`
297 // Minimum execution time: 31_621_000 picoseconds.
298 Weight::from_parts(32_023_000, 19023)
299 .saturating_add(RocksDbWeight::get().reads(5_u64))
300 }
301 /// Storage: AssetManager AssetIdType (r:1 w:0)
302 /// Proof Skipped: AssetManager AssetIdType (max_values: None, max_size: None, mode: Measured)
303 /// Storage: XcmTransactor TransactInfoWithWeightLimit (r:1 w:0)
304 /// Proof Skipped: XcmTransactor TransactInfoWithWeightLimit (max_values: None, max_size: None, mode: Measured)
305 /// Storage: XcmTransactor DestinationAssetFeePerSecond (r:1 w:0)
306 /// Proof Skipped: XcmTransactor DestinationAssetFeePerSecond (max_values: None, max_size: None, mode: Measured)
307 /// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
308 /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured)
309 /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1)
310 /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
311 /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0)
312 /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
313 /// Storage: ParachainSystem HostConfiguration (r:1 w:0)
314 /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured)
315 /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
316 /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured)
317 fn transact_through_signed() -> Weight {
318 // Proof Size summary in bytes:
319 // Measured: `425`
320 // Estimated: `23200`
321 // Minimum execution time: 67_658_000 picoseconds.
322 Weight::from_parts(68_448_000, 23200)
323 .saturating_add(RocksDbWeight::get().reads(8_u64))
324 .saturating_add(RocksDbWeight::get().writes(2_u64))
325 }
326 /// Storage: AssetManager AssetIdType (r:1 w:0)
327 /// Proof Skipped: AssetManager AssetIdType (max_values: None, max_size: None, mode: Measured)
328 /// Storage: XcmTransactor TransactInfoWithWeightLimit (r:1 w:0)
329 /// Proof Skipped: XcmTransactor TransactInfoWithWeightLimit (max_values: None, max_size: None, mode: Measured)
330 /// Storage: XcmTransactor DestinationAssetFeePerSecond (r:1 w:0)
331 /// Proof Skipped: XcmTransactor DestinationAssetFeePerSecond (max_values: None, max_size: None, mode: Measured)
332 /// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
333 /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured)
334 /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1)
335 /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
336 /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0)
337 /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
338 /// Storage: ParachainSystem HostConfiguration (r:1 w:0)
339 /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured)
340 /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
341 /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured)
342 fn hrmp_manage() -> Weight {
343 // Proof Size summary in bytes:
344 // Measured: `425`
345 // Estimated: `23200`
346 // Minimum execution time: 69_320_000 picoseconds.
347 Weight::from_parts(69_951_000, 23200)
348 .saturating_add(RocksDbWeight::get().reads(8_u64))
349 .saturating_add(RocksDbWeight::get().writes(2_u64))
350 }
351}