1
// Copyright 2025 Moonbeam foundation
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 `pallet_moonbeam_foreign_assets`
19
//!
20
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 51.0.0
21
//! DATE: 2026-02-09, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22
//! WORST CASE MAP SIZE: `1000000`
23
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
24
//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
25

            
26
// Executed Command:
27
// ./frame-omni-bencher
28
// v1
29
// benchmark
30
// pallet
31
// --runtime=./target/production/wbuild/moonbeam-runtime/moonbeam_runtime.wasm
32
// --genesis-builder=runtime
33
// --genesis-builder-preset=development
34
// --steps=50
35
// --repeat=20
36
// --pallet=pallet_moonbeam_foreign_assets
37
// --extrinsic=*
38
// --wasm-execution=compiled
39
// --header=./file_header.txt
40
// --template=./benchmarking/frame-weight-template.hbs
41
// --disable-log-color
42
// --output=./runtime/moonbeam/src/weights
43

            
44
#![cfg_attr(rustfmt, rustfmt_skip)]
45
#![allow(unused_parens)]
46
#![allow(unused_imports)]
47

            
48
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
49
use sp_std::marker::PhantomData;
50

            
51
/// Weights for `pallet_moonbeam_foreign_assets`.
52
pub struct WeightInfo<T>(PhantomData<T>);
53
impl<T: frame_system::Config> pallet_moonbeam_foreign_assets::WeightInfo for WeightInfo<T> {
54
	/// Storage: `EvmForeignAssets::AssetsById` (r:1 w:1)
55
	/// Proof: `EvmForeignAssets::AssetsById` (`max_values`: None, `max_size`: None, mode: `Measured`)
56
	/// Storage: `EvmForeignAssets::AssetsByLocation` (r:1 w:1)
57
	/// Proof: `EvmForeignAssets::AssetsByLocation` (`max_values`: None, `max_size`: None, mode: `Measured`)
58
	/// Storage: `EvmForeignAssets::CounterForAssetsById` (r:1 w:1)
59
	/// Proof: `EvmForeignAssets::CounterForAssetsById` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
60
	/// Storage: `EthereumXcm::EthereumXcmSuspended` (r:1 w:0)
61
	/// Proof: `EthereumXcm::EthereumXcmSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
62
	/// Storage: `EthereumXcm::Nonce` (r:1 w:1)
63
	/// Proof: `EthereumXcm::Nonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
64
	/// Storage: `EthereumChainId::ChainId` (r:1 w:0)
65
	/// Proof: `EthereumChainId::ChainId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
66
	/// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
67
	/// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
68
	/// Storage: `EVM::AccountCodesMetadata` (r:2 w:1)
69
	/// Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
70
	/// Storage: `System::Account` (r:2 w:2)
71
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
72
	/// Storage: `EVM::AccountStorages` (r:4 w:4)
73
	/// Proof: `EVM::AccountStorages` (`max_values`: None, `max_size`: None, mode: `Measured`)
74
	/// Storage: `EVM::AccountCodes` (r:1 w:1)
75
	/// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`)
76
	/// Storage: `Ethereum::CounterForPending` (r:1 w:1)
77
	/// Proof: `Ethereum::CounterForPending` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
78
	/// Storage: `Ethereum::Pending` (r:2 w:1)
79
	/// Proof: `Ethereum::Pending` (`max_values`: None, `max_size`: None, mode: `Measured`)
80
	fn create_foreign_asset() -> Weight {
81
		// Proof Size summary in bytes:
82
		//  Measured:  `20211`
83
		//  Estimated: `31101`
84
		// Minimum execution time: 687_204_000 picoseconds.
85
		Weight::from_parts(708_607_000, 31101)
86
			.saturating_add(T::DbWeight::get().reads(19_u64))
87
			.saturating_add(T::DbWeight::get().writes(14_u64))
88
	}
89
	/// Storage: `EvmForeignAssets::AssetsById` (r:1 w:1)
90
	/// Proof: `EvmForeignAssets::AssetsById` (`max_values`: None, `max_size`: None, mode: `Measured`)
91
	/// Storage: `EvmForeignAssets::AssetsByLocation` (r:2 w:2)
92
	/// Proof: `EvmForeignAssets::AssetsByLocation` (`max_values`: None, `max_size`: None, mode: `Measured`)
93
	fn change_xcm_location() -> Weight {
94
		// Proof Size summary in bytes:
95
		//  Measured:  `2430`
96
		//  Estimated: `8370`
97
		// Minimum execution time: 50_391_000 picoseconds.
98
		Weight::from_parts(52_480_000, 8370)
99
			.saturating_add(T::DbWeight::get().reads(3_u64))
100
			.saturating_add(T::DbWeight::get().writes(3_u64))
101
	}
102
	/// Storage: `EvmForeignAssets::AssetsById` (r:1 w:0)
103
	/// Proof: `EvmForeignAssets::AssetsById` (`max_values`: None, `max_size`: None, mode: `Measured`)
104
	/// Storage: `EvmForeignAssets::AssetsByLocation` (r:1 w:1)
105
	/// Proof: `EvmForeignAssets::AssetsByLocation` (`max_values`: None, `max_size`: None, mode: `Measured`)
106
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
107
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
108
	/// Storage: `EthereumXcm::EthereumXcmSuspended` (r:1 w:0)
109
	/// Proof: `EthereumXcm::EthereumXcmSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
110
	/// Storage: `EthereumXcm::Nonce` (r:1 w:1)
111
	/// Proof: `EthereumXcm::Nonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
112
	/// Storage: `EthereumChainId::ChainId` (r:1 w:0)
113
	/// Proof: `EthereumChainId::ChainId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
114
	/// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
115
	/// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
116
	/// Storage: `EVM::AccountCodesMetadata` (r:2 w:0)
117
	/// Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
118
	/// Storage: `System::Account` (r:1 w:1)
119
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
120
	/// Storage: `System::Digest` (r:1 w:0)
121
	/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
122
	/// Storage: `EVM::AccountCodes` (r:1 w:0)
123
	/// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`)
124
	/// Storage: `EVM::AccountStorages` (r:1 w:1)
125
	/// Proof: `EVM::AccountStorages` (`max_values`: None, `max_size`: None, mode: `Measured`)
126
	/// Storage: `Ethereum::CounterForPending` (r:1 w:1)
127
	/// Proof: `Ethereum::CounterForPending` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
128
	/// Storage: `Ethereum::Pending` (r:2 w:1)
129
	/// Proof: `Ethereum::Pending` (`max_values`: None, `max_size`: None, mode: `Measured`)
130
	fn freeze_foreign_asset() -> Weight {
131
		// Proof Size summary in bytes:
132
		//  Measured:  `29342`
133
		//  Estimated: `35282`
134
		// Minimum execution time: 269_147_000 picoseconds.
135
		Weight::from_parts(276_709_000, 35282)
136
			.saturating_add(T::DbWeight::get().reads(16_u64))
137
			.saturating_add(T::DbWeight::get().writes(6_u64))
138
	}
139
	/// Storage: `EvmForeignAssets::AssetsById` (r:1 w:0)
140
	/// Proof: `EvmForeignAssets::AssetsById` (`max_values`: None, `max_size`: None, mode: `Measured`)
141
	/// Storage: `EvmForeignAssets::AssetsByLocation` (r:1 w:1)
142
	/// Proof: `EvmForeignAssets::AssetsByLocation` (`max_values`: None, `max_size`: None, mode: `Measured`)
143
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
144
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
145
	/// Storage: `EthereumXcm::EthereumXcmSuspended` (r:1 w:0)
146
	/// Proof: `EthereumXcm::EthereumXcmSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
147
	/// Storage: `EthereumXcm::Nonce` (r:1 w:1)
148
	/// Proof: `EthereumXcm::Nonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
149
	/// Storage: `EthereumChainId::ChainId` (r:1 w:0)
150
	/// Proof: `EthereumChainId::ChainId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
151
	/// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
152
	/// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
153
	/// Storage: `EVM::AccountCodesMetadata` (r:2 w:0)
154
	/// Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
155
	/// Storage: `System::Account` (r:1 w:1)
156
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
157
	/// Storage: `System::Digest` (r:1 w:0)
158
	/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
159
	/// Storage: `EVM::AccountCodes` (r:1 w:0)
160
	/// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`)
161
	/// Storage: `EVM::AccountStorages` (r:1 w:1)
162
	/// Proof: `EVM::AccountStorages` (`max_values`: None, `max_size`: None, mode: `Measured`)
163
	/// Storage: `Ethereum::CounterForPending` (r:1 w:1)
164
	/// Proof: `Ethereum::CounterForPending` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
165
	/// Storage: `Ethereum::Pending` (r:2 w:1)
166
	/// Proof: `Ethereum::Pending` (`max_values`: None, `max_size`: None, mode: `Measured`)
167
	fn unfreeze_foreign_asset() -> Weight {
168
		// Proof Size summary in bytes:
169
		//  Measured:  `17127`
170
		//  Estimated: `23067`
171
		// Minimum execution time: 263_632_000 picoseconds.
172
		Weight::from_parts(267_694_000, 23067)
173
			.saturating_add(T::DbWeight::get().reads(16_u64))
174
			.saturating_add(T::DbWeight::get().writes(6_u64))
175
	}
176
	/// Storage: `EvmForeignAssets::AssetsById` (r:1 w:0)
177
	/// Proof: `EvmForeignAssets::AssetsById` (`max_values`: None, `max_size`: None, mode: `Measured`)
178
	/// Storage: `EvmForeignAssets::AssetsByLocation` (r:1 w:0)
179
	/// Proof: `EvmForeignAssets::AssetsByLocation` (`max_values`: None, `max_size`: None, mode: `Measured`)
180
	/// Storage: `EvmForeignAssets::PendingDeposits` (r:1 w:1)
181
	/// Proof: `EvmForeignAssets::PendingDeposits` (`max_values`: None, `max_size`: None, mode: `Measured`)
182
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
183
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
184
	/// Storage: `EthereumXcm::EthereumXcmSuspended` (r:1 w:0)
185
	/// Proof: `EthereumXcm::EthereumXcmSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
186
	/// Storage: `EthereumXcm::Nonce` (r:1 w:1)
187
	/// Proof: `EthereumXcm::Nonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
188
	/// Storage: `EthereumChainId::ChainId` (r:1 w:0)
189
	/// Proof: `EthereumChainId::ChainId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
190
	/// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
191
	/// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
192
	/// Storage: `EVM::AccountCodesMetadata` (r:2 w:0)
193
	/// Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
194
	/// Storage: `System::Account` (r:1 w:1)
195
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
196
	/// Storage: `System::Digest` (r:1 w:0)
197
	/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
198
	/// Storage: `EVM::AccountCodes` (r:1 w:0)
199
	/// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`)
200
	/// Storage: `EVM::AccountStorages` (r:3 w:2)
201
	/// Proof: `EVM::AccountStorages` (`max_values`: None, `max_size`: None, mode: `Measured`)
202
	/// Storage: `Ethereum::CounterForPending` (r:1 w:1)
203
	/// Proof: `Ethereum::CounterForPending` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
204
	/// Storage: `Ethereum::Pending` (r:2 w:1)
205
	/// Proof: `Ethereum::Pending` (`max_values`: None, `max_size`: None, mode: `Measured`)
206
	fn claim_pending_deposit() -> Weight {
207
		// Proof Size summary in bytes:
208
		//  Measured:  `24177`
209
		//  Estimated: `32592`
210
		// Minimum execution time: 128_000_000 picoseconds.
211
		Weight::from_parts(136_000_000, 32592)
212
			.saturating_add(T::DbWeight::get().reads(19_u64))
213
			.saturating_add(T::DbWeight::get().writes(7_u64))
214
	}
215
}