pallet_pgas_allowance/
weights.rs1#![allow(unused_parens)]
19#![allow(unused_imports)]
20#![allow(missing_docs)]
21
22use core::marker::PhantomData;
23use frame_support::{
24 traits::Get,
25 weights::{Weight, constants::RocksDbWeight},
26};
27
28pub trait WeightInfo {
30 fn charge_pgas() -> Weight;
32 fn charge_pgas_skip() -> Weight;
34}
35
36pub struct SubstrateWeight<T>(PhantomData<T>);
38impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
39 fn charge_pgas() -> Weight {
40 Weight::from_parts(45_000_000, 3675)
41 .saturating_add(T::DbWeight::get().reads(5_u64))
42 .saturating_add(T::DbWeight::get().writes(2_u64))
43 }
44 fn charge_pgas_skip() -> Weight {
45 Weight::from_parts(1_000_000, 0).saturating_add(T::DbWeight::get().reads(1_u64))
46 }
47}
48
49impl WeightInfo for () {
51 fn charge_pgas() -> Weight {
52 Weight::from_parts(45_000_000, 3675)
53 .saturating_add(RocksDbWeight::get().reads(5_u64))
54 .saturating_add(RocksDbWeight::get().writes(2_u64))
55 }
56 fn charge_pgas_skip() -> Weight {
57 Weight::from_parts(1_000_000, 0).saturating_add(RocksDbWeight::get().reads(1_u64))
58 }
59}