pallet_crowdloan_rewards/
weights.rs1#![allow(unused_parens)]
44#![allow(unused_imports)]
45
46use frame_support::{
47 traits::Get,
48 weights::{constants::RocksDbWeight, Weight},
49};
50use sp_std::marker::PhantomData;
51
52pub trait WeightInfo {
54 fn claim() -> Weight;
55 fn update_reward_address() -> Weight;
56 fn associate_native_identity() -> Weight;
57 fn change_association_with_relay_keys(x: u32) -> Weight;
58}
59
60pub struct SubstrateWeight<T>(PhantomData<T>);
62impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
63 fn claim() -> Weight {
64 Weight::from_all(101_484_000)
65 .saturating_add(T::DbWeight::get().reads(11))
66 .saturating_add(T::DbWeight::get().writes(5))
67 }
68 fn update_reward_address() -> Weight {
69 Weight::from_all(59_051_000)
70 .saturating_add(T::DbWeight::get().reads(6))
71 .saturating_add(T::DbWeight::get().writes(4))
72 }
73 fn associate_native_identity() -> Weight {
74 Weight::from_all(152_997_000)
75 .saturating_add(T::DbWeight::get().reads(9))
76 .saturating_add(T::DbWeight::get().writes(7))
77 }
78 fn change_association_with_relay_keys(x: u32) -> Weight {
79 Weight::from_all(0)
80 .saturating_add(Weight::from_all(47_373_000_u64.saturating_mul(x as u64)))
82 .saturating_add(T::DbWeight::get().reads(6))
83 .saturating_add(T::DbWeight::get().writes(4))
84 }
85}
86
87impl WeightInfo for () {
89 fn claim() -> Weight {
90 Weight::from_all(101_484_000)
91 .saturating_add(RocksDbWeight::get().reads(11))
92 .saturating_add(RocksDbWeight::get().writes(5))
93 }
94 fn update_reward_address() -> Weight {
95 Weight::from_all(59_051_000)
96 .saturating_add(RocksDbWeight::get().reads(6))
97 .saturating_add(RocksDbWeight::get().writes(4))
98 }
99 fn associate_native_identity() -> Weight {
100 Weight::from_all(152_997_000)
101 .saturating_add(RocksDbWeight::get().reads(9))
102 .saturating_add(RocksDbWeight::get().writes(7))
103 }
104 fn change_association_with_relay_keys(x: u32) -> Weight {
105 Weight::from_all(0)
106 .saturating_add(Weight::from_all(47_373_000_u64.saturating_mul(x as u64)))
108 .saturating_add(RocksDbWeight::get().reads(6))
109 .saturating_add(RocksDbWeight::get().writes(4))
110 }
111}