1
// Copyright 2025 Moonbeam foundation
2
// This file is part of Moonbeam.
3

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

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

            
14
// You should have received a copy of the GNU General Public License
15
// along with Moonbeam.  If not, see <http://www.gnu.org/licenses/>.
16

            
17

            
18
//! Autogenerated weights for `pallet_asset_manager`
19
//!
20
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
21
//! DATE: 2025-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22
//! WORST CASE MAP SIZE: `1000000`
23
//! HOSTNAME: `ip-10-0-0-198`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
24
//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
25

            
26
// Executed Command:
27
// ./frame-omni-bencher
28
// v1
29
// benchmark
30
// pallet
31
// --runtime=./target/production/wbuild/moonbase-runtime/moonbase_runtime.wasm
32
// --genesis-builder=runtime
33
// --genesis-builder-preset=development
34
// --steps=50
35
// --repeat=20
36
// --pallet=pallet_asset_manager
37
// --extrinsic=*
38
// --wasm-execution=compiled
39
// --header=./file_header.txt
40
// --template=./benchmarking/frame-weight-template.hbs
41
// --output=./runtime/moonbase/src/weights
42

            
43
#![cfg_attr(rustfmt, rustfmt_skip)]
44
#![allow(unused_parens)]
45
#![allow(unused_imports)]
46

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

            
50
/// Weights for `pallet_asset_manager`.
51
pub struct WeightInfo<T>(PhantomData<T>);
52
impl<T: frame_system::Config> pallet_asset_manager::WeightInfo for WeightInfo<T> {
53
	/// Storage: `AssetManager::AssetIdType` (r:1 w:1)
54
	/// Proof: `AssetManager::AssetIdType` (`max_values`: None, `max_size`: None, mode: `Measured`)
55
	/// Storage: `Assets::Asset` (r:1 w:1)
56
	/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(174), added: 2649, mode: `MaxEncodedLen`)
57
	/// Storage: `Assets::NextAssetId` (r:1 w:0)
58
	/// Proof: `Assets::NextAssetId` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
59
	/// Storage: `Assets::Metadata` (r:1 w:1)
60
	/// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(152), added: 2627, mode: `MaxEncodedLen`)
61
	/// Storage: `AssetManager::AssetTypeId` (r:0 w:1)
62
	/// Proof: `AssetManager::AssetTypeId` (`max_values`: None, `max_size`: None, mode: `Measured`)
63
	fn register_foreign_asset() -> Weight {
64
		// Proof Size summary in bytes:
65
		//  Measured:  `82`
66
		//  Estimated: `3639`
67
		// Minimum execution time: 31_052_000 picoseconds.
68
		Weight::from_parts(32_113_000, 3639)
69
			.saturating_add(T::DbWeight::get().reads(4_u64))
70
			.saturating_add(T::DbWeight::get().writes(4_u64))
71
	}
72
	/// Storage: `AssetManager::AssetIdType` (r:1 w:1)
73
	/// Proof: `AssetManager::AssetIdType` (`max_values`: None, `max_size`: None, mode: `Measured`)
74
	/// Storage: `AssetManager::AssetTypeId` (r:0 w:2)
75
	/// Proof: `AssetManager::AssetTypeId` (`max_values`: None, `max_size`: None, mode: `Measured`)
76
	fn change_existing_asset_type() -> Weight {
77
		// Proof Size summary in bytes:
78
		//  Measured:  `172`
79
		//  Estimated: `3637`
80
		// Minimum execution time: 17_153_000 picoseconds.
81
		Weight::from_parts(17_843_000, 3637)
82
			.saturating_add(T::DbWeight::get().reads(1_u64))
83
			.saturating_add(T::DbWeight::get().writes(3_u64))
84
	}
85
	/// Storage: `AssetManager::AssetIdType` (r:1 w:1)
86
	/// Proof: `AssetManager::AssetIdType` (`max_values`: None, `max_size`: None, mode: `Measured`)
87
	/// Storage: `AssetManager::AssetTypeId` (r:0 w:1)
88
	/// Proof: `AssetManager::AssetTypeId` (`max_values`: None, `max_size`: None, mode: `Measured`)
89
	fn remove_existing_asset_type() -> Weight {
90
		// Proof Size summary in bytes:
91
		//  Measured:  `172`
92
		//  Estimated: `3637`
93
		// Minimum execution time: 14_938_000 picoseconds.
94
		Weight::from_parts(15_383_000, 3637)
95
			.saturating_add(T::DbWeight::get().reads(1_u64))
96
			.saturating_add(T::DbWeight::get().writes(2_u64))
97
	}
98
}