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-14, 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_crowdloan_rewards
37
// --extrinsic=*
38
// --wasm-execution=compiled
39
// --header=./file_header.txt
40
// --template=./benchmarking/frame-weight-template.hbs
41
// --output=./runtime/moonbeam/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
78
	fn initialize_reward_vec(x: u32, ) -> Weight {
69
78
		// Proof Size summary in bytes:
70
78
		//  Measured:  `76194 + x * (550 ±0)`
71
78
		//  Estimated: `66137 + x * (3052 ±0)`
72
78
		// Minimum execution time: 137_625_000 picoseconds.
73
78
		Weight::from_parts(133_926_713, 66137)
74
78
			// Standard Error: 34_644
75
78
			.saturating_add(Weight::from_parts(62_829_821, 0).saturating_mul(x.into()))
76
78
			.saturating_add(T::DbWeight::get().reads(4_u64))
77
78
			.saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(x.into())))
78
78
			.saturating_add(T::DbWeight::get().writes(3_u64))
79
78
			.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(x.into())))
80
78
			.saturating_add(Weight::from_parts(0, 3052).saturating_mul(x.into()))
81
78
	}
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
36
	fn complete_initialization() -> Weight {
95
36
		// Proof Size summary in bytes:
96
36
		//  Measured:  `447`
97
36
		//  Estimated: `3581`
98
36
		// Minimum execution time: 21_161_000 picoseconds.
99
36
		Weight::from_parts(21_969_000, 3581)
100
36
			.saturating_add(T::DbWeight::get().reads(5_u64))
101
36
			.saturating_add(T::DbWeight::get().writes(2_u64))
102
36
	}
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
6
	fn claim() -> Weight {
116
6
		// Proof Size summary in bytes:
117
6
		//  Measured:  `902`
118
6
		//  Estimated: `6172`
119
6
		// Minimum execution time: 71_410_000 picoseconds.
120
6
		Weight::from_parts(72_708_000, 6172)
121
6
			.saturating_add(T::DbWeight::get().reads(7_u64))
122
6
			.saturating_add(T::DbWeight::get().writes(3_u64))
123
6
	}
124
	/// Storage: `CrowdloanRewards::AccountsPayable` (r:2 w:2)
125
	/// Proof: `CrowdloanRewards::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`)
126
6
	fn update_reward_address() -> Weight {
127
6
		// Proof Size summary in bytes:
128
6
		//  Measured:  `364`
129
6
		//  Estimated: `6304`
130
6
		// Minimum execution time: 20_698_000 picoseconds.
131
6
		Weight::from_parts(21_696_000, 6304)
132
6
			.saturating_add(T::DbWeight::get().reads(2_u64))
133
6
			.saturating_add(T::DbWeight::get().writes(2_u64))
134
6
	}
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:  `736`
146
		//  Estimated: `6172`
147
		// Minimum execution time: 118_151_000 picoseconds.
148
		Weight::from_parts(119_623_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:  `333 + x * (32 ±0)`
158
		//  Estimated: `6273 + x * (32 ±0)`
159
		// Minimum execution time: 66_619_000 picoseconds.
160
		Weight::from_parts(68_086_000, 6273)
161
			// Standard Error: 9_035
162
			.saturating_add(Weight::from_parts(44_617_743, 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
}