1
// Copyright (C) Moondance Labs Ltd.
2
// This file is part of Tanssi.
3

            
4
// Tanssi 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
// Tanssi 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 Tanssi.  If not, see <http://www.gnu.org/licenses/>
16

            
17

            
18
//! Autogenerated weights for pallet_ethereum_token_transfers
19
//!
20
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 43.0.0
21
//! DATE: 2025-01-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22
//! WORST CASE MAP SIZE: `1000000`
23
//! HOSTNAME: `COV0768`, CPU: `AMD Ryzen 9 7950X 16-Core Processor`
24
//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
25

            
26
// Executed Command:
27
// target/release/tanssi-relay
28
// benchmark
29
// pallet
30
// --execution=wasm
31
// --wasm-execution=compiled
32
// --pallet
33
// pallet_ethereum_token_transfers
34
// --extrinsic
35
// *
36
// --chain=dev
37
// --steps
38
// 50
39
// --repeat
40
// 20
41
// --template=benchmarking/frame-weight-pallet-template.hbs
42
// --json-file
43
// raw.json
44
// --output
45
// pallets/ethereum-token-transfers/src//pallet_ethereum_token_transfers.rs
46

            
47
#![cfg_attr(rustfmt, rustfmt_skip)]
48
#![allow(unused_parens)]
49
#![allow(unused_imports)]
50

            
51
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
52
use sp_std::marker::PhantomData;
53

            
54
/// Weight functions needed for pallet_ethereum_token_transfers.
55
pub trait WeightInfo {
56
	fn set_token_transfer_channel() -> Weight;
57
	fn transfer_native_token() -> Weight;
58
}
59

            
60
/// Weights for pallet_ethereum_token_transfers using the Substrate node and recommended hardware.
61
pub struct SubstrateWeight<T>(PhantomData<T>);
62
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
63
	/// Storage: `EthereumTokenTransfers::CurrentChannelInfo` (r:1 w:1)
64
	/// Proof: `EthereumTokenTransfers::CurrentChannelInfo` (`max_values`: Some(1), `max_size`: Some(68), added: 563, mode: `MaxEncodedLen`)
65
	/// Storage: `EthereumSystem::Channels` (r:1 w:1)
66
	/// Proof: `EthereumSystem::Channels` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
67
	/// Storage: `EthereumSystem::Agents` (r:1 w:1)
68
	/// Proof: `EthereumSystem::Agents` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
69
	fn set_token_transfer_channel() -> Weight {
70
		// Proof Size summary in bytes:
71
		//  Measured:  `221`
72
		//  Estimated: `3541`
73
		// Minimum execution time: 13_820_000 picoseconds.
74
		Weight::from_parts(14_360_000, 3541)
75
			.saturating_add(T::DbWeight::get().reads(3_u64))
76
			.saturating_add(T::DbWeight::get().writes(3_u64))
77
	}
78
	/// Storage: `EthereumTokenTransfers::CurrentChannelInfo` (r:1 w:0)
79
	/// Proof: `EthereumTokenTransfers::CurrentChannelInfo` (`max_values`: Some(1), `max_size`: Some(68), added: 563, mode: `MaxEncodedLen`)
80
	/// Storage: `EthereumSystem::NativeToForeignId` (r:1 w:0)
81
	/// Proof: `EthereumSystem::NativeToForeignId` (`max_values`: None, `max_size`: Some(650), added: 3125, mode: `MaxEncodedLen`)
82
	/// Storage: `EthereumSystem::Channels` (r:1 w:0)
83
	/// Proof: `EthereumSystem::Channels` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
84
	/// Storage: `EthereumSystem::PricingParameters` (r:1 w:0)
85
	/// Proof: `EthereumSystem::PricingParameters` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`)
86
	/// Storage: `System::Account` (r:2 w:2)
87
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
88
	/// Storage: `EthereumOutboundQueue::OperatingMode` (r:1 w:0)
89
	/// Proof: `EthereumOutboundQueue::OperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
90
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
91
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`)
92
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
93
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`)
94
	/// Storage: UNKNOWN KEY `0x3a72656c61795f64697370617463685f71756575655f72656d61696e696e675f` (r:0 w:1)
95
	/// Proof: UNKNOWN KEY `0x3a72656c61795f64697370617463685f71756575655f72656d61696e696e675f` (r:0 w:1)
96
	/// Storage: `MessageQueue::Pages` (r:0 w:1)
