// This file is part of CORD – https://cord.network

// Copyright (C) Dhiway Networks Pvt. Ltd.
// SPDX-License-Identifier: GPL-3.0-or-later

// CORD is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// CORD is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with CORD. If not, see <https://www.gnu.org/licenses/>.

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::Weight};
use sp_std::marker::PhantomData;

/// Weight functions for `pallet_proxy`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
	/// Storage: Proxy Proxies (r:1 w:0)
	/// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen)
	/// The range of component `p` is `[1, 31]`.
	fn proxy(p: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `227 + p * (37 ±0)`
		//  Estimated: `4706`
		// Minimum execution time: 15_240_000 picoseconds.
		Weight::from_parts(16_156_554, 0)
			.saturating_add(Weight::from_parts(0, 4706))
			// Standard Error: 1_183
			.saturating_add(Weight::from_parts(31_488, 0).saturating_mul(p.into()))
			.saturating_add(T::DbWeight::get().reads(1))
	}
	/// Storage: Proxy Proxies (r:1 w:0)
	/// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen)
	/// Storage: Proxy Announcements (r:1 w:1)
	/// Proof: Proxy Announcements (max_values: None, max_size: Some(2233), added: 4708, mode: MaxEncodedLen)
	/// Storage: System Account (r:1 w:1)
	/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
	/// The range of component `a` is `[0, 31]`.
	/// The range of component `p` is `[1, 31]`.
	fn proxy_announced(a: u32, p: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `554 + a * (68 ±0) + p * (37 ±0)`
		//  Estimated: `13997`
		// Minimum execution time: 33_768_000 picoseconds.
		Weight::from_parts(34_423_100, 0)
			.saturating_add(Weight::from_parts(0, 13997))
			// Standard Error: 1_930
			.saturating_add(Weight::from_parts(146_962, 0).saturating_mul(a.into()))
			// Standard Error: 1_994
			.saturating_add(Weight::from_parts(30_433, 0).saturating_mul(p.into()))
			.saturating_add(T::DbWeight::get().reads(3))
			.saturating_add(T::DbWeight::get().writes(2))
	}
	/// Storage: Proxy Announcements (r:1 w:1)
	/// Proof: Proxy Announcements (max_values: None, max_size: Some(2233), added: 4708, mode: MaxEncodedLen)
	/// Storage: System Account (r:1 w:1)
	/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
	/// The range of component `a` is `[0, 31]`.
	/// The range of component `p` is `[1, 31]`.
	fn remove_announcement(a: u32, _p: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `469 + a * (68 ±0)`
		//  Estimated: `9291`
		// Minimum execution time: 21_123_000 picoseconds.
		Weight::from_parts(22_386_093, 0)
			.saturating_add(Weight::from_parts(0, 9291))
			// Standard Error: 1_359
			.saturating_add(Weight::from_parts(145_403, 0).saturating_mul(a.into()))
			.saturating_add(T::DbWeight::get().reads(2))
			.saturating_add(T::DbWeight::get().writes(2))
	}
	/// Storage: Proxy Announcements (r:1 w:1)
	/// Proof: Proxy Announcements (max_values: None, max_size: Some(2233), added: 4708, mode: MaxEncodedLen)
	/// Storage: System Account (r:1 w:1)
	/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
	/// The range of component `a` is `[0, 31]`.
	/// The range of component `p` is `[1, 31]`.
	fn reject_announcement(a: u32, _p: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `469 + a * (68 ±0)`
		//  Estimated: `9291`
		// Minimum execution time: 21_494_000 picoseconds.
		Weight::from_parts(22_643_298, 0)
			.saturating_add(Weight::from_parts(0, 9291))
			// Standard Error: 1_356
			.saturating_add(Weight::from_parts(139_061, 0).saturating_mul(a.into()))
			.saturating_add(T::DbWeight::get().reads(2))
			.saturating_add(T::DbWeight::get().writes(2))
	}
	/// Storage: Proxy Proxies (r:1 w:0)
	/// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen)
	/// Storage: Proxy Announcements (r:1 w:1)
	/// Proof: Proxy Announcements (max_values: None, max_size: Some(2233), added: 4708, mode: MaxEncodedLen)
	/// Storage: System Account (r:1 w:1)
	/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
	/// The range of component `a` is `[0, 31]`.
	/// The range of component `p` is `[1, 31]`.
	fn announce(a: u32, p: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `486 + a * (68 ±0) + p * (37 ±0)`
		//  Estimated: `13997`
		// Minimum execution time: 29_471_000 picoseconds.
		Weight::from_parts(31_139_616, 0)
			.saturating_add(Weight::from_parts(0, 13997))
			// Standard Error: 2_327
			.saturating_add(Weight::from_parts(134_479, 0).saturating_mul(a.into()))
			// Standard Error: 2_404
			.saturating_add(Weight::from_parts(27_990, 0).saturating_mul(p.into()))
			.saturating_add(T::DbWeight::get().reads(3))
			.saturating_add(T::DbWeight::get().writes(2))
	}
	/// Storage: Proxy Proxies (r:1 w:1)
	/// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen)
	/// The range of component `p` is `[1, 31]`.
	fn add_proxy(p: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `227 + p * (37 ±0)`
		//  Estimated: `4706`
		// Minimum execution time: 22_663_000 picoseconds.
		Weight::from_parts(23_437_086, 0)
			.saturating_add(Weight::from_parts(0, 4706))
			// Standard Error: 1_534
			.saturating_add(Weight::from_parts(51_713, 0).saturating_mul(p.into()))
			.saturating_add(T::DbWeight::get().reads(1))
			.saturating_add(T::DbWeight::get().writes(1))
	}
	/// Storage: Proxy Proxies (r:1 w:1)
	/// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen)
	/// The range of component `p` is `[1, 31]`.
	fn remove_proxy(p: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `227 + p * (37 ±0)`
		//  Estimated: `4706`
		// Minimum execution time: 22_175_000 picoseconds.
		Weight::from_parts(23_236_442, 0)
			.saturating_add(Weight::from_parts(0, 4706))
			// Standard Error: 1_888
			.saturating_add(Weight::from_parts(63_413, 0).saturating_mul(p.into()))
			.saturating_add(T::DbWeight::get().reads(1))
			.saturating_add(T::DbWeight::get().writes(1))
	}
	/// Storage: Proxy Proxies (r:1 w:1)
	/// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen)
	/// The range of component `p` is `[1, 31]`.
	fn remove_proxies(p: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `227 + p * (37 ±0)`
		//  Estimated: `4706`
		// Minimum execution time: 17_652_000 picoseconds.
		Weight::from_parts(18_389_443, 0)
			.saturating_add(Weight::from_parts(0, 4706))
			// Standard Error: 1_218
			.saturating_add(Weight::from_parts(34_491, 0).saturating_mul(p.into()))
			.saturating_add(T::DbWeight::get().reads(1))
			.saturating_add(T::DbWeight::get().writes(1))
	}
	/// Storage: Proxy Proxies (r:1 w:1)
	/// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen)
	/// The range of component `p` is `[1, 31]`.
	fn create_pure(_p: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `239`
		//  Estimated: `4706`
		// Minimum execution time: 24_392_000 picoseconds.
		Weight::from_parts(25_664_761, 0)
			.saturating_add(Weight::from_parts(0, 4706))
			.saturating_add(T::DbWeight::get().reads(1))
			.saturating_add(T::DbWeight::get().writes(1))
	}
	/// Storage: Proxy Proxies (r:1 w:1)
	/// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen)
	/// The range of component `p` is `[0, 30]`.
	fn kill_pure(p: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `264 + p * (37 ±0)`
		//  Estimated: `4706`
		// Minimum execution time: 18_839_000 picoseconds.
		Weight::from_parts(19_781_900, 0)
			.saturating_add(Weight::from_parts(0, 4706))
			// Standard Error: 1_148
			.saturating_add(Weight::from_parts(26_532, 0).saturating_mul(p.into()))
			.saturating_add(T::DbWeight::get().reads(1))
			.saturating_add(T::DbWeight::get().writes(1))
	}
}