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_crowdloan_rewards`
19
//!
20
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
21
//! DATE: 2025-05-13, 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_crowdloan_rewards
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_crowdloan_rewards`.
51
pub struct WeightInfo<T>(PhantomData<T>);
52
impl<T: frame_system::Config> pallet_crowdloan_rewards::WeightInfo for WeightInfo<T> {
53
	/// Storage: `CrowdloanRewards::Initialized` (r:1 w:0)
54
	/// Proof: `CrowdloanRewards::Initialized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
55
	/// Storage: `CrowdloanRewards::InitializedRewardAmount` (r:1 w:1)
56
	/// Proof: `CrowdloanRewards::InitializedRewardAmount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
57
	/// Storage: `CrowdloanRewards::TotalContributors` (r:1 w:1)
58
	/// Proof: `CrowdloanRewards::TotalContributors` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
59
	/// Storage: `System::Account` (r:501 w:501)
60
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
61
	/// Storage: `CrowdloanRewards::ClaimedRelayChainIds` (r:500 w:500)
62
	/// Proof: `CrowdloanRewards::ClaimedRelayChainIds` (`max_values`: None, `max_size`: None, mode: `Measured`)
63
	/// Storage: `CrowdloanRewards::UnassociatedContributions` (r:500 w:0)
64
	/// Proof: `CrowdloanRewards::UnassociatedContributions` (`max_values`: None, `max_size`: None, mode: `Measured`)
65
	/// Storage: `CrowdloanRewards::AccountsPayable` (r:500 w:500)
66
	/// Proof: `CrowdloanRewards::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`)
67
	/// The range of component `x` is `[1, 500]`.
68
91
	fn initialize_reward_vec(x: u32, ) -> Weight {
69
91
		// Proof Size summary in bytes:
70
91
		//  Measured:  `76347 + x * (550 ±0)`
71
91
		//  Estimated: `66246 + x * (3052 ±5)`
72
91
		// Minimum execution time: 139_840_000 picoseconds.
73
91
		Weight::from_parts(226_812_099, 66246)
74
91
			// Standard Error: 48_887
75
91
			.saturating_add(Weight::from_parts(62_464_443, 0).saturating_mul(x.into()))
76
91
			.saturating_add(T::DbWeight::get().reads(4_u64))
77
91
			.saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(x.into())))
78
91
			.saturating_add(T::DbWeight::get().writes(3_u64))
79
91
			.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(x.into())))
80
91
			.saturating_add(Weight::from_parts(0, 3052).saturating_mul(x.into()))
81
91
	}
82
	/// Storage: `CrowdloanRewards::Initialized` (r:1 w:1)
83
	/// Proof: `CrowdloanRewards::Initialized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
84
	/// Storage: `CrowdloanRewards::InitRelayBlock` (r:1 w:0)
85
	/// Proof: `CrowdloanRewards::InitRelayBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
86
	/// Storage: `CrowdloanRewards::InitializedRewardAmount` (r:1 w:0)
87
	/// Proof: `CrowdloanRewards::InitializedRewardAmount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
88
	/// Storage: `System::Account` (r:1 w:0)
89
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
90
	/// Storage: `CrowdloanRewards::TotalContributors` (r:1 w:0)
91
	/// Proof: `CrowdloanRewards::TotalContributors` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
92
	/// Storage: `CrowdloanRewards::EndRelayBlock` (r:0 w:1)
93
	/// Proof: `CrowdloanRewards::EndRelayBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
94
42
	fn complete_initialization() -> Weight {
95
42
		// Proof Size summary in bytes:
96
42
		//  Measured:  `546`
97
42
		//  Estimated: `3581`
98
42
		// Minimum execution time: 18_010_000 picoseconds.
99
42
		Weight::from_parts(18_620_000, 3581)
100
42
			.saturating_add(T::DbWeight::get().reads(5_u64))
101
42
			.saturating_add(T::DbWeight::get().writes(2_u64))
102
42
	}
103
	/// Storage: `CrowdloanRewards::Initialized` (r:1 w:0)
