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-03-26, 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/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::Suicided` (r:1 w:0)
76
	/// Proof: `EVM::Suicided` (`max_values`: None, `max_size`: None, mode: `Measured`)
77
	/// Storage: `EVM::AccountCodes` (r:1 w:1)
78
	/// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`)
79
	/// Storage: `Ethereum::CounterForPending` (r:1 w:1)
80
	/// Proof: `Ethereum::CounterForPending` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
81
	/// Storage: `Ethereum::Pending` (r:2 w:1)
82
	/// Proof: `Ethereum::Pending` (`max_values`: None, `max_size`: None, mode: `Measured`)
83
	fn create_foreign_asset() -> Weight {
84
		// Proof Size summary in bytes:
85
		//  Measured:  `19285`
86
		//  Estimated: `30175`
87
		// Minimum execution time: 737_188_000 picoseconds.
88
		Weight::from_parts(786_459_000, 30175)
89
			.saturating_add(T::DbWeight::get().reads(21_u64))
90
			.saturating_add(T::DbWeight::get().writes(14_u64))
91
	}
92
	/// Storage: `EvmForeignAssets::AssetsById` (r:1 w:1)
93
	/// Proof: `EvmForeignAssets::AssetsById` (`max_values`: None, `max_size`: None, mode: `Measured`)
94
	/// Storage: `EvmForeignAssets::AssetsByLocation` (r:2 w:2)
95
	/// Proof: `EvmForeignAssets::AssetsByLocation` (`max_values`: None, `max_size`: None, mode: `Measured`)
96
	fn change_xcm_location() -> Weight {
97
		// Proof Size summary in bytes:
98
		//  Measured:  `2128`
99
		//  Estimated: `8068`
100
		// Minimum execution time: 57_823_000 picoseconds.
101
		Weight::from_parts(60_697_000, 8068)
102
			.saturating_add(T::DbWeight::get().reads(3_u64))
103
			.saturating_add(T::DbWeight::get().writes(3_u64))
104
	}
105
	/// Storage: `EvmForeignAssets::AssetsById` (r:1 w:0)
106
	/// Proof: `EvmForeignAssets::AssetsById` (`max_values`: None, `max_size`: None, mode: `Measured`)
107
	/// Storage: `EvmForeignAssets::AssetsByLocation` (r:1 w:1)
108
	/// Proof: `EvmForeignAssets::AssetsByLocation` (`max_values`: None, `max_size`: None, mode: `Measured`)
109
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
110
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
111
	/// Storage: `EthereumXcm::EthereumXcmSuspended` (r:1 w:0)
112
	/// Proof: `EthereumXcm::EthereumXcmSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
113
	/// Storage: `EthereumXcm::Nonce` (r:1 w:1)
114
	/// Proof: `EthereumXcm::Nonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
115
	/// Storage: `EthereumChainId::ChainId` (r:1 w:0)
116
	/// Proof: `EthereumChainId::ChainId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
117
	/// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
118
	/// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
119
	/// Storage: `EVM::AccountCodesMetadata` (r:2 w:0)
120
	/// Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
121
	/// Storage: `System::Account` (r:1 w:1)
122
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
123
	/// Storage: `System::Digest` (r:1 w:0)
124
	/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
125
	/// Storage: `EVM::AccountCodes` (r:1 w:0)
126
	/// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`)
127
	/// Storage: `Assets::Asset` (r:1 w:0)
128
	/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(174), added: 2649, mode: `MaxEncodedLen`)
129
	/// Storage: `EVM::AccountStorages` (r:1 w:1)
130
	/// Proof: `EVM::AccountStorages` (`max_values`: None, `max_size`: None, mode: `Measured`)
131
	/// Storage: `Ethereum::CounterForPending` (r:1 w:1)
132
	/// Proof: `Ethereum::CounterForPending` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
133
	/// Storage: `Ethereum::Pending` (r:2 w:1)
134
	/// Proof: `Ethereum::Pending` (`max_values`: None, `max_size`: None, mode: `Measured`)
135
	fn freeze_foreign_asset() -> Weight {
136
		// Proof Size summary in bytes:
137
		//  Measured:  `28578`
138
		//  Estimated: `34518`
139
		// Minimum execution time: 304_654_000 picoseconds.
140
		Weight::from_parts(325_653_000, 34518)
141
			.saturating_add(T::DbWeight::get().reads(17_u64))
142
			.saturating_add(T::DbWeight::get().writes(6_u64))
143
	}
144
	/// Storage: `EvmForeignAssets::AssetsById` (r:1 w:0)
145
	/// Proof: `EvmForeignAssets::AssetsById` (`max_values`: None, `max_size`: None, mode: `Measured`)
146
	/// Storage: `EvmForeignAssets::AssetsByLocation` (r:1 w:1)
147
	/// Proof: `EvmForeignAssets::AssetsByLocation` (`max_values`: None, `max_size`: None, mode: `Measured`)
148
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
149
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
150
	/// Storage: `EthereumXcm::EthereumXcmSuspended` (r:1 w:0)
151
	/// Proof: `EthereumXcm::EthereumXcmSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
152
	/// Storage: `EthereumXcm::Nonce` (r:1 w:1)
153
	/// Proof: `EthereumXcm::Nonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
154
	/// Storage: `EthereumChainId::ChainId` (r:1 w:0)
155
	/// Proof: `EthereumChainId::ChainId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
156
	/// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
157
	/// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
158
	/// Storage: `EVM::AccountCodesMetadata` (r:2 w:0)
159
	/// Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
160
	/// Storage: `System::Account` (r:1 w:1)
161
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
162
	/// Storage: `System::Digest` (r:1 w:0)
163
	/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
164
	/// Storage: `EVM::AccountCodes` (r:1 w:0)
165
	/// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`)
166
	/// Storage: `Assets::Asset` (r:1 w:0)
167
	/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(174), added: 2649, mode: `MaxEncodedLen`)
168
	/// Storage: `EVM::AccountStorages` (r:1 w:1)
169
	/// Proof: `EVM::AccountStorages` (`max_values`: None, `max_size`: None, mode: `Measured`)
170
	/// Storage: `Ethereum::CounterForPending` (r:1 w:1)
171
	/// Proof: `Ethereum::CounterForPending` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
172
	/// Storage: `Ethereum::Pending` (r:2 w:1)
173
	/// Proof: `Ethereum::Pending` (`max_values`: None, `max_size`: None, mode: `Measured`)
174
	fn unfreeze_foreign_asset() -> Weight {
175
		// Proof Size summary in bytes:
176
		//  Measured:  `16899`
177
		//  Estimated: `22839`
178
		// Minimum execution time: 300_657_000 picoseconds.
179
		Weight::from_parts(336_830_000, 22839)
180
			.saturating_add(T::DbWeight::get().reads(17_u64))
181
			.saturating_add(T::DbWeight::get().writes(6_u64))
182
	}
183
}