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 32.0.0
21
//! DATE: 2025-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22
//! WORST CASE MAP SIZE: `1000000`
23
//! HOSTNAME: `ip-10-0-0-36`, 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/moonriver-runtime/moonriver_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/moonriver/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: `AssetManager::AssetIdType` (r:1 w:0)
60
	/// Proof: `AssetManager::AssetIdType` (`max_values`: None, `max_size`: None, mode: `Measured`)
61
	/// Storage: `EthereumXcm::EthereumXcmSuspended` (r:1 w:0)
62
	/// Proof: `EthereumXcm::EthereumXcmSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
63
	/// Storage: `EthereumXcm::Nonce` (r:1 w:1)
64
	/// Proof: `EthereumXcm::Nonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
65
	/// Storage: `EthereumChainId::ChainId` (r:1 w:0)
66
	/// Proof: `EthereumChainId::ChainId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
67
	/// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
68
	/// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
69
	/// Storage: `EVM::AccountCodesMetadata` (r:2 w:1)
70
	/// Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
71
	/// Storage: `System::Account` (r:2 w:2)
72
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
73
	/// Storage: `EVM::AccountStorages` (r:4 w:4)
74
	/// Proof: `EVM::AccountStorages` (`max_values`: None, `max_size`: None, mode: `Measured`)
75
	/// Storage: `EVM::AccountCodes` (r:1 w:1)
76
	/// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`)
77
	/// Storage: `Ethereum::CounterForPending` (r:1 w:1)
78
	/// Proof: `Ethereum::CounterForPending` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
79
	/// Storage: `Ethereum::Pending` (r:2 w:1)
80
	/// Proof: `Ethereum::Pending` (`max_values`: None, `max_size`: None, mode: `Measured`)
81
	fn create_foreign_asset() -> Weight {
82
		// Proof Size summary in bytes:
83
		//  Measured:  `19285`
84
		//  Estimated: `30175`
85
		// Minimum execution time: 801_823_000 picoseconds.
86
		Weight::from_parts(822_060_000, 30175)
87
			.saturating_add(T::DbWeight::get().reads(20_u64))
88
			.saturating_add(T::DbWeight::get().writes(14_u64))
89
	}
90
	/// Storage: `EvmForeignAssets::AssetsById` (r:1 w:1)
91
	/// Proof: `EvmForeignAssets::AssetsById` (`max_values`: None, `max_size`: None, mode: `Measured`)
92
	/// Storage: `EvmForeignAssets::AssetsByLocation` (r:2 w:2)
93
	/// Proof: `EvmForeignAssets::AssetsByLocation` (`max_values`: None, `max_size`: None, mode: `Measured`)
94
	fn change_xcm_location() -> Weight {
95
		// Proof Size summary in bytes:
96
		//  Measured:  `2128`
97
		//  Estimated: `8068`
98
		// Minimum execution time: 69_840_000 picoseconds.
99
		Weight::from_parts(73_441_000, 8068)
100
			.saturating_add(T::DbWeight::get().reads(3_u64))
101
			.saturating_add(T::DbWeight::get().writes(3_u64))
102
	}
103
	/// Storage: `EvmForeignAssets::AssetsById` (r:1 w:0)
104
	/// Proof: `EvmForeignAssets::AssetsById` (`max_values`: None, `max_size`: None, mode: `Measured`)
105
	/// Storage: `EvmForeignAssets::AssetsByLocation` (r:1 w:1)
106
	/// Proof: `EvmForeignAssets::AssetsByLocation` (`max_values`: None, `max_size`: None, mode: `Measured`)
107
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
108
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
109
	/// Storage: `EthereumXcm::EthereumXcmSuspended` (r:1 w:0)
110
	/// Proof: `EthereumXcm::EthereumXcmSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
111
	/// Storage: `EthereumXcm::Nonce` (r:1 w:1)
112
	/// Proof: `EthereumXcm::Nonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
113
	/// Storage: `EthereumChainId::ChainId` (r:1 w:0)
114
	/// Proof: `EthereumChainId::ChainId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
