1
// Copyright 2024 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
//! Autogenerated weights for `pallet_asset_manager`
18
//!
19
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 43.0.0
20
//! DATE: 2025-02-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
21
//! WORST CASE MAP SIZE: `1000000`
22
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
23
//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
24

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

            
41
#![cfg_attr(rustfmt, rustfmt_skip)]
42
#![allow(unused_parens)]
43
#![allow(unused_imports)]
44

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

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