// Template adopted from https://github.com/paritytech/substrate/blob/master/.maintain/frame-weight-template.hbs

//! Autogenerated weights for pallet_fungible
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 29.0.0
//! DATE: 2023-11-29, STEPS: `50`, REPEAT: `80`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bench-host`, CPU: `Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz`
//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024

// Executed Command:
// ./target/production/unique-collator
// benchmark
// pallet
// --pallet
// pallet-fungible
// --wasm-execution
// compiled
// --extrinsic
// *
// --template=.maintain/frame-weight-template.hbs
// --steps=50
// --repeat=80
// --heap-pages=4096
// --output=./pallets/fungible/src/weights.rs

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

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

/// Weight functions needed for pallet_fungible.
pub trait WeightInfo {
	fn create_item() -> Weight;
	fn create_multiple_items_ex(b: u32, ) -> Weight;
	fn burn_item() -> Weight;
	fn transfer_raw() -> Weight;
	fn approve() -> Weight;
	fn approve_from() -> Weight;
	fn check_allowed_raw() -> Weight;
	fn set_allowance_unchecked_raw() -> Weight;
	fn burn_from() -> Weight;
}

/// Weights for pallet_fungible using the Substrate node and recommended hardware.
pub struct SubstrateWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
	/// Storage: `Fungible::TotalSupply` (r:1 w:1)
	/// Proof: `Fungible::TotalSupply` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
	/// Storage: `Fungible::Balance` (r:1 w:1)
	/// Proof: `Fungible::Balance` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)
	fn create_item() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `42`
		//  Estimated: `3542`
		// Minimum execution time: 14_718_000 picoseconds.
		Weight::from_parts(15_060_000, 3542)
			.saturating_add(T::DbWeight::get().reads(2_u64))
			.saturating_add(T::DbWeight::get().writes(2_u64))
	}
	/// Storage: `Fungible::TotalSupply` (r:1 w:1)
	/// Proof: `Fungible::TotalSupply` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
	/// Storage: `Fungible::Balance` (r:120 w:120)
	/// Proof: `Fungible::Balance` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)
	/// The range of component `b` is `[0, 120]`.
	fn create_multiple_items_ex(b: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `42`
		//  Estimated: `3493 + b * (2552 ±0)`
		// Minimum execution time: 4_394_000 picoseconds.
		Weight::from_parts(9_904_314, 3493)
			// Standard Error: 1_598
			.saturating_add(Weight::from_parts(6_616_725, 0).saturating_mul(b.into()))
			.saturating_add(T::DbWeight::get().reads(1_u64))
			.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(b.into())))
			.saturating_add(T::DbWeight::get().writes(1_u64))
			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(b.into())))
			.saturating_add(Weight::from_parts(0, 2552).saturating_mul(b.into()))
	}
	/// Storage: `Fungible::TotalSupply` (r:1 w:1)
	/// Proof: `Fungible::TotalSupply` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
	/// Storage: `Fungible::Balance` (r:1 w:1)
	/// Proof: `Fungible::Balance` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)
	fn burn_item() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `197`
		//  Estimated: `3542`
		// Minimum execution time: 16_034_000 picoseconds.
		Weight::from_parts(16_450_000, 3542)
			.saturating_add(T::DbWeight::get().reads(2_u64))
			.saturating_add(T::DbWeight::get().writes(2_u64))
	}
	/// Storage: `Fungible::Balance` (r:2 w:2)
	/// Proof: `Fungible::Balance` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)
	fn transfer_raw() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `182`
		//  Estimated: `6094`
		// Minimum execution time: 18_434_000 picoseconds.
		Weight::from_parts(18_815_000, 6094)
			.saturating_add(T::DbWeight::get().reads(2_u64))
			.saturating_add(T::DbWeight::get().writes(2_u64))
	}
	/// Storage: `Fungible::Balance` (r:1 w:0)
	/// Proof: `Fungible::Balance` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)
	/// Storage: `Fungible::Allowance` (r:0 w:1)
	/// Proof: `Fungible::Allowance` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`)
	fn approve() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `182`
		//  Estimated: `3542`
		// Minimum execution time: 14_722_000 picoseconds.
		Weight::from_parts(15_009_000, 3542)
			.saturating_add(T::DbWeight::get().reads(1_u64))
			.saturating_add(T::DbWeight::get().writes(1_u64))
	}
	/// Storage: `Fungible::Balance` (r:1 w:0)
	/// Proof: `Fungible::Balance` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)
	/// Storage: `Fungible::Allowance` (r:0 w:1)
	/// Proof: `Fungible::Allowance` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`)
	fn approve_from() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `170`
		//  Estimated: `3542`
		// Minimum execution time: 14_981_000 picoseconds.
		Weight::from_parts(15_376_000, 3542)
			.saturating_add(T::DbWeight::get().reads(1_u64))
			.saturating_add(T::DbWeight::get().writes(1_u64))
	}
	/// Storage: `Fungible::Allowance` (r:1 w:0)
	/// Proof: `Fungible::Allowance` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`)
	fn check_allowed_raw() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `210`
		//  Estimated: `3558`
		// Minimum execution time: 6_799_000 picoseconds.
		Weight::from_parts(7_061_000, 3558)
			.saturating_add(T::DbWeight::get().reads(1_u64))
	}
	/// Storage: `Fungible::Allowance` (r:0 w:1)
	/// Proof: `Fungible::Allowance` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`)
	fn set_allowance_unchecked_raw() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `0`
		//  Estimated: `0`
		// Minimum execution time: 8_495_000 picoseconds.
		Weight::from_parts(8_790_000, 0)
			.saturating_add(T::DbWeight::get().writes(1_u64))
	}
	/// Storage: `Fungible::Allowance` (r:1 w:1)
	/// Proof: `Fungible::Allowance` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`)
	/// Storage: `Fungible::TotalSupply` (r:1 w:1)
	/// Proof: `Fungible::TotalSupply` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
	/// Storage: `Fungible::Balance` (r:1 w:1)
	/// Proof: `Fungible::Balance` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)
	fn burn_from() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `315`
		//  Estimated: `3558`
		// Minimum execution time: 27_302_000 picoseconds.
		Weight::from_parts(27_833_000, 3558)
			.saturating_add(T::DbWeight::get().reads(3_u64))
			.saturating_add(T::DbWeight::get().writes(3_u64))
	}
}