97
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(32845), added: 35320, mode: `MaxEncodedLen`)
98
	/// Storage: UNKNOWN KEY `0xf5207f03cfdce586301014700e2c2593fad157e461d71fd4c1f936839a5f1f3e` (r:0 w:1)
99
	/// Proof: UNKNOWN KEY `0xf5207f03cfdce586301014700e2c2593fad157e461d71fd4c1f936839a5f1f3e` (r:0 w:1)
100
	fn transfer_native_token() -> Weight {
101
		// Proof Size summary in bytes:
102
		//  Measured:  `940`
103
		//  Estimated: `6196`
104
		// Minimum execution time: 103_740_000 picoseconds.
105
		Weight::from_parts(104_480_000, 6196)
106
			.saturating_add(T::DbWeight::get().reads(9_u64))
107
			.saturating_add(T::DbWeight::get().writes(7_u64))
108
	}
109
}
110

            
111
// For backwards compatibility and tests
112
impl WeightInfo for () {
113
	/// Storage: `EthereumTokenTransfers::CurrentChannelInfo` (r:1 w:1)
114
	/// Proof: `EthereumTokenTransfers::CurrentChannelInfo` (`max_values`: Some(1), `max_size`: Some(68), added: 563, mode: `MaxEncodedLen`)
115
	/// Storage: `EthereumSystem::Channels` (r:1 w:1)
116
	/// Proof: `EthereumSystem::Channels` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
117
	/// Storage: `EthereumSystem::Agents` (r:1 w:1)
118
	/// Proof: `EthereumSystem::Agents` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
119
	fn set_token_transfer_channel() -> Weight {
120
		// Proof Size summary in bytes:
121
		//  Measured:  `221`
122
		//  Estimated: `3541`
123
		// Minimum execution time: 13_820_000 picoseconds.
124
		Weight::from_parts(14_360_000, 3541)
125
			.saturating_add(RocksDbWeight::get().reads(3_u64))
126
			.saturating_add(RocksDbWeight::get().writes(3_u64))
127
	}
128
	/// Storage: `EthereumTokenTransfers::CurrentChannelInfo` (r:1 w:0)
129
	/// Proof: `EthereumTokenTransfers::CurrentChannelInfo` (`max_values`: Some(1), `max_size`: Some(68), added: 563, mode: `MaxEncodedLen`)
130
	/// Storage: `EthereumSystem::NativeToForeignId` (r:1 w:0)
131
	/// Proof: `EthereumSystem::NativeToForeignId` (`max_values`: None, `max_size`: Some(650), added: 3125, mode: `MaxEncodedLen`)
132
	/// Storage: `EthereumSystem::Channels` (r:1 w:0)
133
	/// Proof: `EthereumSystem::Channels` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
134
	/// Storage: `EthereumSystem::PricingParameters` (r:1 w:0)
135
	/// Proof: `EthereumSystem::PricingParameters` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`)
136
	/// Storage: `System::Account` (r:2 w:2)
137
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
138
	/// Storage: `EthereumOutboundQueue::OperatingMode` (r:1 w:0)
139
	/// Proof: `EthereumOutboundQueue::OperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
140
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
141
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`)
142
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
143
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`)
144
	/// Storage: UNKNOWN KEY `0x3a72656c61795f64697370617463685f71756575655f72656d61696e696e675f` (r:0 w:1)
145
	/// Proof: UNKNOWN KEY `0x3a72656c61795f64697370617463685f71756575655f72656d61696e696e675f` (r:0 w:1)
146
	/// Storage: `MessageQueue::Pages` (r:0 w:1)
147
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(32845), added: 35320, mode: `MaxEncodedLen`)
148
	/// Storage: UNKNOWN KEY `0xf5207f03cfdce586301014700e2c2593fad157e461d71fd4c1f936839a5f1f3e` (r:0 w:1)
149
	/// Proof: UNKNOWN KEY `0xf5207f03cfdce586301014700e2c2593fad157e461d71fd4c1f936839a5f1f3e` (r:0 w:1)
150
	fn transfer_native_token() -> Weight {
151
		// Proof Size summary in bytes:
152
		//  Measured:  `940`
153
		//  Estimated: `6196`
154
		// Minimum execution time: 103_740_000 picoseconds.
155
		Weight::from_parts(104_480_000, 6196)
156
			.saturating_add(RocksDbWeight::get().reads(9_u64))
157
			.saturating_add(RocksDbWeight::get().writes(7_u64))
158
	}
159
}