pallet_native_token_management/
weights.rs

1
2//! Autogenerated weights for pallet_native_token_management
3//!
4//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
5//! DATE: 2025-05-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
6//! WORST CASE MAP SIZE: `1000000`
7//! HOSTNAME: `MacBookPro.localdomain`, CPU: `<UNKNOWN>`
8//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
9
10// Executed Command:
11// frame-omni-bencher
12// v1
13// benchmark
14// pallet
15// --runtime
16// target/production/wbuild/partner-chains-demo-runtime/partner_chains_demo_runtime.compact.compressed.wasm
17// --pallet
18// pallet_native_token_management
19// --extrinsic
20// *
21// --steps=50
22// --repeat=20
23// --wasm-execution=compiled
24// --output
25// toolkit/native-token-management/pallet/src/weights.rs
26// --template
27// .maintain/frame-weight-template.hbs
28
29#![cfg_attr(rustfmt, rustfmt_skip)]
30#![allow(unused_parens)]
31#![allow(unused_imports)]
32#![allow(missing_docs)]
33
34use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
35use core::marker::PhantomData;
36
37/// Weight functions needed for pallet_native_token_management.
38pub trait WeightInfo {
39	fn transfer_tokens() -> Weight;
40	fn set_main_chain_scripts() -> Weight;
41	fn on_finalize() -> Weight;
42}
43
44/// Weights for pallet_native_token_management using the Substrate node and recommended hardware.
45pub struct SubstrateWeight<T>(PhantomData<T>);
46impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
47	/// Storage: `NativeTokenManagement::MainChainScriptsConfiguration` (r:1 w:0)
48	/// Proof: `NativeTokenManagement::MainChainScriptsConfiguration` (`max_values`: Some(1), `max_size`: Some(183), added: 678, mode: `MaxEncodedLen`)
49	/// Storage: `NativeTokenManagement::TransferedThisBlock` (r:1 w:1)
50	/// Proof: `NativeTokenManagement::TransferedThisBlock` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
51	/// Storage: `NativeTokenManagement::Initialized` (r:1 w:1)
52	/// Proof: `NativeTokenManagement::Initialized` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
53	fn transfer_tokens() -> Weight {
54		// Proof Size summary in bytes:
55		//  Measured:  `59`
56		//  Estimated: `1668`
57		// Minimum execution time: 11_000_000 picoseconds.
58		Weight::from_parts(12_000_000, 1668)
59			.saturating_add(T::DbWeight::get().reads(3_u64))
60			.saturating_add(T::DbWeight::get().writes(2_u64))
61	}
62	/// Storage: `NativeTokenManagement::MainChainScriptsConfiguration` (r:0 w:1)
63	/// Proof: `NativeTokenManagement::MainChainScriptsConfiguration` (`max_values`: Some(1), `max_size`: Some(183), added: 678, mode: `MaxEncodedLen`)
64	fn set_main_chain_scripts() -> Weight {
65		// Proof Size summary in bytes:
66		//  Measured:  `0`
67		//  Estimated: `0`
68		// Minimum execution time: 2_000_000 picoseconds.
69		Weight::from_parts(2_000_000, 0)
70			.saturating_add(T::DbWeight::get().writes(1_u64))
71	}
72	/// Storage: `NativeTokenManagement::TransferedThisBlock` (r:0 w:1)
73	/// Proof: `NativeTokenManagement::TransferedThisBlock` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
74	fn on_finalize() -> Weight {
75		// Proof Size summary in bytes:
76		//  Measured:  `0`
77		//  Estimated: `0`
78		// Minimum execution time: 1_000_000 picoseconds.
79		Weight::from_parts(1_000_000, 0)
80			.saturating_add(T::DbWeight::get().writes(1_u64))
81	}
82}
83
84// For backwards compatibility and tests
85impl WeightInfo for () {
86	/// Storage: `NativeTokenManagement::MainChainScriptsConfiguration` (r:1 w:0)
87	/// Proof: `NativeTokenManagement::MainChainScriptsConfiguration` (`max_values`: Some(1), `max_size`: Some(183), added: 678, mode: `MaxEncodedLen`)
88	/// Storage: `NativeTokenManagement::TransferedThisBlock` (r:1 w:1)
89	/// Proof: `NativeTokenManagement::TransferedThisBlock` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
90	/// Storage: `NativeTokenManagement::Initialized` (r:1 w:1)
91	/// Proof: `NativeTokenManagement::Initialized` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
92	fn transfer_tokens() -> Weight {
93		// Proof Size summary in bytes:
94		//  Measured:  `59`
95		//  Estimated: `1668`
96		// Minimum execution time: 11_000_000 picoseconds.
97		Weight::from_parts(12_000_000, 1668)
98			.saturating_add(RocksDbWeight::get().reads(3_u64))
99			.saturating_add(RocksDbWeight::get().writes(2_u64))
100	}
101	/// Storage: `NativeTokenManagement::MainChainScriptsConfiguration` (r:0 w:1)
102	/// Proof: `NativeTokenManagement::MainChainScriptsConfiguration` (`max_values`: Some(1), `max_size`: Some(183), added: 678, mode: `MaxEncodedLen`)
103	fn set_main_chain_scripts() -> Weight {
104		// Proof Size summary in bytes:
105		//  Measured:  `0`
106		//  Estimated: `0`
107		// Minimum execution time: 2_000_000 picoseconds.
108		Weight::from_parts(2_000_000, 0)
109			.saturating_add(RocksDbWeight::get().writes(1_u64))
110	}
111	/// Storage: `NativeTokenManagement::TransferedThisBlock` (r:0 w:1)
112	/// Proof: `NativeTokenManagement::TransferedThisBlock` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
113	fn on_finalize() -> Weight {
114		// Proof Size summary in bytes:
115		//  Measured:  `0`
116		//  Estimated: `0`
117		// Minimum execution time: 1_000_000 picoseconds.
118		Weight::from_parts(1_000_000, 0)
119			.saturating_add(RocksDbWeight::get().writes(1_u64))
120	}
121}