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 42.0.0
20
//! DATE: 2024-10-10, 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: Some("moonbase-dev"), DB CACHE: 1024
24

            
25
// Executed Command:
26
// ./target/production/moonbeam
27
// benchmark
28
// pallet
29
// --chain=moonbase-dev
30
// --steps=50
31
// --repeat=20
32
// --pallet=pallet_crowdloan_rewards
33
// --extrinsic=*
34
// --wasm-execution=compiled
35
// --header=./file_header.txt
36
// --template=./benchmarking/frame-weight-template.hbs
37
// --output=./runtime/common/src/weights/
38

            
39
#![cfg_attr(rustfmt, rustfmt_skip)]
40
#![allow(unused_parens)]
41
#![allow(unused_imports)]
42

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

            
46
/// Weights for `pallet_crowdloan_rewards`.
47
pub struct WeightInfo<T>(PhantomData<T>);
48
impl<T: frame_system::Config> pallet_crowdloan_rewards::WeightInfo for WeightInfo<T> {
49
	/// Storage: `CrowdloanRewards::Initialized` (r:1 w:0)
50
	/// Proof: `CrowdloanRewards::Initialized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
51
	/// Storage: `CrowdloanRewards::InitializedRewardAmount` (r:1 w:1)
52
	/// Proof: `CrowdloanRewards::InitializedRewardAmount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
53
	/// Storage: `CrowdloanRewards::TotalContributors` (r:1 w:1)
54
	/// Proof: `CrowdloanRewards::TotalContributors` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
55
	/// Storage: `System::Account` (r:501 w:501)
56
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
57
	/// Storage: `CrowdloanRewards::ClaimedRelayChainIds` (r:500 w:500)
58
	/// Proof: `CrowdloanRewards::ClaimedRelayChainIds` (`max_values`: None, `max_size`: None, mode: `Measured`)
59
	/// Storage: `CrowdloanRewards::UnassociatedContributions` (r:500 w:0)
60
	/// Proof: `CrowdloanRewards::UnassociatedContributions` (`max_values`: None, `max_size`: None, mode: `Measured`)
61
	/// Storage: `CrowdloanRewards::AccountsPayable` (r:500 w:500)
62
	/// Proof: `CrowdloanRewards::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`)
63
	/// The range of component `x` is `[1, 500]`.
64
286
	fn initialize_reward_vec(x: u32, ) -> Weight {
65
286
		// Proof Size summary in bytes:
66
286
		//  Measured:  `76347 + x * (550 ±0)`
67
286
		//  Estimated: `66242 + x * (3052 ±0)`
68
286
		// Minimum execution time: 122_807_000 picoseconds.
69
286
		Weight::from_parts(70_793_034, 66242)
70
286
			// Standard Error: 22_979
71
286
			.saturating_add(Weight::from_parts(55_263_553, 0).saturating_mul(x.into()))
72
286
			.saturating_add(T::DbWeight::get().reads(4_u64))
73
286
			.saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(x.into())))
74
286
			.saturating_add(T::DbWeight::get().writes(3_u64))
75
286
			.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(x.into())))
76
286
			.saturating_add(Weight::from_parts(0, 3052).saturating_mul(x.into()))
77
286
	}
78
	/// Storage: `CrowdloanRewards::Initialized` (r:1 w:1)
79
	/// Proof: `CrowdloanRewards::Initialized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
80
	/// Storage: `CrowdloanRewards::InitRelayBlock` (r:1 w:0)
81
	/// Proof: `CrowdloanRewards::InitRelayBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
82
	/// Storage: `CrowdloanRewards::InitializedRewardAmount` (r:1 w:0)
83
	/// Proof: `CrowdloanRewards::InitializedRewardAmount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
84
	/// Storage: `System::Account` (r:1 w:0)
85
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
86
	/// Storage: `CrowdloanRewards::TotalContributors` (r:1 w:0)
87
	/// Proof: `CrowdloanRewards::TotalContributors` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
88
	/// Storage: `CrowdloanRewards::EndRelayBlock` (r:0 w:1)
89
	/// Proof: `CrowdloanRewards::EndRelayBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
