1
// Copyright 2024 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
//! Autogenerated weights for `pallet_crowdloan_rewards`
18
//!
19
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 43.0.0
20
//! DATE: 2025-02-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
21
//! WORST CASE MAP SIZE: `1000000`
22
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
23
//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
24

            
25
// Executed Command:
26
// ./target/production/moonbeam
27
// benchmark
28
// pallet
29
// --runtime=./target/production/wbuild/moonriver-runtime/moonriver_runtime.wasm
30
// --genesis-builder=runtime
31
// --genesis-builder-preset=development
32
// --steps=50
33
// --repeat=20
34
// --pallet=pallet_crowdloan_rewards
35
// --extrinsic=*
36
// --wasm-execution=compiled
37
// --header=./file_header.txt
38
// --template=./benchmarking/frame-weight-template.hbs
39
// --output=./runtime/moonriver/src/weights/
40

            
41
#![cfg_attr(rustfmt, rustfmt_skip)]
42
#![allow(unused_parens)]
43
#![allow(unused_imports)]
44

            
45
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
46
use sp_std::marker::PhantomData;
47

            
48
/// Weights for `pallet_crowdloan_rewards`.
49
pub struct WeightInfo<T>(PhantomData<T>);
50
impl<T: frame_system::Config> pallet_crowdloan_rewards::WeightInfo for WeightInfo<T> {
51
	/// Storage: `CrowdloanRewards::Initialized` (r:1 w:0)
52
	/// Proof: `CrowdloanRewards::Initialized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
53
	/// Storage: `CrowdloanRewards::InitializedRewardAmount` (r:1 w:1)
54
	/// Proof: `CrowdloanRewards::InitializedRewardAmount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
55
	/// Storage: `CrowdloanRewards::TotalContributors` (r:1 w:1)
56
	/// Proof: `CrowdloanRewards::TotalContributors` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
57
	/// Storage: `System::Account` (r:501 w:501)
58
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
59
	/// Storage: `CrowdloanRewards::ClaimedRelayChainIds` (r:500 w:500)
60
	/// Proof: `CrowdloanRewards::ClaimedRelayChainIds` (`max_values`: None, `max_size`: None, mode: `Measured`)
61
	/// Storage: `CrowdloanRewards::UnassociatedContributions` (r:500 w:0)
62
	/// Proof: `CrowdloanRewards::UnassociatedContributions` (`max_values`: None, `max_size`: None, mode: `Measured`)
63
	/// Storage: `CrowdloanRewards::AccountsPayable` (r:500 w:500)
64
	/// Proof: `CrowdloanRewards::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`)
65
	/// The range of component `x` is `[1, 500]`.
66
104
	fn initialize_reward_vec(x: u32, ) -> Weight {
67
104
		// Proof Size summary in bytes:
68
104
		//  Measured:  `76161 + x * (550 ±0)`
69
104
		//  Estimated: `66116 + x * (3052 ±5)`
70
104
		// Minimum execution time: 120_235_000 picoseconds.
71
104
		Weight::from_parts(222_965_960, 66116)
72
104
			// Standard Error: 25_601
73
104
			.saturating_add(Weight::from_parts(57_217_458, 0).saturating_mul(x.into()))
74
104
			.saturating_add(T::DbWeight::get().reads(4_u64))
75
104
			.saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(x.into())))
76
104
			.saturating_add(T::DbWeight::get().writes(3_u64))
77
104
			.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(x.into())))
78
104
			.saturating_add(Weight::from_parts(0, 3052).saturating_mul(x.into()))
79
104
	}
80
	/// Storage: `CrowdloanRewards::Initialized` (r:1 w:1)
81
	/// Proof: `CrowdloanRewards::Initialized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
82
	/// Storage: `CrowdloanRewards::InitRelayBlock` (r:1 w:0)
83
	/// Proof: `CrowdloanRewards::InitRelayBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
84
	/// Storage: `CrowdloanRewards::InitializedRewardAmount` (r:1 w:0)
85
	/// Proof: `CrowdloanRewards::InitializedRewardAmount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
86
	/// Storage: `System::Account` (r:1 w:0)
87
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
88
	/// Storage: `CrowdloanRewards::TotalContributors` (r:1 w:0)
89
	/// Proof: `CrowdloanRewards::TotalContributors` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
90
	/// Storage: `CrowdloanRewards::EndRelayBlock` (r:0 w:1)
91
	/// Proof: `CrowdloanRewards::EndRelayBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
