1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221

// This file is part of Astar.

// Copyright (C) Stake Technologies Pte.Ltd.
// SPDX-License-Identifier: GPL-3.0-or-later

// Astar is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Astar is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Astar. If not, see <http://www.gnu.org/licenses/>.

//! Autogenerated weights for `pallet_xc_asset_config`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-09-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `gh-runner-01-ovh`, CPU: `Intel(R) Xeon(R) E-2236 CPU @ 3.40GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024

// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --runtime=./target/release/wbuild/astar-runtime/astar_runtime.compact.compressed.wasm
// --steps=50
// --repeat=20
// --pallet=pallet_xc_asset_config
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --output=./benchmark-results/astar/pallet/xc_asset_config_weights.rs
// --template=./scripts/templates/pallet-weight-template.hbs

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
#![allow(dead_code)]

use core::marker::PhantomData;
use frame_support::weights::constants::RocksDbWeight;
use frame_support::{traits::Get, weights::Weight};

/// Weight info trait.
pub trait WeightInfo {
	fn register_asset_location() -> Weight;
	fn set_asset_units_per_second() -> Weight;
	fn change_existing_asset_location() -> Weight;
	fn remove_payment_asset() -> Weight;
	fn remove_asset() -> Weight;
	fn update_migration_step() -> Weight;
}