115
	/// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
116
	/// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
117
	/// Storage: `EVM::AccountCodesMetadata` (r:2 w:0)
118
	/// Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
119
	/// Storage: `System::Account` (r:1 w:1)
120
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
121
	/// Storage: `System::Digest` (r:1 w:0)
122
	/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
123
	/// Storage: `EVM::AccountCodes` (r:1 w:0)
124
	/// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`)
125
	/// Storage: `Assets::Asset` (r:1 w:0)
126
	/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(174), added: 2649, mode: `MaxEncodedLen`)
127
	/// Storage: `EVM::AccountStorages` (r:1 w:1)
128
	/// Proof: `EVM::AccountStorages` (`max_values`: None, `max_size`: None, mode: `Measured`)
129
	/// Storage: `Ethereum::CounterForPending` (r:1 w:1)
130
	/// Proof: `Ethereum::CounterForPending` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
131
	/// Storage: `Ethereum::Pending` (r:2 w:1)
132
	/// Proof: `Ethereum::Pending` (`max_values`: None, `max_size`: None, mode: `Measured`)
133
	fn freeze_foreign_asset() -> Weight {
134
		// Proof Size summary in bytes:
135
		//  Measured:  `28578`
136
		//  Estimated: `34518`
137
		// Minimum execution time: 364_757_000 picoseconds.
138
		Weight::from_parts(376_800_000, 34518)
139
			.saturating_add(T::DbWeight::get().reads(17_u64))
140
			.saturating_add(T::DbWeight::get().writes(6_u64))
141
	}
142
	/// Storage: `EvmForeignAssets::AssetsById` (r:1 w:0)
143
	/// Proof: `EvmForeignAssets::AssetsById` (`max_values`: None, `max_size`: None, mode: `Measured`)
144
	/// Storage: `EvmForeignAssets::AssetsByLocation` (r:1 w:1)
145
	/// Proof: `EvmForeignAssets::AssetsByLocation` (`max_values`: None, `max_size`: None, mode: `Measured`)
146
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
147
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
148
	/// Storage: `EthereumXcm::EthereumXcmSuspended` (r:1 w:0)
149
	/// Proof: `EthereumXcm::EthereumXcmSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
150
	/// Storage: `EthereumXcm::Nonce` (r:1 w:1)
151
	/// Proof: `EthereumXcm::Nonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
152
	/// Storage: `EthereumChainId::ChainId` (r:1 w:0)
153
	/// Proof: `EthereumChainId::ChainId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
154
	/// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
155
	/// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
156
	/// Storage: `EVM::AccountCodesMetadata` (r:2 w:0)
157
	/// Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
158
	/// Storage: `System::Account` (r:1 w:1)
159
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
160
	/// Storage: `System::Digest` (r:1 w:0)
161
	/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
162
	/// Storage: `EVM::AccountCodes` (r:1 w:0)
163
	/// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`)
164
	/// Storage: `Assets::Asset` (r:1 w:0)
165
	/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(174), added: 2649, mode: `MaxEncodedLen`)
166
	/// Storage: `EVM::AccountStorages` (r:1 w:1)
167
	/// Proof: `EVM::AccountStorages` (`max_values`: None, `max_size`: None, mode: `Measured`)
168
	/// Storage: `Ethereum::CounterForPending` (r:1 w:1)
169
	/// Proof: `Ethereum::CounterForPending` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
170
	/// Storage: `Ethereum::Pending` (r:2 w:1)
171
	/// Proof: `Ethereum::Pending` (`max_values`: None, `max_size`: None, mode: `Measured`)
172
	fn unfreeze_foreign_asset() -> Weight {
173
		// Proof Size summary in bytes:
174
		//  Measured:  `16899`
175
		//  Estimated: `22839`
176
		// Minimum execution time: 360_025_000 picoseconds.
177
		Weight::from_parts(377_942_000, 22839)
178
			.saturating_add(T::DbWeight::get().reads(17_u64))
179
			.saturating_add(T::DbWeight::get().writes(6_u64))
180
	}
181
}