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 42.0.0
20
//! DATE: 2024-10-10, 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: Some("moonbase-dev"), DB CACHE: 1024
24

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

            
39
#![cfg_attr(rustfmt, rustfmt_skip)]
40
#![allow(unused_parens)]
41
#![allow(unused_imports)]
42

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

            
46
/// Weights for `pallet_moonbeam_foreign_assets`.
47
pub struct WeightInfo<T>(PhantomData<T>);
48
impl<T: frame_system::Config> pallet_moonbeam_foreign_assets::WeightInfo for WeightInfo<T> {
49
	/// Storage: `EvmForeignAssets::AssetsById` (r:1 w:1)
50
	/// Proof: `EvmForeignAssets::AssetsById` (`max_values`: None, `max_size`: None, mode: `Measured`)
51
	/// Storage: `EvmForeignAssets::AssetsByLocation` (r:1 w:1)
52
	/// Proof: `EvmForeignAssets::AssetsByLocation` (`max_values`: None, `max_size`: None, mode: `Measured`)
53
	/// Storage: `EvmForeignAssets::CounterForAssetsById` (r:1 w:1)
54
	/// Proof: `EvmForeignAssets::CounterForAssetsById` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
55
	/// Storage: `AssetManager::AssetIdType` (r:1 w:0)
56
	/// Proof: `AssetManager::AssetIdType` (`max_values`: None, `max_size`: None, mode: `Measured`)
57
	/// Storage: `EthereumXcm::EthereumXcmSuspended` (r:1 w:0)
58
	/// Proof: `EthereumXcm::EthereumXcmSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
59
	/// Storage: `EthereumXcm::Nonce` (r:1 w:1)
60
	/// Proof: `EthereumXcm::Nonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
61
	/// Storage: `EthereumChainId::ChainId` (r:1 w:0)
62
	/// Proof: `EthereumChainId::ChainId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
63
	/// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
64
	/// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
65
	/// Storage: `EVM::AccountCodesMetadata` (r:2 w:1)
66
	/// Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
67
	/// Storage: `System::Account` (r:2 w:2)
68
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
69
	/// Storage: `EVM::AccountStorages` (r:4 w:4)
70
	/// Proof: `EVM::AccountStorages` (`max_values`: None, `max_size`: None, mode: `Measured`)
71
	/// Storage: `EVM::Suicided` (r:1 w:0)
72
	/// Proof: `EVM::Suicided` (`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::Pending` (r:1 w:1)
76
	/// Proof: `Ethereum::Pending` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
77
	fn create_foreign_asset() -> Weight {
78
		// Proof Size summary in bytes:
79
		//  Measured:  `3272387`
80
		//  Estimated: `3283277`
81
		// Minimum execution time: 4_174_843_000 picoseconds.
82
		Weight::from_parts(4_249_286_000, 3283277)
83
			.saturating_add(T::DbWeight::get().reads(19_u64))
84
			.saturating_add(T::DbWeight::get().writes(13_u64))
85
	}
86
	/// Storage: `EvmForeignAssets::AssetsById` (r:1 w:1)
87
	/// Proof: `EvmForeignAssets::AssetsById` (`max_values`: None, `max_size`: None, mode: `Measured`)
88
	/// Storage: `EvmForeignAssets::AssetsByLocation` (r:2 w:2)
89
	/// Proof: `EvmForeignAssets::AssetsByLocation` (`max_values`: None, `max_size`: None, mode: `Measured`)
90
	fn change_xcm_location() -> Weight {
91
		// Proof Size summary in bytes:
92
		//  Measured:  `2461`
93
		//  Estimated: `8401`
94
		// Minimum execution time: 47_757_000 picoseconds.
95
		Weight::from_parts(53_785_000, 8401)
96
			.saturating_add(T::DbWeight::get().reads(3_u64))
97
			.saturating_add(T::DbWeight::get().writes(3_u64))
98
	}
99
	/// Storage: `EvmForeignAssets::AssetsById` (r:1 w:0)
100
	/// Proof: `EvmForeignAssets::AssetsById` (`max_values`: None, `max_size`: None, mode: `Measured`)
101
	/// Storage: `EvmForeignAssets::AssetsByLocation` (r:1 w:1)
102
	/// Proof: `EvmForeignAssets::AssetsByLocation` (`max_values`: None, `max_size`: None, mode: `Measured`)
103
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
104
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
105
	/// Storage: `EthereumXcm::EthereumXcmSuspended` (r:1 w:0)
106
	/// Proof: `EthereumXcm::EthereumXcmSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
107
	/// Storage: `EthereumXcm::Nonce` (r:1 w:1)
108
	/// Proof: `EthereumXcm::Nonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
109
	/// Storage: `EthereumChainId::ChainId` (r:1 w:0)
110
	/// Proof: `EthereumChainId::ChainId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
111
	/// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
112
	/// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
113
	/// Storage: `EVM::AccountCodesMetadata` (r:2 w:0)
114
	/// Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
115
	/// Storage: `System::Account` (r:1 w:1)
116
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
117
	/// Storage: `System::Digest` (r:1 w:0)
118
	/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
119
	/// Storage: `EVM::AccountCodes` (r:1 w:0)
120
	/// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`)
121
	/// Storage: `Assets::Asset` (r:1 w:0)
122
	/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(174), added: 2649, mode: `MaxEncodedLen`)
