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 51.0.0
21
//! DATE: 2026-02-09, 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/moonbase-runtime/moonbase_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
// --disable-log-color
42
// --output=./runtime/moonbase/src/weights
43

            
44
#![cfg_attr(rustfmt, rustfmt_skip)]
45
#![allow(unused_parens)]
46
#![allow(unused_imports)]
47

            
48
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
49
use sp_std::marker::PhantomData;
50

            
51
/// Weights for `pallet_treasury`.
52
pub struct WeightInfo<T>(PhantomData<T>);
53
impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> {
54
	/// Storage: `Treasury::ProposalCount` (r:1 w:1)
55
	/// Proof: `Treasury::ProposalCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
56
	/// Storage: `Treasury::Approvals` (r:1 w:1)
57
	/// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`)
58
	/// Storage: `Treasury::Proposals` (r:0 w:1)
59
	/// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
60
	fn spend_local() -> Weight {
61
		// Proof Size summary in bytes:
62
		//  Measured:  `180`
63
		//  Estimated: `1887`
64
		// Minimum execution time: 13_022_000 picoseconds.
65
		Weight::from_parts(13_793_000, 1887)
66
			.saturating_add(T::DbWeight::get().reads(2_u64))
67
			.saturating_add(T::DbWeight::get().writes(3_u64))
68
	}
69
	/// Storage: `Treasury::Approvals` (r:1 w:1)
70
	/// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`)
71
	fn remove_approval() -> Weight {
72
		// Proof Size summary in bytes:
73
		//  Measured:  `265`
74
		//  Estimated: `1887`
75
		// Minimum execution time: 7_557_000 picoseconds.
76
		Weight::from_parts(7_911_000, 1887)
77
			.saturating_add(T::DbWeight::get().reads(1_u64))
78
			.saturating_add(T::DbWeight::get().writes(1_u64))
79
	}
80
	/// Storage: `System::Account` (r:1 w:0)
81
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
82
	/// Storage: `Treasury::Deactivated` (r:1 w:1)
83
	/// Proof: `Treasury::Deactivated` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
84
	/// Storage: `Balances::InactiveIssuance` (r:1 w:1)
85
	/// Proof: `Balances::InactiveIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
86
	/// Storage: `Treasury::LastSpendPeriod` (r:1 w:1)
87
	/// Proof: `Treasury::LastSpendPeriod` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
88
	/// The range of component `p` is `[0, 99]`.
89
	fn on_initialize_proposals(p: u32, ) -> Weight {
90
		// Proof Size summary in bytes:
91
		//  Measured:  `366 + p * (1 ±0)`
92
		//  Estimated: `3581`
93
		// Minimum execution time: 14_615_000 picoseconds.
94
		Weight::from_parts(17_663_772, 3581)
95
			// Standard Error: 803
96
			.saturating_add(Weight::from_parts(53_878, 0).saturating_mul(p.into()))
97
			.saturating_add(T::DbWeight::get().reads(4_u64))
98
			.saturating_add(T::DbWeight::get().writes(3_u64))
99
	}
100
	/// Storage: `EvmForeignAssets::AssetsById` (r:1 w:0)
101
	/// Proof: `EvmForeignAssets::AssetsById` (`max_values`: None, `max_size`: None, mode: `Measured`)
102
	/// Storage: `XcmWeightTrader::SupportedAssets` (r:1 w:0)
103
	/// Proof: `XcmWeightTrader::SupportedAssets` (`max_values`: None, `max_size`: Some(635), added: 3110, mode: `MaxEncodedLen`)
104
	/// Storage: `Treasury::SpendCount` (r:1 w:1)
105
	/// Proof: `Treasury::SpendCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
106
	/// Storage: `Treasury::Spends` (r:0 w:1)
107
	/// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(74), added: 2549, mode: `MaxEncodedLen`)
108
14
	fn spend() -> Weight {
109
		// Proof Size summary in bytes:
110
		//  Measured:  `442`
111
		//  Estimated: `4100`
112
		// Minimum execution time: 27_398_000 picoseconds.
113
14
		Weight::from_parts(28_404_000, 4100)
114
14
			.saturating_add(T::DbWeight::get().reads(3_u64))
115
14
			.saturating_add(T::DbWeight::get().writes(2_u64))
116
14
	}
117
	/// Storage: `Treasury::Spends` (r:1 w:1)
118
	/// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(74), added: 2549, mode: `MaxEncodedLen`)
119
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
120
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
121
	/// Storage: `EthereumXcm::EthereumXcmSuspended` (r:1 w:0)
122
	/// Proof: `EthereumXcm::EthereumXcmSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
123
	/// Storage: `EthereumXcm::Nonce` (r:1 w:1)
124
	/// Proof: `EthereumXcm::Nonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
125
	/// Storage: `EthereumChainId::ChainId` (r:1 w:0)
126
	/// Proof: `EthereumChainId::ChainId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
127
	/// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
128
	/// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
129
	/// Storage: `EVM::AccountCodesMetadata` (r:2 w:0)
130
	/// Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
131
	/// Storage: `System::Account` (r:1 w:1)
132
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
133
	/// Storage: `System::Digest` (r:1 w:0)
134
	/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
135
	/// Storage: `EVM::AccountCodes` (r:1 w:0)
136
	/// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`)
137
	/// Storage: `EVM::AccountStorages` (r:3 w:2)
138
	/// Proof: `EVM::AccountStorages` (`max_values`: None, `max_size`: None, mode: `Measured`)
139
	/// Storage: `Ethereum::CounterForPending` (r:1 w:1)
140
	/// Proof: `Ethereum::CounterForPending` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
141
	/// Storage: `Ethereum::Pending` (r:2 w:1)
142
	/// Proof: `Ethereum::Pending` (`max_values`: None, `max_size`: None, mode: `Measured`)
143
	fn payout() -> Weight {
144
		// Proof Size summary in bytes:
145
		//  Measured:  `12660`
146
		//  Estimated: `21075`
147
		// Minimum execution time: 236_116_000 picoseconds.
148
		Weight::from_parts(241_766_000, 21075)
149
			.saturating_add(T::DbWeight::get().reads(17_u64))
150
			.saturating_add(T::DbWeight::get().writes(7_u64))
151
	}
152
	/// Storage: `Treasury::Spends` (r:1 w:1)
153
	/// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(74), added: 2549, mode: `MaxEncodedLen`)
154
	fn check_status() -> Weight {
155
		// Proof Size summary in bytes:
156
		//  Measured:  `303`
157
		//  Estimated: `3539`
158
		// Minimum execution time: 16_619_000 picoseconds.
159
		Weight::from_parts(17_495_000, 3539)
160
			.saturating_add(T::DbWeight::get().reads(1_u64))
161
			.saturating_add(T::DbWeight::get().writes(1_u64))
162
	}
163
	/// Storage: `Treasury::Spends` (r:1 w:1)
164
	/// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(74), added: 2549, mode: `MaxEncodedLen`)
165
	fn void_spend() -> Weight {
166
		// Proof Size summary in bytes:
167
		//  Measured:  `303`
168
		//  Estimated: `3539`
169
		// Minimum execution time: 15_049_000 picoseconds.
170
		Weight::from_parts(15_809_000, 3539)
171
			.saturating_add(T::DbWeight::get().reads(1_u64))
172
			.saturating_add(T::DbWeight::get().writes(1_u64))
173
	}
174
}