90
132
	fn complete_initialization() -> Weight {
91
132
		// Proof Size summary in bytes:
92
132
		//  Measured:  `579`
93
132
		//  Estimated: `3581`
94
132
		// Minimum execution time: 14_816_000 picoseconds.
95
132
		Weight::from_parts(15_028_000, 3581)
96
132
			.saturating_add(T::DbWeight::get().reads(5_u64))
97
132
			.saturating_add(T::DbWeight::get().writes(2_u64))
98
132
	}
99
	/// Storage: `CrowdloanRewards::Initialized` (r:1 w:0)
100
	/// Proof: `CrowdloanRewards::Initialized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
101
	/// Storage: `CrowdloanRewards::AccountsPayable` (r:1 w:1)
102
	/// Proof: `CrowdloanRewards::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`)
103
	/// Storage: `ParachainSystem::ValidationData` (r:1 w:0)
104
	/// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
105
	/// Storage: `CrowdloanRewards::InitRelayBlock` (r:1 w:0)
106
	/// Proof: `CrowdloanRewards::InitRelayBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
107
	/// Storage: `CrowdloanRewards::EndRelayBlock` (r:1 w:0)
108
	/// Proof: `CrowdloanRewards::EndRelayBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
109
	/// Storage: `System::Account` (r:2 w:2)
110
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
111
22
	fn claim() -> Weight {
112
22
		// Proof Size summary in bytes:
113
22
		//  Measured:  `1100`
114
22
		//  Estimated: `6172`
115
22
		// Minimum execution time: 60_529_000 picoseconds.
116
22
		Weight::from_parts(62_925_000, 6172)
117
22
			.saturating_add(T::DbWeight::get().reads(7_u64))
118
22
			.saturating_add(T::DbWeight::get().writes(3_u64))
119
22
	}
120
	/// Storage: `CrowdloanRewards::AccountsPayable` (r:2 w:2)
121
	/// Proof: `CrowdloanRewards::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`)
122
22
	fn update_reward_address() -> Weight {
123
22
		// Proof Size summary in bytes:
124
22
		//  Measured:  `397`
125
22
		//  Estimated: `6337`
126
22
		// Minimum execution time: 17_361_000 picoseconds.
127
22
		Weight::from_parts(17_712_000, 6337)
128
22
			.saturating_add(T::DbWeight::get().reads(2_u64))
129
22
			.saturating_add(T::DbWeight::get().writes(2_u64))
130
22
	}
131
	/// Storage: `CrowdloanRewards::UnassociatedContributions` (r:1 w:1)
132
	/// Proof: `CrowdloanRewards::UnassociatedContributions` (`max_values`: None, `max_size`: None, mode: `Measured`)
133
	/// Storage: `CrowdloanRewards::ClaimedRelayChainIds` (r:1 w:1)
134
	/// Proof: `CrowdloanRewards::ClaimedRelayChainIds` (`max_values`: None, `max_size`: None, mode: `Measured`)
135
	/// Storage: `CrowdloanRewards::AccountsPayable` (r:1 w:1)
136
	/// Proof: `CrowdloanRewards::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`)
137
	/// Storage: `System::Account` (r:2 w:2)
138
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
139
	fn associate_native_identity() -> Weight {
140
		// Proof Size summary in bytes:
141
		//  Measured:  `934`
142
		//  Estimated: `6172`
143
		// Minimum execution time: 104_523_000 picoseconds.
144
		Weight::from_parts(106_767_000, 6172)
145
			.saturating_add(T::DbWeight::get().reads(5_u64))
146
			.saturating_add(T::DbWeight::get().writes(5_u64))
147
	}
148
	/// Storage: `CrowdloanRewards::AccountsPayable` (r:2 w:2)
149
	/// Proof: `CrowdloanRewards::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`)
150
	/// The range of component `x` is `[1, 500]`.
151
	fn change_association_with_relay_keys(x: u32, ) -> Weight {
152
		// Proof Size summary in bytes:
153
		//  Measured:  `366 + x * (32 ±0)`
154
		//  Estimated: `6306 + x * (32 ±0)`
155
		// Minimum execution time: 58_152_000 picoseconds.
156
		Weight::from_parts(58_883_000, 6306)
157
			// Standard Error: 9_080
158
			.saturating_add(Weight::from_parts(39_012_944, 0).saturating_mul(x.into()))
159
			.saturating_add(T::DbWeight::get().reads(2_u64))
160
			.saturating_add(T::DbWeight::get().writes(2_u64))
161
			.saturating_add(Weight::from_parts(0, 32).saturating_mul(x.into()))
162
	}
163
}