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-198`, 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
// --output=./runtime/moonbase/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_778_000 picoseconds.
64
		Weight::from_parts(13_413_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_837_000 picoseconds.
75
		Weight::from_parts(8_185_000, 1887)
76
			.saturating_add(T::DbWeight::get().reads(1_u64))
77
			.saturating_add(T::DbWeight::get().writes(1_u64))
78
	}
79
	/// Storage: `System::Account` (r:1 w:0)
80
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
81
	/// Storage: `Treasury::Deactivated` (r:1 w:1)
82
	/// Proof: `Treasury::Deactivated` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
83
	/// Storage: `Balances::InactiveIssuance` (r:1 w:1)
84
	/// Proof: `Balances::InactiveIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
85
	/// Storage: `Treasury::LastSpendPeriod` (r:1 w:1)
86
	/// Proof: `Treasury::LastSpendPeriod` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
87
	/// The range of component `p` is `[0, 99]`.
88
	fn on_initialize_proposals(p: u32, ) -> Weight {
89
		// Proof Size summary in bytes:
90
		//  Measured:  `412 + p * (1 ±0)`
91
		//  Estimated: `3581`
92
		// Minimum execution time: 14_993_000 picoseconds.
93
		Weight::from_parts(17_955_878, 3581)
94
			// Standard Error: 939
95
			.saturating_add(Weight::from_parts(60_888, 0).saturating_mul(p.into()))
96
			.saturating_add(T::DbWeight::get().reads(4_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: `XcmWeightTrader::SupportedAssets` (r:1 w:0)
102
	/// Proof: `XcmWeightTrader::SupportedAssets` (`max_values`: None, `max_size`: Some(635), added: 3110, mode: `MaxEncodedLen`)
103
	/// Storage: `Treasury::SpendCount` (r:1 w:1)
104
	/// Proof: `Treasury::SpendCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
105
	/// Storage: `Treasury::Spends` (r:0 w:1)
106
	/// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(74), added: 2549, mode: `MaxEncodedLen`)
107
14
	fn spend() -> Weight {
108
14
		// Proof Size summary in bytes:
109
14
		//  Measured:  `408`
110
14
		//  Estimated: `4100`
111
14
		// Minimum execution time: 27_938_000 picoseconds.
112
14
		Weight::from_parts(28_770_000, 4100)
113
14
			.saturating_add(T::DbWeight::get().reads(3_u64))
114
14
			.saturating_add(T::DbWeight::get().writes(2_u64))
115
14
	}
116
	/// Storage: `Treasury::Spends` (r:1 w:1)
117
	/// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(74), added: 2549, mode: `MaxEncodedLen`)
118
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
119
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
120
	/// Storage: `EthereumXcm::EthereumXcmSuspended` (r:1 w:0)
121
	/// Proof: `EthereumXcm::EthereumXcmSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
122
	/// Storage: `EthereumXcm::Nonce` (r:1 w:1)
123
	/// Proof: `EthereumXcm::Nonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
124
	/// Storage: `EthereumChainId::ChainId` (r:1 w:0)
125
	/// Proof: `EthereumChainId::ChainId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
126
	/// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
127
	/// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
128
	/// Storage: `EVM::AccountCodesMetadata` (r:2 w:0)
129
	/// Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
130
	/// Storage: `System::Account` (r:1 w:1)
131
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
132
	/// Storage: `System::Digest` (r:1 w:0)
133
	/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
134
	/// Storage: `EVM::AccountCodes` (r:1 w:0)
135
	/// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`)
136
	/// Storage: `Assets::Asset` (r:1 w:0)
137
	/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(174), added: 2649, mode: `MaxEncodedLen`)
138
	/// Storage: `EVM::AccountStorages` (r:3 w:2)
139
	/// Proof: `EVM::AccountStorages` (`max_values`: None, `max_size`: None, mode: `Measured`)
140
	/// Storage: `Ethereum::CounterForPending` (r:1 w:1)
141
	/// Proof: `Ethereum::CounterForPending` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
142
	/// Storage: `Ethereum::Pending` (r:2 w:1)
143
	/// Proof: `Ethereum::Pending` (`max_values`: None, `max_size`: None, mode: `Measured`)
144
	fn payout() -> Weight {
145
		// Proof Size summary in bytes:
146
		//  Measured:  `12831`
147
		//  Estimated: `21246`
148
		// Minimum execution time: 252_978_000 picoseconds.
149
		Weight::from_parts(259_316_000, 21246)
150
			.saturating_add(T::DbWeight::get().reads(18_u64))
151
			.saturating_add(T::DbWeight::get().writes(7_u64))
152
	}
153
	/// Storage: `Treasury::Spends` (r:1 w:1)
154
	/// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(74), added: 2549, mode: `MaxEncodedLen`)
155
	fn check_status() -> Weight {
156
		// Proof Size summary in bytes:
157
		//  Measured:  `303`
158
		//  Estimated: `3539`
159
		// Minimum execution time: 16_966_000 picoseconds.
160
		Weight::from_parts(17_407_000, 3539)
161
			.saturating_add(T::DbWeight::get().reads(1_u64))
162
			.saturating_add(T::DbWeight::get().writes(1_u64))
163
	}
164
	/// Storage: `Treasury::Spends` (r:1 w:1)
165
	/// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(74), added: 2549, mode: `MaxEncodedLen`)
166
	fn void_spend() -> Weight {
167
		// Proof Size summary in bytes:
168
		//  Measured:  `303`
169
		//  Estimated: `3539`
170
		// Minimum execution time: 15_371_000 picoseconds.
171
		Weight::from_parts(16_022_000, 3539)
172
			.saturating_add(T::DbWeight::get().reads(1_u64))
173
			.saturating_add(T::DbWeight::get().writes(1_u64))
174
	}
175
}