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 43.0.0
21
//! DATE: 2025-03-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22
//! WORST CASE MAP SIZE: `1000000`
23
//! HOSTNAME: `Mac`, CPU: `<UNKNOWN>`
24
//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
25

            
26
// Executed Command:
27
// ./target/release/moonbeam
28
// benchmark
29
// pallet
30
// --runtime=./target/release/wbuild/moonbase-runtime/moonbase_runtime.wasm
31
// --genesis-builder=runtime
32
// --genesis-builder-preset=development
33
// --steps=50
34
// --repeat=20
35
// --pallet=pallet-moonbeam-foreign-assets
36
// --extrinsic=*
37
// --wasm-execution=compiled
38
// --header=./file_header.txt
39
// --template=./benchmarking/frame-weight-template.hbs
40
// --output=./runtime/moonbase/src/weights
41

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

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

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