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 core::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
	fn add_tip() -> Weight;
60
}
61

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

            
112
	fn add_tip() -> Weight {
113
		Weight::from_parts(104_480_000, 6196)
114
	}
115
}
116

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

            
166
	fn add_tip() -> Weight {
167
		Weight::from_parts(104_480_000, 6196)
168
	}
169
}