pallet-xp 0.1.2

A FRAME pallet for programmable XP (Experience Points) and reputation systems.
Documentation

//! Autogenerated weights for `pallet_xp`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2026-05-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`,
//! HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `Naveens-MacBook-Air.local`, CPU: `<UNKNOWN>`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024`

// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --runtime
// target/release/wbuild/frame-suite-runtime/frame_suite_runtime.wasm
// --pallet
// pallet_xp
// --extrinsic
// *
// --template
// pallets/.maintain/frame-weight-template.hbs
// --output
// pallets/xp/src/weights.rs

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

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

/// Weight functions needed for `pallet_xp`.
pub trait WeightInfo {
fn handover() -> Weight;
fn dispose() -> Weight;
fn force_handover() -> Weight;
fn force_update_min_time_stamp() -> Weight;
fn call() -> Weight;
fn force_update_init_xp() -> Weight;
fn force_update_min_pulse() -> Weight;
fn force_update_pulse_factor() -> Weight;
fn inspect_xp_keys_of() -> Weight;
fn inspect_my_xp() -> Weight;
}

/// Weights for `pallet_xp` using the Substrate node and recommended hardware.
pub struct SubstrateWeight<T>(PhantomData<T>);
                impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
                        /// Storage: `Xp::XpOf` (r:1 w:0)
                        /// Proof: `Xp::XpOf` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`)
                        /// Storage: `Xp::XpOwners` (r:1 w:2)
                        /// Proof: `Xp::XpOwners` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
                        fn handover() -> Weight {
                        // Proof Size summary in bytes:
                        // Measured: `2253`
                        // Estimated: `3573`
                        // Minimum execution time: 28_000_000 picoseconds.
                        Weight::from_parts(32_000_000,
                        3573)
                        .saturating_add(T::DbWeight::get().reads(2_u64))
                        .saturating_add(T::DbWeight::get().writes(2_u64))
                        }
                        /// Storage: `Xp::XpOf` (r:1 w:1)
                        /// Proof: `Xp::XpOf` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`)
                        /// Storage: `Xp::XpOwners` (r:1 w:0)
                        /// Proof: `Xp::XpOwners` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
                        /// Storage: `Xp::ReapedXp` (r:1 w:1)
                        /// Proof: `Xp::ReapedXp` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
                        /// Storage: `Xp::MinTimeStamp` (r:1 w:0)
                        /// Proof: `Xp::MinTimeStamp` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
                        /// Storage: `Xp::LockedXpOf` (r:1 w:0)
                        /// Proof: `Xp::LockedXpOf` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`)
                        /// Storage: `Xp::ReservedXpOf` (r:0 w:1)
                        /// Proof: `Xp::ReservedXpOf` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
                        fn dispose() -> Weight {
                        // Proof Size summary in bytes:
                        // Measured: `2520`
                        // Estimated: `3573`
                        // Minimum execution time: 40_000_000 picoseconds.
                        Weight::from_parts(44_000_000,
                        3573)
                        .saturating_add(T::DbWeight::get().reads(5_u64))
                        .saturating_add(T::DbWeight::get().writes(3_u64))
                        }
                        /// Storage: `Xp::XpOf` (r:1 w:0)
                        /// Proof: `Xp::XpOf` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`)
                        /// Storage: `Xp::XpOwners` (r:1 w:2)
                        /// Proof: `Xp::XpOwners` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
                        fn force_handover() -> Weight {
                        // Proof Size summary in bytes:
                        // Measured: `2424`
                        // Estimated: `3573`
                        // Minimum execution time: 33_000_000 picoseconds.
                        Weight::from_parts(36_000_000,
                        3573)
                        .saturating_add(T::DbWeight::get().reads(2_u64))
                        .saturating_add(T::DbWeight::get().writes(2_u64))
                        }
                        /// Storage: `Xp::MinTimeStamp` (r:0 w:1)
                        /// Proof: `Xp::MinTimeStamp` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
                        fn force_update_min_time_stamp() -> Weight {
                        // Proof Size summary in bytes:
                        // Measured: `0`
                        // Estimated: `0`
                        // Minimum execution time: 5_000_000 picoseconds.
                        Weight::from_parts(6_000_000,
                        0)
                        .saturating_add(T::DbWeight::get().writes(1_u64))
                        }
                        /// Storage: `Xp::XpOwners` (r:1 w:0)
                        /// Proof: `Xp::XpOwners` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
                        fn call() -> Weight {
                        // Proof Size summary in bytes:
                        // Measured: `1178`
                        // Estimated: `3561`
                        // Minimum execution time: 17_000_000 picoseconds.
                        Weight::from_parts(19_000_000,
                        3561)
                        .saturating_add(T::DbWeight::get().reads(1_u64))
                        }
                        /// Storage: `Xp::InitXp` (r:0 w:1)
                        /// Proof: `Xp::InitXp` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
                        fn force_update_init_xp() -> Weight {
                        // Proof Size summary in bytes:
                        // Measured: `0`
                        // Estimated: `0`
                        // Minimum execution time: 5_000_000 picoseconds.
                        Weight::from_parts(6_000_000,
                        0)
                        .saturating_add(T::DbWeight::get().writes(1_u64))
                        }
                        /// Storage: `Xp::MinPulse` (r:0 w:1)
                        /// Proof: `Xp::MinPulse` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
                        fn force_update_min_pulse() -> Weight {
                        // Proof Size summary in bytes:
                        // Measured: `0`
                        // Estimated: `0`
                        // Minimum execution time: 5_000_000 picoseconds.
                        Weight::from_parts(6_000_000,
                        0)
                        .saturating_add(T::DbWeight::get().writes(1_u64))
                        }
                        /// Storage: `Xp::PulseFactor` (r:0 w:1)
                        /// Proof: `Xp::PulseFactor` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
                        fn force_update_pulse_factor() -> Weight {
                        // Proof Size summary in bytes:
                        // Measured: `0`
                        // Estimated: `0`
                        // Minimum execution time: 5_000_000 picoseconds.
                        Weight::from_parts(6_000_000,
                        0)
                        .saturating_add(T::DbWeight::get().writes(1_u64))
                        }
                        /// Storage: `Xp::XpOwners` (r:3 w:0)
                        /// Proof: `Xp::XpOwners` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
                        fn inspect_xp_keys_of() -> Weight {
                        // Proof Size summary in bytes:
                        // Measured: `1440`
                        // Estimated: `8703`
                        // Minimum execution time: 25_000_000 picoseconds.
                        Weight::from_parts(27_000_000,
                        8703)
                        .saturating_add(T::DbWeight::get().reads(3_u64))
                        }
                        /// Storage: `Xp::XpOf` (r:1 w:0)
                        /// Proof: `Xp::XpOf` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`)
                        /// Storage: `Xp::XpOwners` (r:1 w:0)
                        /// Proof: `Xp::XpOwners` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
                        fn inspect_my_xp() -> Weight {
                        // Proof Size summary in bytes:
                        // Measured: `2250`
                        // Estimated: `3573`
                        // Minimum execution time: 30_000_000 picoseconds.
                        Weight::from_parts(34_000_000,
                        3573)
                        .saturating_add(T::DbWeight::get().reads(2_u64))
                        }
                        }

                        // For backwards compatibility and tests.
                        impl WeightInfo for () {
                        /// Storage: `Xp::XpOf` (r:1 w:0)
                        /// Proof: `Xp::XpOf` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`)
                        /// Storage: `Xp::XpOwners` (r:1 w:2)
                        /// Proof: `Xp::XpOwners` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
                        fn handover() -> Weight {
                        // Proof Size summary in bytes:
                        // Measured: `2253`
                        // Estimated: `3573`
                        // Minimum execution time: 28_000_000 picoseconds.
                        Weight::from_parts(32_000_000,
                        3573)
                        .saturating_add(RocksDbWeight::get().reads(2_u64))
                        .saturating_add(RocksDbWeight::get().writes(2_u64))
                        }
                        /// Storage: `Xp::XpOf` (r:1 w:1)
                        /// Proof: `Xp::XpOf` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`)
                        /// Storage: `Xp::XpOwners` (r:1 w:0)
                        /// Proof: `Xp::XpOwners` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
                        /// Storage: `Xp::ReapedXp` (r:1 w:1)
                        /// Proof: `Xp::ReapedXp` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
                        /// Storage: `Xp::MinTimeStamp` (r:1 w:0)
                        /// Proof: `Xp::MinTimeStamp` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
                        /// Storage: `Xp::LockedXpOf` (r:1 w:0)
                        /// Proof: `Xp::LockedXpOf` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`)
                        /// Storage: `Xp::ReservedXpOf` (r:0 w:1)
                        /// Proof: `Xp::ReservedXpOf` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
                        fn dispose() -> Weight {
                        // Proof Size summary in bytes:
                        // Measured: `2520`
                        // Estimated: `3573`
                        // Minimum execution time: 40_000_000 picoseconds.
                        Weight::from_parts(44_000_000,
                        3573)
                        .saturating_add(RocksDbWeight::get().reads(5_u64))
                        .saturating_add(RocksDbWeight::get().writes(3_u64))
                        }
                        /// Storage: `Xp::XpOf` (r:1 w:0)
                        /// Proof: `Xp::XpOf` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`)
                        /// Storage: `Xp::XpOwners` (r:1 w:2)
                        /// Proof: `Xp::XpOwners` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
                        fn force_handover() -> Weight {
                        // Proof Size summary in bytes:
                        // Measured: `2424`
                        // Estimated: `3573`
                        // Minimum execution time: 33_000_000 picoseconds.
                        Weight::from_parts(36_000_000,
                        3573)
                        .saturating_add(RocksDbWeight::get().reads(2_u64))
                        .saturating_add(RocksDbWeight::get().writes(2_u64))
                        }
                        /// Storage: `Xp::MinTimeStamp` (r:0 w:1)
                        /// Proof: `Xp::MinTimeStamp` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
                        fn force_update_min_time_stamp() -> Weight {
                        // Proof Size summary in bytes:
                        // Measured: `0`
                        // Estimated: `0`
                        // Minimum execution time: 5_000_000 picoseconds.
                        Weight::from_parts(6_000_000,
                        0)
                        .saturating_add(RocksDbWeight::get().writes(1_u64))
                        }
                        /// Storage: `Xp::XpOwners` (r:1 w:0)
                        /// Proof: `Xp::XpOwners` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
                        fn call() -> Weight {
                        // Proof Size summary in bytes:
                        // Measured: `1178`
                        // Estimated: `3561`
                        // Minimum execution time: 17_000_000 picoseconds.
                        Weight::from_parts(19_000_000,
                        3561)
                        .saturating_add(RocksDbWeight::get().reads(1_u64))
                        }
                        /// Storage: `Xp::InitXp` (r:0 w:1)
                        /// Proof: `Xp::InitXp` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
                        fn force_update_init_xp() -> Weight {
                        // Proof Size summary in bytes:
                        // Measured: `0`
                        // Estimated: `0`
                        // Minimum execution time: 5_000_000 picoseconds.
                        Weight::from_parts(6_000_000,
                        0)
                        .saturating_add(RocksDbWeight::get().writes(1_u64))
                        }
                        /// Storage: `Xp::MinPulse` (r:0 w:1)
                        /// Proof: `Xp::MinPulse` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
                        fn force_update_min_pulse() -> Weight {
                        // Proof Size summary in bytes:
                        // Measured: `0`
                        // Estimated: `0`
                        // Minimum execution time: 5_000_000 picoseconds.
                        Weight::from_parts(6_000_000,
                        0)
                        .saturating_add(RocksDbWeight::get().writes(1_u64))
                        }
                        /// Storage: `Xp::PulseFactor` (r:0 w:1)
                        /// Proof: `Xp::PulseFactor` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
                        fn force_update_pulse_factor() -> Weight {
                        // Proof Size summary in bytes:
                        // Measured: `0`
                        // Estimated: `0`
                        // Minimum execution time: 5_000_000 picoseconds.
                        Weight::from_parts(6_000_000,
                        0)
                        .saturating_add(RocksDbWeight::get().writes(1_u64))
                        }
                        /// Storage: `Xp::XpOwners` (r:3 w:0)
                        /// Proof: `Xp::XpOwners` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
                        fn inspect_xp_keys_of() -> Weight {
                        // Proof Size summary in bytes:
                        // Measured: `1440`
                        // Estimated: `8703`
                        // Minimum execution time: 25_000_000 picoseconds.
                        Weight::from_parts(27_000_000,
                        8703)
                        .saturating_add(RocksDbWeight::get().reads(3_u64))
                        }
                        /// Storage: `Xp::XpOf` (r:1 w:0)
                        /// Proof: `Xp::XpOf` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`)
                        /// Storage: `Xp::XpOwners` (r:1 w:0)
                        /// Proof: `Xp::XpOwners` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
                        fn inspect_my_xp() -> Weight {
                        // Proof Size summary in bytes:
                        // Measured: `2250`
                        // Estimated: `3573`
                        // Minimum execution time: 30_000_000 picoseconds.
                        Weight::from_parts(34_000_000,
                        3573)
                        .saturating_add(RocksDbWeight::get().reads(2_u64))
                        }
                        }