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_treasury`
19
//!
20
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
21
//! DATE: 2025-05-14, 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/moonbeam-runtime/moonbeam_runtime.wasm
32
// --genesis-builder=runtime
33
// --genesis-builder-preset=development
34
// --steps=50
35
// --repeat=20
36
// --pallet=pallet_treasury
37
// --extrinsic=*
38
// --wasm-execution=compiled
39
// --header=./file_header.txt
40
// --template=./benchmarking/frame-weight-template.hbs
41
// --output=./runtime/moonbeam/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_treasury`.
51
pub struct WeightInfo<T>(PhantomData<T>);
52
impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> {
53
	/// Storage: `Treasury::ProposalCount` (r:1 w:1)
54
	/// Proof: `Treasury::ProposalCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
55
	/// Storage: `Treasury::Approvals` (r:1 w:1)
56
	/// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`)
57
	/// Storage: `Treasury::Proposals` (r:0 w:1)
58
	/// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
59
	fn spend_local() -> Weight {
60
		// Proof Size summary in bytes:
61
		//  Measured:  `180`
62
		//  Estimated: `1887`
63
		// Minimum execution time: 12_644_000 picoseconds.
64
		Weight::from_parts(13_545_000, 1887)
65
			.saturating_add(T::DbWeight::get().reads(2_u64))
66
			.saturating_add(T::DbWeight::get().writes(3_u64))
67
	}
68
	/// Storage: `Treasury::Approvals` (r:1 w:1)
69
	/// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`)
70
	fn remove_approval() -> Weight {
71
		// Proof Size summary in bytes:
72
		//  Measured:  `265`
73
		//  Estimated: `1887`
74
		// Minimum execution time: 7_789_000 picoseconds.
75
		Weight::from_parts(8_188_000, 1887)
76
			.saturating_add(T::DbWeight::get().reads(1_u64))
77
			.saturating_add(T::DbWeight::get().writes(1_u64))
78
	}
79
	/// Storage: `Treasury::Deactivated` (r:1 w:1)
80
	/// Proof: `Treasury::Deactivated` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
81
	/// Storage: `Balances::InactiveIssuance` (r:1 w:1)
82
	/// Proof: `Balances::InactiveIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
83
	/// Storage: `Treasury::LastSpendPeriod` (r:1 w:1)
84
	/// Proof: `Treasury::LastSpendPeriod` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
85
	/// The range of component `p` is `[0, 99]`.
86
	fn on_initialize_proposals(p: u32, ) -> Weight {
87
		// Proof Size summary in bytes:
88
		//  Measured:  `274`
89
		//  Estimated: `1501`
90
		// Minimum execution time: 12_003_000 picoseconds.
91
		Weight::from_parts(14_700_195, 1501)
92
			// Standard Error: 738
93
			.saturating_add(Weight::from_parts(52_172, 0).saturating_mul(p.into()))
94
			.saturating_add(T::DbWeight::get().reads(3_u64))
95
			.saturating_add(T::DbWeight::get().writes(3_u64))
96
	}
97
	/// Storage: `EvmForeignAssets::AssetsById` (r:1 w:0)
98
	/// Proof: `EvmForeignAssets::AssetsById` (`max_values`: None, `max_size`: None, mode: `Measured`)
99
	/// Storage: `XcmWeightTrader::SupportedAssets` (r:1 w:0)
100
	/// Proof: `XcmWeightTrader::SupportedAssets` (`max_values`: None, `max_size`: Some(635), added: 3110, mode: `MaxEncodedLen`)
101
	/// Storage: `Treasury::SpendCount` (r:1 w:1)
102
	/// Proof: `Treasury::SpendCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
103
	/// Storage: `Treasury::Spends` (r:0 w:1)
104
	/// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(74), added: 2549, mode: `MaxEncodedLen`)
105
12
	fn spend() -> Weight {
106
12
		// Proof Size summary in bytes:
107
12
		//  Measured:  `408`
108
12
		//  Estimated: `4100`
109
12
		// Minimum execution time: 31_137_000 picoseconds.
110
12
		Weight::from_parts(32_141_000, 4100)
111
12
			.saturating_add(T::DbWeight::get().reads(3_u64))
112
12
			.saturating_add(T::DbWeight::get().writes(2_u64))
113
12
	}
114
	/// Storage: `Treasury::Spends` (r:1 w:1)
115
	/// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(74), added: 2549, mode: `MaxEncodedLen`)
116
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
117
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
118
	/// Storage: `EthereumXcm::EthereumXcmSuspended` (r:1 w:0)
119
	/// Proof: `EthereumXcm::EthereumXcmSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
120
	/// Storage: `EthereumXcm::Nonce` (r:1 w:1)
121
	/// Proof: `EthereumXcm::Nonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
122
	/// Storage: `EthereumChainId::ChainId` (r:1 w:0)
123
	/// Proof: `EthereumChainId::ChainId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
124
	/// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
125
	/// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
126
	/// Storage: `EVM::AccountCodesMetadata` (r:2 w:0)
127
	/// Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
128
	/// Storage: `System::Digest` (r:1 w:0)
129
	/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
130
	/// Storage: `EVM::AccountCodes` (r:1 w:0)
131
	/// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`)
132
	/// Storage: `Assets::Asset` (r:1 w:0)
133
	/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(174), added: 2649, mode: `MaxEncodedLen`)
134
	/// Storage: `EVM::AccountStorages` (r:3 w:2)
135
	/// Proof: `EVM::AccountStorages` (`max_values`: None, `max_size`: None, mode: `Measured`)
136
	/// Storage: `Ethereum::CounterForPending` (r:1 w:1)
137
	/// Proof: `Ethereum::CounterForPending` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
138
	/// Storage: `Ethereum::Pending` (r:2 w:1)
139
	/// Proof: `Ethereum::Pending` (`max_values`: None, `max_size`: None, mode: `Measured`)
140
	fn payout() -> Weight {
141
		// Proof Size summary in bytes:
142
		//  Measured:  `12476`
143
		//  Estimated: `20891`
144
		// Minimum execution time: 252_497_000 picoseconds.
145
		Weight::from_parts(259_469_000, 20891)
146
			.saturating_add(T::DbWeight::get().reads(17_u64))
147
			.saturating_add(T::DbWeight::get().writes(6_u64))
148
	}
149
	/// Storage: `Treasury::Spends` (r:1 w:1)
150
	/// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(74), added: 2549, mode: `MaxEncodedLen`)
151
	fn check_status() -> Weight {
152
		// Proof Size summary in bytes:
153
		//  Measured:  `303`
154
		//  Estimated: `3539`
155
		// Minimum execution time: 16_758_000 picoseconds.
156
		Weight::from_parts(17_562_000, 3539)
157
			.saturating_add(T::DbWeight::get().reads(1_u64))
158
			.saturating_add(T::DbWeight::get().writes(1_u64))
159
	}
160
	/// Storage: `Treasury::Spends` (r:1 w:1)
161
	/// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(74), added: 2549, mode: `MaxEncodedLen`)
162
	fn void_spend() -> Weight {
163
		// Proof Size summary in bytes:
164
		//  Measured:  `303`
165
		//  Estimated: `3539`
166
		// Minimum execution time: 15_352_000 picoseconds.
167
		Weight::from_parts(16_103_000, 3539)
168
			.saturating_add(T::DbWeight::get().reads(1_u64))
169
			.saturating_add(T::DbWeight::get().writes(1_u64))
170
	}
171
}