104
	/// Proof: `CrowdloanRewards::Initialized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
105
	/// Storage: `CrowdloanRewards::AccountsPayable` (r:1 w:1)
106
	/// Proof: `CrowdloanRewards::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`)
107
	/// Storage: `ParachainSystem::ValidationData` (r:1 w:0)
108
	/// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
109
	/// Storage: `CrowdloanRewards::InitRelayBlock` (r:1 w:0)
110
	/// Proof: `CrowdloanRewards::InitRelayBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
111
	/// Storage: `CrowdloanRewards::EndRelayBlock` (r:1 w:0)
112
	/// Proof: `CrowdloanRewards::EndRelayBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
113
	/// Storage: `System::Account` (r:2 w:2)
114
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
115
7
	fn claim() -> Weight {
116
7
		// Proof Size summary in bytes:
117
7
		//  Measured:  `1034`
118
7
		//  Estimated: `6172`
119
7
		// Minimum execution time: 70_976_000 picoseconds.
120
7
		Weight::from_parts(86_461_000, 6172)
121
7
			.saturating_add(T::DbWeight::get().reads(7_u64))
122
7
			.saturating_add(T::DbWeight::get().writes(3_u64))
123
7
	}
124
	/// Storage: `CrowdloanRewards::AccountsPayable` (r:2 w:2)
125
	/// Proof: `CrowdloanRewards::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`)
126
7
	fn update_reward_address() -> Weight {
127
7
		// Proof Size summary in bytes:
128
7
		//  Measured:  `397`
129
7
		//  Estimated: `6337`
130
7
		// Minimum execution time: 21_103_000 picoseconds.
131
7
		Weight::from_parts(21_717_000, 6337)
132
7
			.saturating_add(T::DbWeight::get().reads(2_u64))
133
7
			.saturating_add(T::DbWeight::get().writes(2_u64))
134
7
	}
135
	/// Storage: `CrowdloanRewards::UnassociatedContributions` (r:1 w:1)
136
	/// Proof: `CrowdloanRewards::UnassociatedContributions` (`max_values`: None, `max_size`: None, mode: `Measured`)
137
	/// Storage: `CrowdloanRewards::ClaimedRelayChainIds` (r:1 w:1)
138
	/// Proof: `CrowdloanRewards::ClaimedRelayChainIds` (`max_values`: None, `max_size`: None, mode: `Measured`)
139
	/// Storage: `CrowdloanRewards::AccountsPayable` (r:1 w:1)
140
	/// Proof: `CrowdloanRewards::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`)
141
	/// Storage: `System::Account` (r:2 w:2)
142
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
143
	fn associate_native_identity() -> Weight {
144
		// Proof Size summary in bytes:
145
		//  Measured:  `868`
146
		//  Estimated: `6172`
147
		// Minimum execution time: 113_488_000 picoseconds.
148
		Weight::from_parts(115_090_000, 6172)
149
			.saturating_add(T::DbWeight::get().reads(5_u64))
150
			.saturating_add(T::DbWeight::get().writes(5_u64))
151
	}
152
	/// Storage: `CrowdloanRewards::AccountsPayable` (r:2 w:2)
153
	/// Proof: `CrowdloanRewards::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`)
154
	/// The range of component `x` is `[1, 500]`.
155
	fn change_association_with_relay_keys(x: u32, ) -> Weight {
156
		// Proof Size summary in bytes:
157
		//  Measured:  `366 + x * (32 ±0)`
158
		//  Estimated: `6306 + x * (32 ±0)`
159
		// Minimum execution time: 63_131_000 picoseconds.
160
		Weight::from_parts(63_530_000, 6306)
161
			// Standard Error: 8_404
162
			.saturating_add(Weight::from_parts(38_764_775, 0).saturating_mul(x.into()))
163
			.saturating_add(T::DbWeight::get().reads(2_u64))
164
			.saturating_add(T::DbWeight::get().writes(2_u64))
165
			.saturating_add(Weight::from_parts(0, 32).saturating_mul(x.into()))
166
	}
167
}