1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
// Copyright 2021 ChainSafe Systems
// SPDX-License-Identifier: LGPL-3.0-only

//! Autogenerated weights for `pallet_asset_index`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2021-10-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("pint-local"), DB CACHE: 128

// Executed Command:
// ./target/release/pint
// benchmark
// -p
// pallet_asset_index
// -e
// *
// --execution
// wasm
// --wasm-execution
// compiled
// --raw
// --chain
// pint-local
// --output
// ./runtime/common/src/weights/pallet_asset_index.rs
// --steps
// 50
// --repeat
// 20
// --heap-pages
// 4096


#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::Weight};
use sp_std::marker::PhantomData;

/// Weight functions for pallet_asset_index.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_asset_index::WeightInfo for WeightInfo<T> {
	// Storage: AssetIndex Assets (r:1 w:0)
	// Storage: Tokens Accounts (r:2 w:2)
	// Storage: System Account (r:2 w:2)
	fn add_asset() -> Weight {
		(75_000_000 as Weight)
			.saturating_add(T::DbWeight::get().reads(5 as Weight))
			.saturating_add(T::DbWeight::get().writes(4 as Weight))
	}
	// Storage: AssetIndex PendingWithdrawals (r:1 w:1)
	fn complete_withdraw() -> Weight {
		(29_000_000 as Weight)
			.saturating_add(T::DbWeight::get().reads(1 as Weight))
			.saturating_add(T::DbWeight::get().writes(1 as Weight))
	}
	// Storage: AssetIndex Assets (r:2 w:0)
	// Storage: Tokens Accounts (r:2 w:2)
	// Storage: PriceFeed AssetFeeds (r:1 w:0)
	// Storage: ChainlinkFeed Feeds (r:1 w:0)
	// Storage: ChainlinkFeed Rounds (r:1 w:0)
	// Storage: AssetIndex IndexTokenDepositRange (r:1 w:0)
	// Storage: System Account (r:1 w:1)
	// Storage: AssetIndex IndexTokenLocks (r:1 w:1)
	// Storage: AssetIndex LockupPeriod (r:1 w:0)
	// Storage: Balances Locks (r:1 w:1)
	// Storage: RemoteAssetManager AssetBalance (r:1 w:1)
	// Storage: AssetIndex Deposits (r:1 w:1)
	// Storage: AssetIndex LockedIndexToken (r:0 w:1)
	fn deposit() -> Weight {
		(129_000_000 as Weight)
			.saturating_add(T::DbWeight::get().reads(14 as Weight))
			.saturating_add(T::DbWeight::get().writes(8 as Weight))
	}
	// Storage: AssetIndex Assets (r:1 w:1)
	fn register_asset() -> Weight {
		(15_000_000 as Weight)
			.saturating_add(T::DbWeight::get().reads(1 as Weight))
			.saturating_add(T::DbWeight::get().writes(1 as Weight))
	}
	// Storage: AssetIndex Metadata (r:0 w:1)
	fn set_metadata() -> Weight {
		(14_000_000 as Weight)
			.saturating_add(T::DbWeight::get().writes(1 as Weight))
	}
	// Storage: AssetIndex IndexTokenDepositRange (r:0 w:1)
	fn set_deposit_range() -> Weight {
		(12_000_000 as Weight)
			.saturating_add(T::DbWeight::get().writes(1 as Weight))
	}
	// Storage: AssetIndex IndexTokenLocks (r:1 w:0)
	// Storage: System Account (r:2 w:1)
	// Storage: AssetIndex Deposits (r:1 w:1)
	// Storage: AssetIndex RedemptionFee (r:1 w:0)
	// Storage: AssetIndex Assets (r:2 w:0)
	// Storage: Tokens Accounts (r:1 w:0)
	// Storage: PriceFeed AssetFeeds (r:1 w:0)
	// Storage: ChainlinkFeed Feeds (r:1 w:0)
	// Storage: ChainlinkFeed Rounds (r:1 w:0)
	// Storage: RemoteAssetManager AssetBalance (r:1 w:1)
	// Storage: AssetIndex PendingWithdrawals (r:1 w:1)
	fn withdraw() -> Weight {
		(128_000_000 as Weight)
			.saturating_add(T::DbWeight::get().reads(13 as Weight))
			.saturating_add(T::DbWeight::get().writes(4 as Weight))
	}
	// Storage: AssetIndex IndexTokenLocks (r:1 w:1)
	// Storage: Balances Locks (r:1 w:1)
	// Storage: System Account (r:1 w:1)
	// Storage: AssetIndex LockedIndexToken (r:0 w:1)
	fn unlock() -> Weight {
		(28_000_000 as Weight)
			.saturating_add(T::DbWeight::get().reads(3 as Weight))
			.saturating_add(T::DbWeight::get().writes(4 as Weight))
	}
	// Storage: AssetIndex LockupPeriod (r:0 w:1)
	fn set_lockup_period() -> Weight {
		(13_000_000 as Weight)
			.saturating_add(T::DbWeight::get().writes(1 as Weight))
	}
	// Storage: AssetIndex RedemptionFee (r:0 w:1)
	fn update_redemption_fees() -> Weight {
		(14_000_000 as Weight)
			.saturating_add(T::DbWeight::get().writes(1 as Weight))
	}

    fn remove_asset() -> Weight {
        Default::default()
    }
}