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 48.0.0
21
//! DATE: 2025-09-02, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22
//! WORST CASE MAP SIZE: `1000000`
23
//! HOSTNAME: `ip-10-0-0-198`, 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/moonbase-runtime/moonbase_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
// --output=./runtime/moonbase/src/weights
42

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

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

            
50
/// Weights for `pallet_moonbeam_foreign_assets`.
51
pub struct WeightInfo<T>(PhantomData<T>);
52
impl<T: frame_system::Config> pallet_moonbeam_foreign_assets::WeightInfo for WeightInfo<T> {
53
	/// Storage: `EvmForeignAssets::AssetsById` (r:1 w:1)
54
	/// Proof: `EvmForeignAssets::AssetsById` (`max_values`: None, `max_size`: None, mode: `Measured`)
55
	/// Storage: `EvmForeignAssets::AssetsByLocation` (r:1 w:1)
56
	/// Proof: `EvmForeignAssets::AssetsByLocation` (`max_values`: None, `max_size`: None, mode: `Measured`)
57
	/// Storage: `EvmForeignAssets::CounterForAssetsById` (r:1 w:1)
58
	/// Proof: `EvmForeignAssets::CounterForAssetsById` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
59
	/// Storage: `EthereumXcm::EthereumXcmSuspended` (r:1 w:0)
60
	/// Proof: `EthereumXcm::EthereumXcmSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
61
	/// Storage: `EthereumXcm::Nonce` (r:1 w:1)
62
	/// Proof: `EthereumXcm::Nonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
63
	/// Storage: `EthereumChainId::ChainId` (r:1 w:0)
64
	/// Proof: `EthereumChainId::ChainId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
65
	/// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
66
	/// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
67
	/// Storage: `EVM::AccountCodesMetadata` (r:2 w:1)
68
	/// Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
69
	/// Storage: `System::Account` (r:2 w:2)
70
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
71
	/// Storage: `EVM::AccountStorages` (r:4 w:4)
72
	/// Proof: `EVM::AccountStorages` (`max_values`: None, `max_size`: None, mode: `Measured`)
73
	/// Storage: `EVM::AccountCodes` (r:1 w:1)
74
	/// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`)
75
	/// Storage: `Ethereum::CounterForPending` (r:1 w:1)
76
	/// Proof: `Ethereum::CounterForPending` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
77
	/// Storage: `Ethereum::Pending` (r:2 w:1)
78
	/// Proof: `Ethereum::Pending` (`max_values`: None, `max_size`: None, mode: `Measured`)
79
	fn create_foreign_asset() -> Weight {
80
		// Proof Size summary in bytes:
81
		//  Measured:  `19311`
82
		//  Estimated: `30201`
83
		// Minimum execution time: 685_265_000 picoseconds.
84
		Weight::from_parts(711_614_000, 30201)
85
			.saturating_add(T::DbWeight::get().reads(19_u64))
86
			.saturating_add(T::DbWeight::get().writes(14_u64))
87
	}
88
	/// Storage: `EvmForeignAssets::AssetsById` (r:1 w:1)
89
	/// Proof: `EvmForeignAssets::AssetsById` (`max_values`: None, `max_size`: None, mode: `Measured`)
90
	/// Storage: `EvmForeignAssets::AssetsByLocation` (r:2 w:2)
91
	/// Proof: `EvmForeignAssets::AssetsByLocation` (`max_values`: None, `max_size`: None, mode: `Measured`)
92
	fn change_xcm_location() -> Weight {
93
		// Proof Size summary in bytes:
94
		//  Measured:  `2128`
95
		//  Estimated: `8068`
96
		// Minimum execution time: 51_393_000 picoseconds.
97
		Weight::from_parts(52_993_000, 8068)
98
			.saturating_add(T::DbWeight::get().reads(3_u64))
99
			.saturating_add(T::DbWeight::get().writes(3_u64))
100
	}
101
	/// Storage: `EvmForeignAssets::AssetsById` (r:1 w:0)
102
	/// Proof: `EvmForeignAssets::AssetsById` (`max_values`: None, `max_size`: None, mode: `Measured`)
103
	/// Storage: `EvmForeignAssets::AssetsByLocation` (r:1 w:1)
104
	/// Proof: `EvmForeignAssets::AssetsByLocation` (`max_values`: None, `max_size`: None, mode: `Measured`)
105
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
106
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
107
	/// Storage: `EthereumXcm::EthereumXcmSuspended` (r:1 w:0)
108
	/// Proof: `EthereumXcm::EthereumXcmSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
109
	/// Storage: `EthereumXcm::Nonce` (r:1 w:1)
110
	/// Proof: `EthereumXcm::Nonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
111
	/// Storage: `EthereumChainId::ChainId` (r:1 w:0)
112
	/// Proof: `EthereumChainId::ChainId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
113
	/// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
114
	/// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
115
	/// Storage: `EVM::AccountCodesMetadata` (r:2 w:0)
116
	/// Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
117
	/// Storage: `System::Account` (r:1 w:1)
118
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
119
	/// Storage: `System::Digest` (r:1 w:0)
120
	/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
121
	/// Storage: `EVM::AccountCodes` (r:1 w:0)
122
	/// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`)
123
	/// Storage: `Assets::Asset` (r:1 w:0)
124
	/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(174), added: 2649, mode: `MaxEncodedLen`)