123
	/// Storage: `EVM::AccountStorages` (r:1 w:1)
124
	/// Proof: `EVM::AccountStorages` (`max_values`: None, `max_size`: None, mode: `Measured`)
125
	/// Storage: `Ethereum::Pending` (r:1 w:1)
126
	/// Proof: `Ethereum::Pending` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
127
	fn freeze_foreign_asset() -> Weight {
128
		// Proof Size summary in bytes:
129
		//  Measured:  `3294569`
130
		//  Estimated: `3300509`
131
		// Minimum execution time: 3_730_587_000 picoseconds.
132
		Weight::from_parts(3_817_812_000, 3300509)
133
			.saturating_add(T::DbWeight::get().reads(15_u64))
134
			.saturating_add(T::DbWeight::get().writes(5_u64))
135
	}
136
	/// Storage: `EvmForeignAssets::AssetsById` (r:1 w:0)
137
	/// Proof: `EvmForeignAssets::AssetsById` (`max_values`: None, `max_size`: None, mode: `Measured`)
138
	/// Storage: `EvmForeignAssets::AssetsByLocation` (r:1 w:1)
139
	/// Proof: `EvmForeignAssets::AssetsByLocation` (`max_values`: None, `max_size`: None, mode: `Measured`)
140
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
141
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
142
	/// Storage: `EthereumXcm::EthereumXcmSuspended` (r:1 w:0)
143
	/// Proof: `EthereumXcm::EthereumXcmSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
144
	/// Storage: `EthereumXcm::Nonce` (r:1 w:1)
145
	/// Proof: `EthereumXcm::Nonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
146
	/// Storage: `EthereumChainId::ChainId` (r:1 w:0)
147
	/// Proof: `EthereumChainId::ChainId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
148
	/// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
149
	/// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
150
	/// Storage: `EVM::AccountCodesMetadata` (r:2 w:0)
151
	/// Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
152
	/// Storage: `System::Account` (r:1 w:1)
153
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
154
	/// Storage: `System::Digest` (r:1 w:0)
155
	/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
156
	/// Storage: `EVM::AccountCodes` (r:1 w:0)
157
	/// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`)
158
	/// Storage: `Assets::Asset` (r:1 w:0)
159
	/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(174), added: 2649, mode: `MaxEncodedLen`)
160
	/// Storage: `EVM::AccountStorages` (r:1 w:1)
161
	/// Proof: `EVM::AccountStorages` (`max_values`: None, `max_size`: None, mode: `Measured`)
162
	/// Storage: `Ethereum::Pending` (r:1 w:1)
163
	/// Proof: `Ethereum::Pending` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
164
	fn unfreeze_foreign_asset() -> Weight {
165
		// Proof Size summary in bytes:
166
		//  Measured:  `3295628`
167
		//  Estimated: `3301568`
168
		// Minimum execution time: 3_736_006_000 picoseconds.
169
		Weight::from_parts(3_851_556_000, 3301568)
170
			.saturating_add(T::DbWeight::get().reads(15_u64))
171
			.saturating_add(T::DbWeight::get().writes(5_u64))
172
	}
173
}