// For backwards compatibility and tests
impl WeightInfo for () {
	/// Storage: `Fungible::TotalSupply` (r:1 w:1)
	/// Proof: `Fungible::TotalSupply` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
	/// Storage: `Fungible::Balance` (r:1 w:1)
	/// Proof: `Fungible::Balance` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)
	fn create_item() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `42`
		//  Estimated: `3542`
		// Minimum execution time: 14_718_000 picoseconds.
		Weight::from_parts(15_060_000, 3542)
			.saturating_add(RocksDbWeight::get().reads(2_u64))
			.saturating_add(RocksDbWeight::get().writes(2_u64))
	}
	/// Storage: `Fungible::TotalSupply` (r:1 w:1)
	/// Proof: `Fungible::TotalSupply` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
	/// Storage: `Fungible::Balance` (r:120 w:120)
	/// Proof: `Fungible::Balance` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)
	/// The range of component `b` is `[0, 120]`.
	fn create_multiple_items_ex(b: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `42`
		//  Estimated: `3493 + b * (2552 ±0)`
		// Minimum execution time: 4_394_000 picoseconds.
		Weight::from_parts(9_904_314, 3493)
			// Standard Error: 1_598
			.saturating_add(Weight::from_parts(6_616_725, 0).saturating_mul(b.into()))
			.saturating_add(RocksDbWeight::get().reads(1_u64))
			.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(b.into())))
			.saturating_add(RocksDbWeight::get().writes(1_u64))
			.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(b.into())))
			.saturating_add(Weight::from_parts(0, 2552).saturating_mul(b.into()))
	}
	/// Storage: `Fungible::TotalSupply` (r:1 w:1)
	/// Proof: `Fungible::TotalSupply` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
	/// Storage: `Fungible::Balance` (r:1 w:1)
	/// Proof: `Fungible::Balance` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)
	fn burn_item() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `197`
		//  Estimated: `3542`
		// Minimum execution time: 16_034_000 picoseconds.
		Weight::from_parts(16_450_000, 3542)
			.saturating_add(RocksDbWeight::get().reads(2_u64))
			.saturating_add(RocksDbWeight::get().writes(2_u64))
	}
	/// Storage: `Fungible::Balance` (r:2 w:2)
	/// Proof: `Fungible::Balance` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)
	fn transfer_raw() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `182`
		//  Estimated: `6094`
		// Minimum execution time: 18_434_000 picoseconds.
		Weight::from_parts(18_815_000, 6094)
			.saturating_add(RocksDbWeight::get().reads(2_u64))
			.saturating_add(RocksDbWeight::get().writes(2_u64))
	}
	/// Storage: `Fungible::Balance` (r:1 w:0)
	/// Proof: `Fungible::Balance` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)
	/// Storage: `Fungible::Allowance` (r:0 w:1)
	/// Proof: `Fungible::Allowance` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`)
	fn approve() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `182`
		//  Estimated: `3542`
		// Minimum execution time: 14_722_000 picoseconds.
		Weight::from_parts(15_009_000, 3542)
			.saturating_add(RocksDbWeight::get().reads(1_u64))
			.saturating_add(RocksDbWeight::get().writes(1_u64))
	}
	/// Storage: `Fungible::Balance` (r:1 w:0)
	/// Proof: `Fungible::Balance` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)
	/// Storage: `Fungible::Allowance` (r:0 w:1)
	/// Proof: `Fungible::Allowance` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`)
	fn approve_from() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `170`
		//  Estimated: `3542`
		// Minimum execution time: 14_981_000 picoseconds.
		Weight::from_parts(15_376_000, 3542)
			.saturating_add(RocksDbWeight::get().reads(1_u64))
			.saturating_add(RocksDbWeight::get().writes(1_u64))
	}
	/// Storage: `Fungible::Allowance` (r:1 w:0)
	/// Proof: `Fungible::Allowance` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`)
	fn check_allowed_raw() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `210`
		//  Estimated: `3558`
		// Minimum execution time: 6_799_000 picoseconds.
		Weight::from_parts(7_061_000, 3558)
			.saturating_add(RocksDbWeight::get().reads(1_u64))
	}
	/// Storage: `Fungible::Allowance` (r:0 w:1)
	/// Proof: `Fungible::Allowance` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`)
	fn set_allowance_unchecked_raw() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `0`
		//  Estimated: `0`
		// Minimum execution time: 8_495_000 picoseconds.
		Weight::from_parts(8_790_000, 0)
			.saturating_add(RocksDbWeight::get().writes(1_u64))
	}
	/// Storage: `Fungible::Allowance` (r:1 w:1)
	/// Proof: `Fungible::Allowance` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`)
	/// Storage: `Fungible::TotalSupply` (r:1 w:1)
	/// Proof: `Fungible::TotalSupply` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
	/// Storage: `Fungible::Balance` (r:1 w:1)
	/// Proof: `Fungible::Balance` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)
	fn burn_from() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `315`
		//  Estimated: `3558`
		// Minimum execution time: 27_302_000 picoseconds.
		Weight::from_parts(27_833_000, 3558)
			.saturating_add(RocksDbWeight::get().reads(3_u64))
			.saturating_add(RocksDbWeight::get().writes(3_u64))
	}
}

