pallet_unified_accounts/weights.rs
1// This file is part of Astar.
2
3// Copyright (C) Stake Technologies Pte.Ltd.
4// SPDX-License-Identifier: GPL-3.0-or-later
5
6// Astar is free software: you can redistribute it and/or modify
7// it under the terms of the GNU General Public License as published by
8// the Free Software Foundation, either version 3 of the License, or
9// (at your option) any later version.
10
11// Astar is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU General Public License for more details.
15
16// You should have received a copy of the GNU General Public License
17// along with Astar. If not, see <http://www.gnu.org/licenses/>.
18
19//! Autogenerated weights for pallet_unified_accounts
20//!
21//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
22//! DATE: 2023-10-27, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
23//! WORST CASE MAP SIZE: `1000000`
24//! HOSTNAME: `devserver-01`, CPU: `Intel(R) Xeon(R) E-2236 CPU @ 3.40GHz`
25//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("shibuya-dev"), DB CACHE: 1024
26
27// Executed Command:
28// ./target/release/astar-collator
29// benchmark
30// pallet
31// --chain=shibuya-dev
32// --steps=50
33// --repeat=20
34// --pallet=pallet_unified_accounts
35// --extrinsic=*
36// --execution=wasm
37// --wasm-execution=compiled
38// --heap-pages=4096
39// --output=./benchmark-results/shibuya-dev/unified_accounts_weights.rs
40// --template=./scripts/templates/weight-template.hbs
41
42#![cfg_attr(rustfmt, rustfmt_skip)]
43#![allow(unused_parens)]
44#![allow(unused_imports)]
45
46use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
47use core::marker::PhantomData;
48
49/// Weight functions needed for pallet_unified_accounts.
50pub trait WeightInfo {
51 fn claim_evm_address() -> Weight;
52 fn claim_default_evm_address() -> Weight;
53 fn to_account_id() -> Weight;
54 fn to_account_id_or_default() -> Weight;
55 fn to_h160() -> Weight;
56 fn to_h160_or_default() -> Weight;
57}
58
59/// Weights for pallet_unified_accounts using the Substrate node and recommended hardware.
60pub struct SubstrateWeight<T>(PhantomData<T>);
61impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
62 /// Storage: UnifiedAccounts NativeToEvm (r:1 w:1)
63 /// Proof: UnifiedAccounts NativeToEvm (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen)
64 /// Storage: UnifiedAccounts EvmToNative (r:1 w:1)
65 /// Proof: UnifiedAccounts EvmToNative (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen)
66 /// Storage: EVMChainId ChainId (r:1 w:0)
67 /// Proof: EVMChainId ChainId (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen)
68 /// Storage: System BlockHash (r:1 w:0)
69 /// Proof: System BlockHash (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen)
70 /// Storage: System Account (r:1 w:0)
71 /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
72 fn claim_evm_address() -> Weight {
73 // Proof Size summary in bytes:
74 // Measured: `256`
75 // Estimated: `3593`
76 // Minimum execution time: 91_231_000 picoseconds.
77 Weight::from_parts(91_688_000, 3593)
78 .saturating_add(T::DbWeight::get().reads(5_u64))
79 .saturating_add(T::DbWeight::get().writes(2_u64))
80 }
81 /// Storage: UnifiedAccounts NativeToEvm (r:1 w:1)
82 /// Proof: UnifiedAccounts NativeToEvm (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen)
83 /// Storage: UnifiedAccounts EvmToNative (r:1 w:1)
84 /// Proof: UnifiedAccounts EvmToNative (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen)
85 fn claim_default_evm_address() -> Weight {
86 // Proof Size summary in bytes:
87 // Measured: `42`
88 // Estimated: `3533`
89 // Minimum execution time: 40_749_000 picoseconds.
90 Weight::from_parts(41_411_000, 3533)
91 .saturating_add(T::DbWeight::get().reads(2_u64))
92 .saturating_add(T::DbWeight::get().writes(2_u64))
93 }
94 /// Storage: UnifiedAccounts EvmToNative (r:1 w:0)
95 /// Proof: UnifiedAccounts EvmToNative (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen)
96 fn to_account_id() -> Weight {
97 // Proof Size summary in bytes:
98 // Measured: `170`
99 // Estimated: `3533`
100 // Minimum execution time: 5_478_000 picoseconds.
101 Weight::from_parts(5_661_000, 3533)
102 .saturating_add(T::DbWeight::get().reads(1_u64))
103 }
104 /// Storage: UnifiedAccounts EvmToNative (r:1 w:0)
105 /// Proof: UnifiedAccounts EvmToNative (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen)
106 fn to_account_id_or_default() -> Weight {
107 // Proof Size summary in bytes:
108 // Measured: `170`
109 // Estimated: `3533`
110 // Minimum execution time: 5_515_000 picoseconds.
111 Weight::from_parts(5_700_000, 3533)
112 .saturating_add(T::DbWeight::get().reads(1_u64))
113 }
114 /// Storage: UnifiedAccounts NativeToEvm (r:1 w:0)
115 /// Proof: UnifiedAccounts NativeToEvm (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen)
116 fn to_h160() -> Weight {
117 // Proof Size summary in bytes:
118 // Measured: `170`
119 // Estimated: `3533`
120 // Minimum execution time: 5_626_000 picoseconds.
121 Weight::from_parts(5_827_000, 3533)
122 .saturating_add(T::DbWeight::get().reads(1_u64))
123 }
124 /// Storage: UnifiedAccounts NativeToEvm (r:1 w:0)
125 /// Proof: UnifiedAccounts NativeToEvm (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen)
126 fn to_h160_or_default() -> Weight {
127 // Proof Size summary in bytes:
128 // Measured: `170`
129 // Estimated: `3533`
130 // Minimum execution time: 5_578_000 picoseconds.
131 Weight::from_parts(5_719_000, 3533)
132 .saturating_add(T::DbWeight::get().reads(1_u64))
133 }
134}
135
136// For backwards compatibility and tests
137impl WeightInfo for () {
138 /// Storage: UnifiedAccounts NativeToEvm (r:1 w:1)
139 /// Proof: UnifiedAccounts NativeToEvm (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen)
140 /// Storage: UnifiedAccounts EvmToNative (r:1 w:1)
141 /// Proof: UnifiedAccounts EvmToNative (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen)
142 /// Storage: EVMChainId ChainId (r:1 w:0)
143 /// Proof: EVMChainId ChainId (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen)
144 /// Storage: System BlockHash (r:1 w:0)
145 /// Proof: System BlockHash (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen)
146 /// Storage: System Account (r:1 w:0)
147 /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
148 fn claim_evm_address() -> Weight {
149 // Proof Size summary in bytes:
150 // Measured: `256`
151 // Estimated: `3593`
152 // Minimum execution time: 91_231_000 picoseconds.
153 Weight::from_parts(91_688_000, 3593)
154 .saturating_add(RocksDbWeight::get().reads(5_u64))
155 .saturating_add(RocksDbWeight::get().writes(2_u64))
156 }
157 /// Storage: UnifiedAccounts NativeToEvm (r:1 w:1)
158 /// Proof: UnifiedAccounts NativeToEvm (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen)
159 /// Storage: UnifiedAccounts EvmToNative (r:1 w:1)
160 /// Proof: UnifiedAccounts EvmToNative (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen)
161 fn claim_default_evm_address() -> Weight {
162 // Proof Size summary in bytes:
163 // Measured: `42`
164 // Estimated: `3533`
165 // Minimum execution time: 40_749_000 picoseconds.
166 Weight::from_parts(41_411_000, 3533)
167 .saturating_add(RocksDbWeight::get().reads(2_u64))
168 .saturating_add(RocksDbWeight::get().writes(2_u64))
169 }
170 /// Storage: UnifiedAccounts EvmToNative (r:1 w:0)
171 /// Proof: UnifiedAccounts EvmToNative (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen)
172 fn to_account_id() -> Weight {
173 // Proof Size summary in bytes:
174 // Measured: `170`
175 // Estimated: `3533`
176 // Minimum execution time: 5_478_000 picoseconds.
177 Weight::from_parts(5_661_000, 3533)
178 .saturating_add(RocksDbWeight::get().reads(1_u64))
179 }
180 /// Storage: UnifiedAccounts EvmToNative (r:1 w:0)
181 /// Proof: UnifiedAccounts EvmToNative (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen)
182 fn to_account_id_or_default() -> Weight {
183 // Proof Size summary in bytes:
184 // Measured: `170`
185 // Estimated: `3533`
186 // Minimum execution time: 5_515_000 picoseconds.
187 Weight::from_parts(5_700_000, 3533)
188 .saturating_add(RocksDbWeight::get().reads(1_u64))
189 }
190 /// Storage: UnifiedAccounts NativeToEvm (r:1 w:0)
191 /// Proof: UnifiedAccounts NativeToEvm (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen)
192 fn to_h160() -> Weight {
193 // Proof Size summary in bytes:
194 // Measured: `170`
195 // Estimated: `3533`
196 // Minimum execution time: 5_626_000 picoseconds.
197 Weight::from_parts(5_827_000, 3533)
198 .saturating_add(RocksDbWeight::get().reads(1_u64))
199 }
200 /// Storage: UnifiedAccounts NativeToEvm (r:1 w:0)
201 /// Proof: UnifiedAccounts NativeToEvm (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen)
202 fn to_h160_or_default() -> Weight {
203 // Proof Size summary in bytes:
204 // Measured: `170`
205 // Estimated: `3533`
206 // Minimum execution time: 5_578_000 picoseconds.
207 Weight::from_parts(5_719_000, 3533)
208 .saturating_add(RocksDbWeight::get().reads(1_u64))
209 }
210}