125
	/// Storage: `EVM::AccountStorages` (r:1 w:1)
126
	/// Proof: `EVM::AccountStorages` (`max_values`: None, `max_size`: None, mode: `Measured`)
127
	/// Storage: `Ethereum::CounterForPending` (r:1 w:1)
128
	/// Proof: `Ethereum::CounterForPending` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
129
	/// Storage: `Ethereum::Pending` (r:2 w:1)
130
	/// Proof: `Ethereum::Pending` (`max_values`: None, `max_size`: None, mode: `Measured`)
131
	fn freeze_foreign_asset() -> Weight {
132
		// Proof Size summary in bytes:
133
		//  Measured:  `28677`
134
		//  Estimated: `34617`
135
		// Minimum execution time: 282_863_000 picoseconds.
136
		Weight::from_parts(300_801_000, 34617)
137
			.saturating_add(T::DbWeight::get().reads(17_u64))
138
			.saturating_add(T::DbWeight::get().writes(6_u64))
139
	}
140
	/// Storage: `EvmForeignAssets::AssetsById` (r:1 w:0)
141
	/// Proof: `EvmForeignAssets::AssetsById` (`max_values`: None, `max_size`: None, mode: `Measured`)
142
	/// Storage: `EvmForeignAssets::AssetsByLocation` (r:1 w:1)
143
	/// Proof: `EvmForeignAssets::AssetsByLocation` (`max_values`: None, `max_size`: None, mode: `Measured`)
144
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
145
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
146
	/// Storage: `EthereumXcm::EthereumXcmSuspended` (r:1 w:0)
147
	/// Proof: `EthereumXcm::EthereumXcmSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
148
	/// Storage: `EthereumXcm::Nonce` (r:1 w:1)
149
	/// Proof: `EthereumXcm::Nonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
150
	/// Storage: `EthereumChainId::ChainId` (r:1 w:0)
151
	/// Proof: `EthereumChainId::ChainId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
152
	/// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
153
	/// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
154
	/// Storage: `EVM::AccountCodesMetadata` (r:2 w:0)
155
	/// Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
156
	/// Storage: `System::Account` (r:1 w:1)
157
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
158
	/// Storage: `System::Digest` (r:1 w:0)
159
	/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
160
	/// Storage: `EVM::AccountCodes` (r:1 w:0)
161
	/// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`)
162
	/// Storage: `Assets::Asset` (r:1 w:0)
163
	/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(174), added: 2649, mode: `MaxEncodedLen`)
164
	/// Storage: `EVM::AccountStorages` (r:1 w:1)
165
	/// Proof: `EVM::AccountStorages` (`max_values`: None, `max_size`: None, mode: `Measured`)
166
	/// Storage: `Ethereum::CounterForPending` (r:1 w:1)
167
	/// Proof: `Ethereum::CounterForPending` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
168
	/// Storage: `Ethereum::Pending` (r:2 w:1)
169
	/// Proof: `Ethereum::Pending` (`max_values`: None, `max_size`: None, mode: `Measured`)
170
	fn unfreeze_foreign_asset() -> Weight {
171
		// Proof Size summary in bytes:
172
		//  Measured:  `16998`
173
		//  Estimated: `22938`
174
		// Minimum execution time: 271_460_000 picoseconds.
175
		Weight::from_parts(285_380_000, 22938)
176
			.saturating_add(T::DbWeight::get().reads(17_u64))
177
			.saturating_add(T::DbWeight::get().writes(6_u64))
178
	}
179
}