referrerpolicy=no-referrer-when-downgrade

pallet_assets_precompiles/
weights.rs

1// This file is part of Substrate.
2
3// Copyright (C) Parity Technologies (UK) Ltd.
4// SPDX-License-Identifier: Apache-2.0
5
6// Licensed under the Apache License, Version 2.0 (the "License");
7// you may not use this file except in compliance with the License.
8// You may obtain a copy of the License at
9//
10// 	http://www.apache.org/licenses/LICENSE-2.0
11//
12// Unless required by applicable law or agreed to in writing, software
13// distributed under the License is distributed on an "AS IS" BASIS,
14// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15// See the License for the specific language governing permissions and
16// limitations under the License.
17
18//! Autogenerated weights for `pallet_assets_precompiles`
19//!
20//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
21//! DATE: 2026-03-16, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22//! WORST CASE MAP SIZE: `1000000`
23//! HOSTNAME: `ce2fd84d6866`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
24//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024`
25
26// Executed Command:
27// frame-omni-bencher
28// v1
29// benchmark
30// pallet
31// --extrinsic=*
32// --runtime=target/production/wbuild/kitchensink-runtime/kitchensink_runtime.wasm
33// --pallet=pallet_assets_precompiles
34// --header=/__w/polkadot-sdk/polkadot-sdk/substrate/HEADER-APACHE2
35// --output=/__w/polkadot-sdk/polkadot-sdk/substrate/frame/assets/precompiles/src/weights.rs
36// --wasm-execution=compiled
37// --steps=50
38// --repeat=20
39// --heap-pages=4096
40// --template=substrate/.maintain/frame-weight-template.hbs
41// --no-storage-info
42// --no-min-squares
43// --no-median-slopes
44// --exclude-pallets=pallet_xcm,pallet_xcm_benchmarks::fungible,pallet_xcm_benchmarks::generic,pallet_nomination_pools,pallet_remark,pallet_transaction_storage
45
46#![cfg_attr(rustfmt, rustfmt_skip)]
47#![allow(unused_parens)]
48#![allow(unused_imports)]
49#![allow(missing_docs)]
50#![allow(dead_code)]
51
52use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
53use core::marker::PhantomData;
54
55/// Weight functions needed for `pallet_assets_precompiles`.
56pub trait WeightInfo {
57	fn migrate_foreign_asset_step() -> Weight;
58	fn nonces() -> Weight;
59	fn domain_separator() -> Weight;
60	fn use_permit() -> Weight;
61}
62
63/// Weights for `pallet_assets_precompiles` using the Substrate node and recommended hardware.
64pub struct SubstrateWeight<T>(PhantomData<T>);
65impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
66	/// Storage: `Assets::Asset` (r:2 w:0)
67	/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
68	/// Storage: `AssetsPrecompiles::ForeignAssetIdToAssetIndex` (r:1 w:1)
69	/// Proof: `AssetsPrecompiles::ForeignAssetIdToAssetIndex` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
70	/// Storage: `AssetsPrecompiles::NextAssetIndex` (r:1 w:1)
71	/// Proof: `AssetsPrecompiles::NextAssetIndex` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
72	/// Storage: `AssetsPrecompiles::AssetIndexToForeignAssetId` (r:0 w:1)
73	/// Proof: `AssetsPrecompiles::AssetIndexToForeignAssetId` (`max_values`: None, `max_size`: Some(8), added: 2483, mode: `MaxEncodedLen`)
74	fn migrate_foreign_asset_step() -> Weight {
75		// Proof Size summary in bytes:
76		//  Measured:  `332`
77		//  Estimated: `6360`
78		// Minimum execution time: 19_267_000 picoseconds.
79		Weight::from_parts(23_277_000, 6360)
80			.saturating_add(T::DbWeight::get().reads(4_u64))
81			.saturating_add(T::DbWeight::get().writes(3_u64))
82	}
83	/// Storage: `AssetsPrecompilesPermit::Nonces` (r:1 w:0)
84	/// Proof: `AssetsPrecompilesPermit::Nonces` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`)
85	fn nonces() -> Weight {
86		// Proof Size summary in bytes:
87		//  Measured:  `344`
88		//  Estimated: `3569`
89		// Minimum execution time: 7_296_000 picoseconds.
90		Weight::from_parts(8_019_000, 3569)
91			.saturating_add(T::DbWeight::get().reads(1_u64))
92	}
93	fn domain_separator() -> Weight {
94		// Proof Size summary in bytes:
95		//  Measured:  `0`
96		//  Estimated: `0`
97		// Minimum execution time: 2_526_000 picoseconds.
98		Weight::from_parts(2_677_000, 0)
99	}
100	/// Storage: `Timestamp::Now` (r:1 w:0)
101	/// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
102	/// Storage: `AssetsPrecompilesPermit::Nonces` (r:1 w:1)
103	/// Proof: `AssetsPrecompilesPermit::Nonces` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`)
104	fn use_permit() -> Weight {
105		// Proof Size summary in bytes:
106		//  Measured:  `388`
107		//  Estimated: `3569`
108		// Minimum execution time: 58_492_000 picoseconds.
109		Weight::from_parts(59_803_000, 3569)
110			.saturating_add(T::DbWeight::get().reads(2_u64))
111			.saturating_add(T::DbWeight::get().writes(1_u64))
112	}
113}
114
115// For backwards compatibility and tests.
116impl WeightInfo for () {
117	/// Storage: `Assets::Asset` (r:2 w:0)
118	/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
119	/// Storage: `AssetsPrecompiles::ForeignAssetIdToAssetIndex` (r:1 w:1)
120	/// Proof: `AssetsPrecompiles::ForeignAssetIdToAssetIndex` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
121	/// Storage: `AssetsPrecompiles::NextAssetIndex` (r:1 w:1)
122	/// Proof: `AssetsPrecompiles::NextAssetIndex` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
123	/// Storage: `AssetsPrecompiles::AssetIndexToForeignAssetId` (r:0 w:1)
124	/// Proof: `AssetsPrecompiles::AssetIndexToForeignAssetId` (`max_values`: None, `max_size`: Some(8), added: 2483, mode: `MaxEncodedLen`)
125	fn migrate_foreign_asset_step() -> Weight {
126		// Proof Size summary in bytes:
127		//  Measured:  `332`
128		//  Estimated: `6360`
129		// Minimum execution time: 19_267_000 picoseconds.
130		Weight::from_parts(23_277_000, 6360)
131			.saturating_add(RocksDbWeight::get().reads(4_u64))
132			.saturating_add(RocksDbWeight::get().writes(3_u64))
133	}
134	/// Storage: `AssetsPrecompilesPermit::Nonces` (r:1 w:0)
135	/// Proof: `AssetsPrecompilesPermit::Nonces` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`)
136	fn nonces() -> Weight {
137		// Proof Size summary in bytes:
138		//  Measured:  `344`
139		//  Estimated: `3569`
140		// Minimum execution time: 7_296_000 picoseconds.
141		Weight::from_parts(8_019_000, 3569)
142			.saturating_add(RocksDbWeight::get().reads(1_u64))
143	}
144	fn domain_separator() -> Weight {
145		// Proof Size summary in bytes:
146		//  Measured:  `0`
147		//  Estimated: `0`
148		// Minimum execution time: 2_526_000 picoseconds.
149		Weight::from_parts(2_677_000, 0)
150	}
151	/// Storage: `Timestamp::Now` (r:1 w:0)
152	/// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
153	/// Storage: `AssetsPrecompilesPermit::Nonces` (r:1 w:1)
154	/// Proof: `AssetsPrecompilesPermit::Nonces` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`)
155	fn use_permit() -> Weight {
156		// Proof Size summary in bytes:
157		//  Measured:  `388`
158		//  Estimated: `3569`
159		// Minimum execution time: 58_492_000 picoseconds.
160		Weight::from_parts(59_803_000, 3569)
161			.saturating_add(RocksDbWeight::get().reads(2_u64))
162			.saturating_add(RocksDbWeight::get().writes(1_u64))
163	}
164}