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
// TODO: Generate
18

            
19
#![cfg_attr(rustfmt, rustfmt_skip)]
20
#![allow(unused_parens)]
21
#![allow(unused_imports)]
22

            
23
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
24
use core::marker::PhantomData;
25

            
26
/// Weight functions needed for pallet_services_payment_price_oracle.
27
pub trait WeightInfo {
28
    fn set_token_price() -> Weight;
29
}
30

            
31
/// Weights for pallet_services_payment_price_oracle using the Substrate node and recommended hardware.
32
pub struct SubstrateWeight<T>(PhantomData<T>);
33
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
34
    /// Storage: `ServicesPaymentPriceOracle::TokenPriceUsd` (r:0 w:1)
35
    /// Proof: `ServicesPaymentPriceOracle::TokenPriceUsd` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
36
    fn set_token_price() -> Weight {
37
        // Proof Size summary in bytes:
38
        //  Measured:  `0`
39
        //  Estimated: `0`
40
        // Minimum execution time: 4_000_000 picoseconds.
41
        Weight::from_parts(5_000_000, 0)
42
            .saturating_add(T::DbWeight::get().writes(1_u64))
43
    }
44
}
45

            
46
impl WeightInfo for () {
47
    /// Storage: `ServicesPaymentPriceOracle::TokenPriceUsd` (r:0 w:1)
48
    /// Proof: `ServicesPaymentPriceOracle::TokenPriceUsd` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
49
    fn set_token_price() -> Weight {
50
        // Proof Size summary in bytes:
51
        //  Measured:  `0`
52
        //  Estimated: `0`
53
        // Minimum execution time: 4_000_000 picoseconds.
54
        Weight::from_parts(5_000_000, 0)
55
            .saturating_add(RocksDbWeight::get().writes(1_u64))
56
    }
57
}