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/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
// --disable-log-color
42
// --output=./runtime/moonbeam/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_045_000 picoseconds.
65
		Weight::from_parts(13_595_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_500_000 picoseconds.
76
		Weight::from_parts(7_928_000, 1887)
77
			.saturating_add(T::DbWeight::get().reads(1_u64))
78
			.saturating_add(T::DbWeight::get().writes(1_u64))
79
	}
80
	/// Storage: `Treasury::Deactivated` (r:1 w:1)
81
	/// Proof: `Treasury::Deactivated` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
82
	/// Storage: `Balances::InactiveIssuance` (r:1 w:1)
83
	/// Proof: `Balances::InactiveIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
84
	/// Storage: `Treasury::LastSpendPeriod` (r:1 w:1)
85
	/// Proof: `Treasury::LastSpendPeriod` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
86
	/// The range of component `p` is `[0, 99]`.
87
	fn on_initialize_proposals(p: u32, ) -> Weight {
88
		// Proof Size summary in bytes:
89
		//  Measured:  `274`
90
		//  Estimated: `1501`
91
		// Minimum execution time: 12_465_000 picoseconds.
92
		Weight::from_parts(15_203_158, 1501)
93
			// Standard Error: 746
94
			.saturating_add(Weight::from_parts(38_002, 0).saturating_mul(p.into()))
95
			.saturating_add(T::DbWeight::get().reads(3_u64))
96
			.saturating_add(T::DbWeight::get().writes(3_u64))
97
	}
98
	/// Storage: `EvmForeignAssets::AssetsById` (r:1 w:0)
99
	/// Proof: `EvmForeignAssets::AssetsById` (`max_values`: None, `max_size`: None, mode: `Measured`)
100
	/// Storage: `XcmWeightTrader::SupportedAssets` (r:1 w:0)
101
	/// Proof: `XcmWeightTrader::SupportedAssets` (`max_values`: None, `max_size`: Some(635), added: 3110, mode: `MaxEncodedLen`)
102
	/// Storage: `Treasury::SpendCount` (r:1 w:1)
103
	/// Proof: `Treasury::SpendCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
104
	/// Storage: `Treasury::Spends` (r:0 w:1)
105
	/// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(74), added: 2549, mode: `MaxEncodedLen`)
106
14
	fn spend() -> Weight {
107
		// Proof Size summary in bytes:
108
		//  Measured:  `549`
109
		//  Estimated: `4100`
110
		// Minimum execution time: 32_089_000 picoseconds.
111
14
		Weight::from_parts(32_675_000, 4100)
112
14
			.saturating_add(T::DbWeight::get().reads(3_u64))
113
14
			.saturating_add(T::DbWeight::get().writes(2_u64))
114
14
	}
115
	/// Storage: `Treasury::Spends` (r:1 w:1)
116
	/// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(74), added: 2549, mode: `MaxEncodedLen`)
117
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
118
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
119
	/// Storage: `EthereumXcm::EthereumXcmSuspended` (r:1 w:0)
120
	/// Proof: `EthereumXcm::EthereumXcmSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
121
	/// Storage: `EthereumXcm::Nonce` (r:1 w:1)
122
	/// Proof: `EthereumXcm::Nonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
123
	/// Storage: `EthereumChainId::ChainId` (r:1 w:0)
124
	/// Proof: `EthereumChainId::ChainId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
125
	/// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
126
	/// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
127
	/// Storage: `EVM::AccountCodesMetadata` (r:2 w:0)
128
	/// Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
129
	/// Storage: `System::Digest` (r:1 w:0)
130
	/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
131
	/// Storage: `EVM::AccountCodes` (r:1 w:0)
132
	/// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`)
133
	/// Storage: `EVM::AccountStorages` (r:3 w:2)
134
	/// Proof: `EVM::AccountStorages` (`max_values`: None, `max_size`: None, mode: `Measured`)
135
	/// Storage: `Ethereum::CounterForPending` (r:1 w:1)
136
	/// Proof: `Ethereum::CounterForPending` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
137
	/// Storage: `Ethereum::Pending` (r:2 w:1)
138
	/// Proof: `Ethereum::Pending` (`max_values`: None, `max_size`: None, mode: `Measured`)
139
	fn payout() -> Weight {
140
		// Proof Size summary in bytes:
141
		//  Measured:  `12706`
142
		//  Estimated: `21121`
143
		// Minimum execution time: 234_096_000 picoseconds.
144
		Weight::from_parts(240_211_000, 21121)
145
			.saturating_add(T::DbWeight::get().reads(16_u64))
146
			.saturating_add(T::DbWeight::get().writes(6_u64))
147
	}
148
	/// Storage: `Treasury::Spends` (r:1 w:1)
149
	/// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(74), added: 2549, mode: `MaxEncodedLen`)
150
	fn check_status() -> Weight {
151
		// Proof Size summary in bytes:
152
		//  Measured:  `303`
153
		//  Estimated: `3539`
154
		// Minimum execution time: 16_536_000 picoseconds.
155
		Weight::from_parts(17_430_000, 3539)
156
			.saturating_add(T::DbWeight::get().reads(1_u64))
157
			.saturating_add(T::DbWeight::get().writes(1_u64))
158
	}
159
	/// Storage: `Treasury::Spends` (r:1 w:1)
160
	/// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(74), added: 2549, mode: `MaxEncodedLen`)
161
	fn void_spend() -> Weight {
162
		// Proof Size summary in bytes:
163
		//  Measured:  `303`
164
		//  Estimated: `3539`
165
		// Minimum execution time: 15_326_000 picoseconds.
166
		Weight::from_parts(16_107_000, 3539)
167
			.saturating_add(T::DbWeight::get().reads(1_u64))
168
			.saturating_add(T::DbWeight::get().writes(1_u64))
169
	}
170
}