moonbase_runtime/weights/pallet_treasury.rs
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 49.0.0
21//! DATE: 2025-12-09, 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
47use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
48use sp_std::marker::PhantomData;
49
50/// Weights for `pallet_treasury`.
51pub struct WeightInfo<T>(PhantomData<T>);
52impl<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_242_000 picoseconds.
64 Weight::from_parts(12_720_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_557_000 picoseconds.
75 Weight::from_parts(7_760_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: `366 + p * (1 ±0)`
91 // Estimated: `3581`
92 // Minimum execution time: 14_056_000 picoseconds.
93 Weight::from_parts(17_008_108, 3581)
94 // Standard Error: 728
95 .saturating_add(Weight::from_parts(51_055, 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 fn spend() -> Weight {
108 // Proof Size summary in bytes:
109 // Measured: `442`
110 // Estimated: `4100`
111 // Minimum execution time: 26_176_000 picoseconds.
112 Weight::from_parts(27_314_000, 4100)
113 .saturating_add(T::DbWeight::get().reads(3_u64))
114 .saturating_add(T::DbWeight::get().writes(2_u64))
115 }
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: `EVM::AccountStorages` (r:3 w:2)
137 /// Proof: `EVM::AccountStorages` (`max_values`: None, `max_size`: None, mode: `Measured`)
138 /// Storage: `Ethereum::CounterForPending` (r:1 w:1)
139 /// Proof: `Ethereum::CounterForPending` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
140 /// Storage: `Ethereum::Pending` (r:2 w:1)
141 /// Proof: `Ethereum::Pending` (`max_values`: None, `max_size`: None, mode: `Measured`)
142 fn payout() -> Weight {
143 // Proof Size summary in bytes:
144 // Measured: `12660`
145 // Estimated: `21075`
146 // Minimum execution time: 237_803_000 picoseconds.
147 Weight::from_parts(243_196_000, 21075)
148 .saturating_add(T::DbWeight::get().reads(17_u64))
149 .saturating_add(T::DbWeight::get().writes(7_u64))
150 }
151 /// Storage: `Treasury::Spends` (r:1 w:1)
152 /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(74), added: 2549, mode: `MaxEncodedLen`)
153 fn check_status() -> Weight {
154 // Proof Size summary in bytes:
155 // Measured: `303`
156 // Estimated: `3539`
157 // Minimum execution time: 15_744_000 picoseconds.
158 Weight::from_parts(16_528_000, 3539)
159 .saturating_add(T::DbWeight::get().reads(1_u64))
160 .saturating_add(T::DbWeight::get().writes(1_u64))
161 }
162 /// Storage: `Treasury::Spends` (r:1 w:1)
163 /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(74), added: 2549, mode: `MaxEncodedLen`)
164 fn void_spend() -> Weight {
165 // Proof Size summary in bytes:
166 // Measured: `303`
167 // Estimated: `3539`
168 // Minimum execution time: 14_440_000 picoseconds.
169 Weight::from_parts(15_115_000, 3539)
170 .saturating_add(T::DbWeight::get().reads(1_u64))
171 .saturating_add(T::DbWeight::get().writes(1_u64))
172 }
173}