/// Weight functions for `pallet_xc_asset_config`.
pub struct SubstrateWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
	/// Storage: `XcAssetConfig::AssetIdToLocation` (r:1 w:1)
	/// Proof: `XcAssetConfig::AssetIdToLocation` (`max_values`: None, `max_size`: None, mode: `Measured`)
	/// Storage: `XcAssetConfig::AssetLocationToId` (r:0 w:1)
	/// Proof: `XcAssetConfig::AssetLocationToId` (`max_values`: None, `max_size`: None, mode: `Measured`)
	fn register_asset_location() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `6`
		//  Estimated: `3471`
		// Minimum execution time: 13_780_000 picoseconds.
		Weight::from_parts(14_026_000, 0)
			.saturating_add(Weight::from_parts(0, 3471))
			.saturating_add(T::DbWeight::get().reads(1))
			.saturating_add(T::DbWeight::get().writes(2))
	}
	/// Storage: `XcAssetConfig::AssetLocationToId` (r:1 w:0)
	/// Proof: `XcAssetConfig::AssetLocationToId` (`max_values`: None, `max_size`: None, mode: `Measured`)
	/// Storage: `XcAssetConfig::AssetLocationUnitsPerSecond` (r:0 w:1)
	/// Proof: `XcAssetConfig::AssetLocationUnitsPerSecond` (`max_values`: None, `max_size`: None, mode: `Measured`)
	fn set_asset_units_per_second() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `93`
		//  Estimated: `3558`
		// Minimum execution time: 14_311_000 picoseconds.
		Weight::from_parts(14_650_000, 0)
			.saturating_add(Weight::from_parts(0, 3558))
			.saturating_add(T::DbWeight::get().reads(1))
			.saturating_add(T::DbWeight::get().writes(1))
	}
	/// Storage: `XcAssetConfig::AssetIdToLocation` (r:1 w:1)
	/// Proof: `XcAssetConfig::AssetIdToLocation` (`max_values`: None, `max_size`: None, mode: `Measured`)
	/// Storage: `XcAssetConfig::AssetLocationUnitsPerSecond` (r:1 w:2)
	/// Proof: `XcAssetConfig::AssetLocationUnitsPerSecond` (`max_values`: None, `max_size`: None, mode: `Measured`)
	/// Storage: `XcAssetConfig::AssetLocationToId` (r:0 w:2)
	/// Proof: `XcAssetConfig::AssetLocationToId` (`max_values`: None, `max_size`: None, mode: `Measured`)
	fn change_existing_asset_location() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `141`
		//  Estimated: `3606`
		// Minimum execution time: 21_381_000 picoseconds.
		Weight::from_parts(21_714_000, 0)
			.saturating_add(Weight::from_parts(0, 3606))
			.saturating_add(T::DbWeight::get().reads(2))
			.saturating_add(T::DbWeight::get().writes(5))
	}
	/// Storage: `XcAssetConfig::AssetLocationUnitsPerSecond` (r:0 w:1)
	/// Proof: `XcAssetConfig::AssetLocationUnitsPerSecond` (`max_values`: None, `max_size`: None, mode: `Measured`)
	fn remove_payment_asset() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `0`
		//  Estimated: `0`
		// Minimum execution time: 8_725_000 picoseconds.
		Weight::from_parts(8_963_000, 0)
			.saturating_add(Weight::from_parts(0, 0))
			.saturating_add(T::DbWeight::get().writes(1))
	}
	/// Storage: `XcAssetConfig::AssetIdToLocation` (r:1 w:1)
	/// Proof: `XcAssetConfig::AssetIdToLocation` (`max_values`: None, `max_size`: None, mode: `Measured`)
	/// Storage: `XcAssetConfig::AssetLocationUnitsPerSecond` (r:0 w:1)
	/// Proof: `XcAssetConfig::AssetLocationUnitsPerSecond` (`max_values`: None, `max_size`: None, mode: `Measured`)
	/// Storage: `XcAssetConfig::AssetLocationToId` (r:0 w:1)
	/// Proof: `XcAssetConfig::AssetLocationToId` (`max_values`: None, `max_size`: None, mode: `Measured`)
	fn remove_asset() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `128`
		//  Estimated: `3593`
		// Minimum execution time: 16_355_000 picoseconds.
		Weight::from_parts(16_674_000, 0)
			.saturating_add(Weight::from_parts(0, 3593))
			.saturating_add(T::DbWeight::get().reads(1))
			.saturating_add(T::DbWeight::get().writes(3))
	}
	/// Storage: `XcAssetConfig::AssetHubMigrationStep` (r:0 w:1)
	/// Proof: `XcAssetConfig::AssetHubMigrationStep` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
	fn update_migration_step() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `0`
		//  Estimated: `0`
		// Minimum execution time: 6_837_000 picoseconds.
		Weight::from_parts(7_033_000, 0)
			.saturating_add(Weight::from_parts(0, 0))
			.saturating_add(T::DbWeight::get().writes(1))
	}
}
// For backwards compatibility and tests
impl WeightInfo for () {
	// Storage: XcAssetConfig AssetIdToLocation (r:1 w:1)
	// Proof Skipped: XcAssetConfig AssetIdToLocation (max_values: None, max_size: None, mode: Measured)
	// Storage: EVM AccountCodes (r:0 w:1)
	// Proof Skipped: EVM AccountCodes (max_values: None, max_size: None, mode: Measured)
	// Storage: XcAssetConfig AssetLocationToId (r:0 w:1)
	// Proof Skipped: XcAssetConfig AssetLocationToId (max_values: None, max_size: None, mode: Measured)
	fn register_asset_location() -> Weight {
		// Minimum execution time: 14_026_000 picoseconds.
		Weight::from_parts(14_026_000, 0)
			.saturating_add(Weight::from_parts(0, 3471))
			.saturating_add(RocksDbWeight::get().reads(1_u64))
			.saturating_add(RocksDbWeight::get().writes(3_u64))
	}
	// Storage: XcAssetConfig AssetLocationToId (r:1 w:0)
	// Proof Skipped: XcAssetConfig AssetLocationToId (max_values: None, max_size: None, mode: Measured)
	// Storage: XcAssetConfig AssetLocationUnitsPerSecond (r:0 w:1)
	// Proof Skipped: XcAssetConfig AssetLocationUnitsPerSecond (max_values: None, max_size: None, mode: Measured)
	fn set_asset_units_per_second() -> Weight {
		// Minimum execution time: 14_650_000 picoseconds.
		Weight::from_parts(14_650_000, 0)
			.saturating_add(Weight::from_parts(0, 3558))
			.saturating_add(RocksDbWeight::get().reads(1_u64))
			.saturating_add(RocksDbWeight::get().writes(1_u64))
	}
	// Storage: XcAssetConfig AssetIdToLocation (r:1 w:1)
	// Proof Skipped: XcAssetConfig AssetIdToLocation (max_values: None, max_size: None, mode: Measured)
	// Storage: XcAssetConfig AssetLocationUnitsPerSecond (r:1 w:2)
	// Proof Skipped: XcAssetConfig AssetLocationUnitsPerSecond (max_values: None, max_size: None, mode: Measured)
	// Storage: XcAssetConfig AssetLocationToId (r:0 w:2)
	// Proof Skipped: XcAssetConfig AssetLocationToId (max_values: None, max_size: None, mode: Measured)
	fn change_existing_asset_location() -> Weight {
		// Minimum execution time: 21_714_000 picoseconds.
		Weight::from_parts(21_714_000, 0)
			.saturating_add(Weight::from_parts(0, 3606))
			.saturating_add(RocksDbWeight::get().reads(2_u64))
			.saturating_add(RocksDbWeight::get().writes(5_u64))
	}
	// Storage: XcAssetConfig AssetLocationUnitsPerSecond (r:0 w:1)
	// Proof Skipped: XcAssetConfig AssetLocationUnitsPerSecond (max_values: None, max_size: None, mode: Measured)
	fn remove_payment_asset() -> Weight {
		// Minimum execution time: 8_963_000 picoseconds.
		Weight::from_parts(8_963_000, 0)
			.saturating_add(Weight::from_parts(0, 0))
			.saturating_add(RocksDbWeight::get().writes(1_u64))
	}
	// Storage: XcAssetConfig AssetIdToLocation (r:1 w:1)
	// Proof Skipped: XcAssetConfig AssetIdToLocation (max_values: None, max_size: None, mode: Measured)
	// Storage: EVM AccountCodes (r:0 w:1)
	// Proof Skipped: EVM AccountCodes (max_values: None, max_size: None, mode: Measured)
	// Storage: XcAssetConfig AssetLocationUnitsPerSecond (r:0 w:1)
	// Proof Skipped: XcAssetConfig AssetLocationUnitsPerSecond (max_values: None, max_size: None, mode: Measured)
	// Storage: XcAssetConfig AssetLocationToId (r:0 w:1)
	// Proof Skipped: XcAssetConfig AssetLocationToId (max_values: None, max_size: None, mode: Measured)
	fn remove_asset() -> Weight {
		// Minimum execution time: 16_674_000 picoseconds.
		Weight::from_parts(16_674_000, 0)
			.saturating_add(Weight::from_parts(0, 3593))
			.saturating_add(RocksDbWeight::get().reads(1_u64))
			.saturating_add(RocksDbWeight::get().writes(4_u64))
	}

	fn update_migration_step() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `0`
		//  Estimated: `0`
		// Minimum execution time: 7_033_000 picoseconds.
		Weight::from_parts(7_033_000, 0)
			.saturating_add(Weight::from_parts(0, 0))
			.saturating_add(RocksDbWeight::get().writes(1))
	}
}