92
48
	fn complete_initialization() -> Weight {
93
48
		// Proof Size summary in bytes:
94
48
		//  Measured:  `447`
95
48
		//  Estimated: `3581`
96
48
		// Minimum execution time: 20_804_000 picoseconds.
97
48
		Weight::from_parts(21_315_000, 3581)
98
48
			.saturating_add(T::DbWeight::get().reads(5_u64))
99
48
			.saturating_add(T::DbWeight::get().writes(2_u64))
100
48
	}
101
	/// Storage: `CrowdloanRewards::Initialized` (r:1 w:0)
102
	/// Proof: `CrowdloanRewards::Initialized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
103
	/// Storage: `CrowdloanRewards::AccountsPayable` (r:1 w:1)
104
	/// Proof: `CrowdloanRewards::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`)
105
	/// Storage: `ParachainSystem::ValidationData` (r:1 w:0)
106
	/// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
107
	/// Storage: `CrowdloanRewards::InitRelayBlock` (r:1 w:0)
108
	/// Proof: `CrowdloanRewards::InitRelayBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
109
	/// Storage: `CrowdloanRewards::EndRelayBlock` (r:1 w:0)
110
	/// Proof: `CrowdloanRewards::EndRelayBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
111
	/// Storage: `System::Account` (r:2 w:2)
112
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
113
8
	fn claim() -> Weight {
114
8
		// Proof Size summary in bytes:
115
8
		//  Measured:  `902`
116
8
		//  Estimated: `6172`
117
8
		// Minimum execution time: 70_072_000 picoseconds.
118
8
		Weight::from_parts(71_366_000, 6172)
119
8
			.saturating_add(T::DbWeight::get().reads(7_u64))
120
8
			.saturating_add(T::DbWeight::get().writes(3_u64))
121
8
	}
122
	/// Storage: `CrowdloanRewards::AccountsPayable` (r:2 w:2)
123
	/// Proof: `CrowdloanRewards::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`)
124
8
	fn update_reward_address() -> Weight {
125
8
		// Proof Size summary in bytes:
126
8
		//  Measured:  `364`
127
8
		//  Estimated: `6304`
128
8
		// Minimum execution time: 20_402_000 picoseconds.
129
8
		Weight::from_parts(21_000_000, 6304)
130
8
			.saturating_add(T::DbWeight::get().reads(2_u64))
131
8
			.saturating_add(T::DbWeight::get().writes(2_u64))
132
8
	}
133
	/// Storage: `CrowdloanRewards::UnassociatedContributions` (r:1 w:1)
134
	/// Proof: `CrowdloanRewards::UnassociatedContributions` (`max_values`: None, `max_size`: None, mode: `Measured`)
135
	/// Storage: `CrowdloanRewards::ClaimedRelayChainIds` (r:1 w:1)
136
	/// Proof: `CrowdloanRewards::ClaimedRelayChainIds` (`max_values`: None, `max_size`: None, mode: `Measured`)
137
	/// Storage: `CrowdloanRewards::AccountsPayable` (r:1 w:1)
138
	/// Proof: `CrowdloanRewards::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`)
139
	/// Storage: `System::Account` (r:2 w:2)
140
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
141
	fn associate_native_identity() -> Weight {
142
		// Proof Size summary in bytes:
143
		//  Measured:  `736`
144
		//  Estimated: `6172`
145
		// Minimum execution time: 111_815_000 picoseconds.
146
		Weight::from_parts(114_537_000, 6172)
147
			.saturating_add(T::DbWeight::get().reads(5_u64))
148
			.saturating_add(T::DbWeight::get().writes(5_u64))
149
	}
150
	/// Storage: `CrowdloanRewards::AccountsPayable` (r:2 w:2)
151
	/// Proof: `CrowdloanRewards::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`)
152
	/// The range of component `x` is `[1, 500]`.
153
	fn change_association_with_relay_keys(x: u32, ) -> Weight {
154
		// Proof Size summary in bytes:
155
		//  Measured:  `333 + x * (32 ±0)`
156
		//  Estimated: `6273 + x * (32 ±0)`
157
		// Minimum execution time: 60_981_000 picoseconds.
158
		Weight::from_parts(61_818_000, 6273)
159
			// Standard Error: 8_721
160
			.saturating_add(Weight::from_parts(38_286_042, 0).saturating_mul(x.into()))
161
			.saturating_add(T::DbWeight::get().reads(2_u64))
162
			.saturating_add(T::DbWeight::get().writes(2_u64))
163
			.saturating_add(Weight::from_parts(0, 32).saturating_mul(x.into()))
164
	}
165
}