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

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

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

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

            
48
/// Weights for `pallet_moonbeam_foreign_assets`.
49
pub struct WeightInfo<T>(PhantomData<T>);
50
impl<T: frame_system::Config> pallet_moonbeam_foreign_assets::WeightInfo for WeightInfo<T> {
51
	/// Storage: `EvmForeignAssets::AssetsById` (r:1 w:1)
52
	/// Proof: `EvmForeignAssets::AssetsById` (`max_values`: None, `max_size`: None, mode: `Measured`)
53
	/// Storage: `EvmForeignAssets::AssetsByLocation` (r:1 w:1)
54
	/// Proof: `EvmForeignAssets::AssetsByLocation` (`max_values`: None, `max_size`: None, mode: `Measured`)
55
	/// Storage: `EvmForeignAssets::CounterForAssetsById` (r:1 w:1)
56
	/// Proof: `EvmForeignAssets::CounterForAssetsById` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
57
	/// Storage: `AssetManager::AssetIdType` (r:1 w:0)
58
	/// Proof: `AssetManager::AssetIdType` (`max_values`: None, `max_size`: None, mode: `Measured`)
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::Suicided` (r:1 w:0)
74
	/// Proof: `EVM::Suicided` (`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::Pending` (r:1 w:1)
78
	/// Proof: `Ethereum::Pending` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
79
	fn create_foreign_asset() -> Weight {
80
		// Proof Size summary in bytes:
81
		//  Measured:  `1835`
82
		//  Estimated: `12725`
83
		// Minimum execution time: 595_934_000 picoseconds.
84
		Weight::from_parts(601_966_000, 12725)
85
			.saturating_add(T::DbWeight::get().reads(19_u64))
86
			.saturating_add(T::DbWeight::get().writes(13_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:  `149`
95
		//  Estimated: `6089`
96
		// Minimum execution time: 23_157_000 picoseconds.
97
		Weight::from_parts(24_197_000, 6089)
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::Pending` (r:1 w:1)
128
	/// Proof: `Ethereum::Pending` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
129
	fn freeze_foreign_asset() -> Weight {
130
		// Proof Size summary in bytes:
131
		//  Measured:  `11157`
132
		//  Estimated: `17097`
133
		// Minimum execution time: 179_626_000 picoseconds.
134
		Weight::from_parts(183_784_000, 17097)
135
			.saturating_add(T::DbWeight::get().reads(15_u64))
136
			.saturating_add(T::DbWeight::get().writes(5_u64))
137
	}
138
	/// Storage: `EvmForeignAssets::AssetsById` (r:1 w:0)
139
	/// Proof: `EvmForeignAssets::AssetsById` (`max_values`: None, `max_size`: None, mode: `Measured`)
140
	/// Storage: `EvmForeignAssets::AssetsByLocation` (r:1 w:1)
141
	/// Proof: `EvmForeignAssets::AssetsByLocation` (`max_values`: None, `max_size`: None, mode: `Measured`)
142
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
143
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
144
	/// Storage: `EthereumXcm::EthereumXcmSuspended` (r:1 w:0)
145
	/// Proof: `EthereumXcm::EthereumXcmSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
146
	/// Storage: `EthereumXcm::Nonce` (r:1 w:1)
147
	/// Proof: `EthereumXcm::Nonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
148
	/// Storage: `EthereumChainId::ChainId` (r:1 w:0)
149
	/// Proof: `EthereumChainId::ChainId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
150
	/// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
151
	/// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
152
	/// Storage: `EVM::AccountCodesMetadata` (r:2 w:0)
153
	/// Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
154
	/// Storage: `System::Account` (r:1 w:1)
155
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
156
	/// Storage: `System::Digest` (r:1 w:0)
157
	/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
158
	/// Storage: `EVM::AccountCodes` (r:1 w:0)
159
	/// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`)
160
	/// Storage: `Assets::Asset` (r:1 w:0)
161
	/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(174), added: 2649, mode: `MaxEncodedLen`)
162
	/// Storage: `EVM::AccountStorages` (r:1 w:1)
163
	/// Proof: `EVM::AccountStorages` (`max_values`: None, `max_size`: None, mode: `Measured`)
164
	/// Storage: `Ethereum::Pending` (r:1 w:1)
165
	/// Proof: `Ethereum::Pending` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
166
	fn unfreeze_foreign_asset() -> Weight {
167
		// Proof Size summary in bytes:
168
		//  Measured:  `11157`
169
		//  Estimated: `17097`
170
		// Minimum execution time: 175_772_000 picoseconds.
171
		Weight::from_parts(180_987_000, 17097)
172
			.saturating_add(T::DbWeight::get().reads(15_u64))
173
			.saturating_add(T::DbWeight::get().writes(5_u64))
174
	}
175
}