mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 10:31:03 +00:00
cumulus: add asset-hub-rococo runtime based on asset-hub-kusama and add asset-bridging support to it (#1215)
This commit adds Rococo Asset Hub dedicated runtime so we can test new features here, before merging them in Kusama Asset Hub. Also adds one such feature: asset transfer over bridge (Rococo AssetHub <> Wococo AssetHub) - clone `asset-hub-kusama-runtime` -> `asset-hub-rococo-runtime` - make it use Rococo primitives, names, assets, constants, etc - add asset-transfer-over-bridge support to Rococo AssetHub <> Wococo AssetHub Fixes #1128 --------- Co-authored-by: Branislav Kontur <bkontur@gmail.com> Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
This commit is contained in:
@@ -449,7 +449,7 @@ pub type Barrier = TrailingSetTopicAsId<
|
||||
// Allow XCMs with some computed origins to pass through.
|
||||
WithComputedOrigin<
|
||||
(
|
||||
// If the message is one that immediately attemps to pay for execution, then
|
||||
// If the message is one that immediately attempts to pay for execution, then
|
||||
// allow it.
|
||||
AllowTopLevelPaidExecutionFrom<Everything>,
|
||||
// Parent and its pluralities (i.e. governance bodies) get free execution.
|
||||
|
||||
@@ -367,7 +367,7 @@ pub type Barrier = TrailingSetTopicAsId<
|
||||
// Allow XCMs with some computed origins to pass through.
|
||||
WithComputedOrigin<
|
||||
(
|
||||
// If the message is one that immediately attemps to pay for execution, then
|
||||
// If the message is one that immediately attempts to pay for execution, then
|
||||
// allow it.
|
||||
AllowTopLevelPaidExecutionFrom<Everything>,
|
||||
// Parent, its pluralities (i.e. governance bodies), and the Fellows plurality
|
||||
|
||||
@@ -0,0 +1,241 @@
|
||||
[package]
|
||||
name = "asset-hub-rococo-runtime"
|
||||
version = "0.9.420"
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
description = "Rococo variant of Asset Hub parachain runtime"
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "max-encoded-len"] }
|
||||
hex-literal = { version = "0.4.1" }
|
||||
log = { version = "0.4.20", default-features = false }
|
||||
scale-info = { version = "2.9.0", default-features = false, features = ["derive"] }
|
||||
smallvec = "1.11.0"
|
||||
|
||||
# Substrate
|
||||
frame-benchmarking = { path = "../../../../../substrate/frame/benchmarking", default-features = false, optional = true}
|
||||
frame-executive = { path = "../../../../../substrate/frame/executive", default-features = false}
|
||||
frame-support = { path = "../../../../../substrate/frame/support", default-features = false}
|
||||
frame-system = { path = "../../../../../substrate/frame/system", default-features = false}
|
||||
frame-system-benchmarking = { path = "../../../../../substrate/frame/system/benchmarking", default-features = false, optional = true}
|
||||
frame-system-rpc-runtime-api = { path = "../../../../../substrate/frame/system/rpc/runtime-api", default-features = false}
|
||||
frame-try-runtime = { path = "../../../../../substrate/frame/try-runtime", default-features = false, optional = true}
|
||||
pallet-asset-conversion-tx-payment = { path = "../../../../../substrate/frame/transaction-payment/asset-conversion-tx-payment", default-features = false}
|
||||
pallet-assets = { path = "../../../../../substrate/frame/assets", default-features = false}
|
||||
pallet-asset-conversion = { path = "../../../../../substrate/frame/asset-conversion", default-features = false}
|
||||
pallet-aura = { path = "../../../../../substrate/frame/aura", default-features = false}
|
||||
pallet-authorship = { path = "../../../../../substrate/frame/authorship", default-features = false}
|
||||
pallet-balances = { path = "../../../../../substrate/frame/balances", default-features = false}
|
||||
pallet-multisig = { path = "../../../../../substrate/frame/multisig", default-features = false}
|
||||
pallet-nft-fractionalization = { path = "../../../../../substrate/frame/nft-fractionalization", default-features = false}
|
||||
pallet-nfts = { path = "../../../../../substrate/frame/nfts", default-features = false}
|
||||
pallet-nfts-runtime-api = { path = "../../../../../substrate/frame/nfts/runtime-api", default-features = false}
|
||||
pallet-proxy = { path = "../../../../../substrate/frame/proxy", default-features = false}
|
||||
pallet-session = { path = "../../../../../substrate/frame/session", default-features = false}
|
||||
pallet-state-trie-migration = { path = "../../../../../substrate/frame/state-trie-migration", default-features = false, optional = true }
|
||||
pallet-timestamp = { path = "../../../../../substrate/frame/timestamp", default-features = false}
|
||||
pallet-transaction-payment = { path = "../../../../../substrate/frame/transaction-payment", default-features = false}
|
||||
pallet-transaction-payment-rpc-runtime-api = { path = "../../../../../substrate/frame/transaction-payment/rpc/runtime-api", default-features = false}
|
||||
pallet-uniques = { path = "../../../../../substrate/frame/uniques", default-features = false}
|
||||
pallet-utility = { path = "../../../../../substrate/frame/utility", default-features = false}
|
||||
sp-api = { path = "../../../../../substrate/primitives/api", default-features = false}
|
||||
sp-block-builder = { path = "../../../../../substrate/primitives/block-builder", default-features = false}
|
||||
sp-consensus-aura = { path = "../../../../../substrate/primitives/consensus/aura", default-features = false}
|
||||
sp-core = { path = "../../../../../substrate/primitives/core", default-features = false}
|
||||
sp-inherents = { path = "../../../../../substrate/primitives/inherents", default-features = false}
|
||||
sp-offchain = { path = "../../../../../substrate/primitives/offchain", default-features = false}
|
||||
sp-runtime = { path = "../../../../../substrate/primitives/runtime", default-features = false}
|
||||
sp-session = { path = "../../../../../substrate/primitives/session", default-features = false}
|
||||
sp-std = { path = "../../../../../substrate/primitives/std", default-features = false}
|
||||
sp-storage = { path = "../../../../../substrate/primitives/storage", default-features = false}
|
||||
sp-transaction-pool = { path = "../../../../../substrate/primitives/transaction-pool", default-features = false}
|
||||
sp-version = { path = "../../../../../substrate/primitives/version", default-features = false}
|
||||
sp-weights = { path = "../../../../../substrate/primitives/weights", default-features = false}
|
||||
# num-traits feature needed for dex integer sq root:
|
||||
primitive-types = { version = "0.12.1", default-features = false, features = ["codec", "scale-info", "num-traits"] }
|
||||
|
||||
# Polkadot
|
||||
rococo-runtime-constants = { path = "../../../../../polkadot/runtime/rococo/constants", default-features = false}
|
||||
pallet-xcm = { path = "../../../../../polkadot/xcm/pallet-xcm", default-features = false}
|
||||
pallet-xcm-benchmarks = { path = "../../../../../polkadot/xcm/pallet-xcm-benchmarks", default-features = false, optional = true }
|
||||
polkadot-core-primitives = { path = "../../../../../polkadot/core-primitives", default-features = false}
|
||||
polkadot-parachain-primitives = { path = "../../../../../polkadot/parachain", default-features = false}
|
||||
polkadot-runtime-common = { path = "../../../../../polkadot/runtime/common", default-features = false}
|
||||
xcm = { package = "staging-xcm", path = "../../../../../polkadot/xcm", default-features = false}
|
||||
xcm-builder = { package = "staging-xcm-builder", path = "../../../../../polkadot/xcm/xcm-builder", default-features = false}
|
||||
xcm-executor = { package = "staging-xcm-executor", path = "../../../../../polkadot/xcm/xcm-executor", default-features = false}
|
||||
|
||||
# Cumulus
|
||||
cumulus-pallet-aura-ext = { path = "../../../../pallets/aura-ext", default-features = false }
|
||||
cumulus-pallet-dmp-queue = { path = "../../../../pallets/dmp-queue", default-features = false }
|
||||
cumulus-pallet-parachain-system = { path = "../../../../pallets/parachain-system", default-features = false, features = ["parameterized-consensus-hook",] }
|
||||
cumulus-pallet-session-benchmarking = { path = "../../../../pallets/session-benchmarking", default-features = false}
|
||||
cumulus-pallet-xcm = { path = "../../../../pallets/xcm", default-features = false }
|
||||
cumulus-pallet-xcmp-queue = { path = "../../../../pallets/xcmp-queue", default-features = false, features = ["bridging"] }
|
||||
cumulus-primitives-core = { path = "../../../../primitives/core", default-features = false }
|
||||
cumulus-primitives-utility = { path = "../../../../primitives/utility", default-features = false }
|
||||
pallet-collator-selection = { path = "../../../../pallets/collator-selection", default-features = false }
|
||||
parachain-info = { path = "../../../pallets/parachain-info", default-features = false }
|
||||
parachains-common = { path = "../../../common", default-features = false }
|
||||
assets-common = { path = "../common", default-features = false }
|
||||
|
||||
# Bridges
|
||||
pallet-xcm-bridge-hub-router = { path = "../../../../../bridges/modules/xcm-bridge-hub-router", default-features = false }
|
||||
bp-asset-hub-rococo = { path = "../../../../../bridges/primitives/chain-asset-hub-rococo", default-features = false }
|
||||
bp-asset-hub-wococo = { path = "../../../../../bridges/primitives/chain-asset-hub-wococo", default-features = false }
|
||||
bp-bridge-hub-rococo = { path = "../../../../../bridges/primitives/chain-bridge-hub-rococo", default-features = false }
|
||||
bp-bridge-hub-wococo = { path = "../../../../../bridges/primitives/chain-bridge-hub-wococo", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
asset-test-utils = { path = "../test-utils" }
|
||||
|
||||
[build-dependencies]
|
||||
substrate-wasm-builder = { path = "../../../../../substrate/utils/wasm-builder", optional = true }
|
||||
|
||||
[features]
|
||||
default = [ "std" ]
|
||||
# When enabled the `state_version` is set to `1`.
|
||||
# This means that the chain will start using the new state format. The migration is lazy, so
|
||||
# it requires to write a storage value to use the new state format. To migrate all the other
|
||||
# storage values that aren't touched the state migration pallet is added as well.
|
||||
# This pallet will migrate the entire state, controlled through some account.
|
||||
#
|
||||
# This feature should be removed when the main-net will be migrated.
|
||||
state-trie-version-1 = [ "pallet-state-trie-migration" ]
|
||||
runtime-benchmarks = [
|
||||
"assets-common/runtime-benchmarks",
|
||||
"cumulus-pallet-parachain-system/runtime-benchmarks",
|
||||
"cumulus-pallet-session-benchmarking/runtime-benchmarks",
|
||||
"cumulus-pallet-xcmp-queue/runtime-benchmarks",
|
||||
"cumulus-primitives-utility/runtime-benchmarks",
|
||||
"frame-benchmarking/runtime-benchmarks",
|
||||
"frame-support/runtime-benchmarks",
|
||||
"frame-system-benchmarking/runtime-benchmarks",
|
||||
"frame-system/runtime-benchmarks",
|
||||
"pallet-asset-conversion/runtime-benchmarks",
|
||||
"pallet-assets/runtime-benchmarks",
|
||||
"pallet-balances/runtime-benchmarks",
|
||||
"pallet-collator-selection/runtime-benchmarks",
|
||||
"pallet-multisig/runtime-benchmarks",
|
||||
"pallet-nft-fractionalization/runtime-benchmarks",
|
||||
"pallet-nfts/runtime-benchmarks",
|
||||
"pallet-proxy/runtime-benchmarks",
|
||||
"pallet-state-trie-migration/runtime-benchmarks",
|
||||
"pallet-timestamp/runtime-benchmarks",
|
||||
"pallet-uniques/runtime-benchmarks",
|
||||
"pallet-utility/runtime-benchmarks",
|
||||
"pallet-xcm-benchmarks/runtime-benchmarks",
|
||||
"pallet-xcm-bridge-hub-router/runtime-benchmarks",
|
||||
"pallet-xcm/runtime-benchmarks",
|
||||
"parachains-common/runtime-benchmarks",
|
||||
"polkadot-parachain-primitives/runtime-benchmarks",
|
||||
"polkadot-runtime-common/runtime-benchmarks",
|
||||
"sp-runtime/runtime-benchmarks",
|
||||
"xcm-builder/runtime-benchmarks",
|
||||
"xcm-executor/runtime-benchmarks",
|
||||
]
|
||||
try-runtime = [
|
||||
"cumulus-pallet-aura-ext/try-runtime",
|
||||
"cumulus-pallet-dmp-queue/try-runtime",
|
||||
"cumulus-pallet-parachain-system/try-runtime",
|
||||
"cumulus-pallet-xcm/try-runtime",
|
||||
"cumulus-pallet-xcmp-queue/try-runtime",
|
||||
"frame-executive/try-runtime",
|
||||
"frame-support/try-runtime",
|
||||
"frame-system/try-runtime",
|
||||
"frame-try-runtime/try-runtime",
|
||||
"pallet-asset-conversion-tx-payment/try-runtime",
|
||||
"pallet-asset-conversion/try-runtime",
|
||||
"pallet-assets/try-runtime",
|
||||
"pallet-aura/try-runtime",
|
||||
"pallet-authorship/try-runtime",
|
||||
"pallet-balances/try-runtime",
|
||||
"pallet-collator-selection/try-runtime",
|
||||
"pallet-multisig/try-runtime",
|
||||
"pallet-nft-fractionalization/try-runtime",
|
||||
"pallet-nfts/try-runtime",
|
||||
"pallet-proxy/try-runtime",
|
||||
"pallet-session/try-runtime",
|
||||
"pallet-state-trie-migration/try-runtime",
|
||||
"pallet-timestamp/try-runtime",
|
||||
"pallet-transaction-payment/try-runtime",
|
||||
"pallet-uniques/try-runtime",
|
||||
"pallet-utility/try-runtime",
|
||||
"pallet-xcm-bridge-hub-router/try-runtime",
|
||||
"pallet-xcm/try-runtime",
|
||||
"parachain-info/try-runtime",
|
||||
"polkadot-runtime-common/try-runtime",
|
||||
"sp-runtime/try-runtime",
|
||||
]
|
||||
std = [
|
||||
"assets-common/std",
|
||||
"bp-asset-hub-rococo/std",
|
||||
"bp-asset-hub-wococo/std",
|
||||
"bp-bridge-hub-rococo/std",
|
||||
"bp-bridge-hub-wococo/std",
|
||||
"codec/std",
|
||||
"cumulus-pallet-aura-ext/std",
|
||||
"cumulus-pallet-dmp-queue/std",
|
||||
"cumulus-pallet-parachain-system/std",
|
||||
"cumulus-pallet-session-benchmarking/std",
|
||||
"cumulus-pallet-xcm/std",
|
||||
"cumulus-pallet-xcmp-queue/std",
|
||||
"cumulus-primitives-core/std",
|
||||
"cumulus-primitives-utility/std",
|
||||
"frame-benchmarking?/std",
|
||||
"frame-executive/std",
|
||||
"frame-support/std",
|
||||
"frame-system-benchmarking?/std",
|
||||
"frame-system-rpc-runtime-api/std",
|
||||
"frame-system/std",
|
||||
"frame-try-runtime?/std",
|
||||
"log/std",
|
||||
"pallet-asset-conversion-tx-payment/std",
|
||||
"pallet-asset-conversion/std",
|
||||
"pallet-assets/std",
|
||||
"pallet-aura/std",
|
||||
"pallet-authorship/std",
|
||||
"pallet-balances/std",
|
||||
"pallet-collator-selection/std",
|
||||
"pallet-multisig/std",
|
||||
"pallet-nft-fractionalization/std",
|
||||
"pallet-nfts-runtime-api/std",
|
||||
"pallet-nfts/std",
|
||||
"pallet-proxy/std",
|
||||
"pallet-session/std",
|
||||
"pallet-state-trie-migration/std",
|
||||
"pallet-timestamp/std",
|
||||
"pallet-transaction-payment-rpc-runtime-api/std",
|
||||
"pallet-transaction-payment/std",
|
||||
"pallet-uniques/std",
|
||||
"pallet-utility/std",
|
||||
"pallet-xcm-benchmarks?/std",
|
||||
"pallet-xcm-bridge-hub-router/std",
|
||||
"pallet-xcm/std",
|
||||
"parachain-info/std",
|
||||
"parachains-common/std",
|
||||
"polkadot-core-primitives/std",
|
||||
"polkadot-parachain-primitives/std",
|
||||
"polkadot-runtime-common/std",
|
||||
"rococo-runtime-constants/std",
|
||||
"scale-info/std",
|
||||
"sp-api/std",
|
||||
"sp-block-builder/std",
|
||||
"sp-consensus-aura/std",
|
||||
"sp-core/std",
|
||||
"sp-inherents/std",
|
||||
"sp-offchain/std",
|
||||
"sp-runtime/std",
|
||||
"sp-session/std",
|
||||
"sp-std/std",
|
||||
"sp-storage/std",
|
||||
"sp-transaction-pool/std",
|
||||
"sp-version/std",
|
||||
"sp-weights/std",
|
||||
"substrate-wasm-builder",
|
||||
"xcm-builder/std",
|
||||
"xcm-executor/std",
|
||||
"xcm/std",
|
||||
]
|
||||
|
||||
experimental = [ "pallet-aura/experimental" ]
|
||||
@@ -0,0 +1,26 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
fn main() {
|
||||
substrate_wasm_builder::WasmBuilder::new()
|
||||
.with_current_project()
|
||||
.export_heap_base()
|
||||
.import_memory()
|
||||
.build()
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
fn main() {}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,53 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
pub mod constants {
|
||||
use frame_support::{
|
||||
parameter_types,
|
||||
weights::{constants, Weight},
|
||||
};
|
||||
|
||||
parameter_types! {
|
||||
/// Importing a block with 0 Extrinsics.
|
||||
pub const BlockExecutionWeight: Weight =
|
||||
Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(5_000_000), 0);
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod test_weights {
|
||||
use frame_support::weights::constants;
|
||||
|
||||
/// Checks that the weight exists and is sane.
|
||||
// NOTE: If this test fails but you are sure that the generated values are fine,
|
||||
// you can delete it.
|
||||
#[test]
|
||||
fn sane() {
|
||||
let w = super::constants::BlockExecutionWeight::get();
|
||||
|
||||
// At least 100 µs.
|
||||
assert!(
|
||||
w.ref_time() >= 100u64 * constants::WEIGHT_REF_TIME_PER_MICROS,
|
||||
"Weight should be at least 100 µs."
|
||||
);
|
||||
// At most 50 ms.
|
||||
assert!(
|
||||
w.ref_time() <= 50u64 * constants::WEIGHT_REF_TIME_PER_MILLIS,
|
||||
"Weight should be at most 50 ms."
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Cumulus.
|
||||
|
||||
// Cumulus is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Cumulus is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `cumulus_pallet_xcmp_queue`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-rococo-dev")`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=asset-hub-rococo-dev
|
||||
// --wasm-execution=compiled
|
||||
// --pallet=cumulus_pallet_xcmp_queue
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --extrinsic=*
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --json
|
||||
// --header=./file_header.txt
|
||||
// --output=./parachains/runtimes/assets/asset-hub-rococo/src/weights/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `cumulus_pallet_xcmp_queue`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> cumulus_pallet_xcmp_queue::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `XcmpQueue::QueueConfig` (r:1 w:1)
|
||||
/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
fn set_config_with_u32() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `76`
|
||||
// Estimated: `1561`
|
||||
// Minimum execution time: 5_467_000 picoseconds.
|
||||
Weight::from_parts(5_634_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1561))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `XcmpQueue::QueueConfig` (r:1 w:1)
|
||||
/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
fn set_config_with_weight() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `76`
|
||||
// Estimated: `1561`
|
||||
// Minimum execution time: 5_409_000 picoseconds.
|
||||
Weight::from_parts(5_570_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1561))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
pub mod constants {
|
||||
use frame_support::{
|
||||
parameter_types,
|
||||
weights::{constants, Weight},
|
||||
};
|
||||
|
||||
parameter_types! {
|
||||
/// Executing a NO-OP `System::remarks` Extrinsic.
|
||||
pub const ExtrinsicBaseWeight: Weight =
|
||||
Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(125_000), 0);
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod test_weights {
|
||||
use frame_support::weights::constants;
|
||||
|
||||
/// Checks that the weight exists and is sane.
|
||||
// NOTE: If this test fails but you are sure that the generated values are fine,
|
||||
// you can delete it.
|
||||
#[test]
|
||||
fn sane() {
|
||||
let w = super::constants::ExtrinsicBaseWeight::get();
|
||||
|
||||
// At least 10 µs.
|
||||
assert!(
|
||||
w.ref_time() >= 10u64 * constants::WEIGHT_REF_TIME_PER_MICROS,
|
||||
"Weight should be at least 10 µs."
|
||||
);
|
||||
// At most 1 ms.
|
||||
assert!(
|
||||
w.ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS,
|
||||
"Weight should be at most 1 ms."
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Cumulus.
|
||||
|
||||
// Cumulus is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Cumulus is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `frame_system`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-rococo-dev")`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=asset-hub-rococo-dev
|
||||
// --wasm-execution=compiled
|
||||
// --pallet=frame_system
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --extrinsic=*
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --json
|
||||
// --header=./file_header.txt
|
||||
// --output=./parachains/runtimes/assets/asset-hub-rococo/src/weights/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `frame_system`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> frame_system::WeightInfo for WeightInfo<T> {
|
||||
/// The range of component `b` is `[0, 3932160]`.
|
||||
fn remark(b: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_106_000 picoseconds.
|
||||
Weight::from_parts(1_884_213, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 0
|
||||
.saturating_add(Weight::from_parts(388, 0).saturating_mul(b.into()))
|
||||
}
|
||||
/// The range of component `b` is `[0, 3932160]`.
|
||||
fn remark_with_event(b: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 7_528_000 picoseconds.
|
||||
Weight::from_parts(27_081_927, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 7
|
||||
.saturating_add(Weight::from_parts(1_730, 0).saturating_mul(b.into()))
|
||||
}
|
||||
/// Storage: `System::Digest` (r:1 w:1)
|
||||
/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1)
|
||||
/// Proof: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1)
|
||||
fn set_heap_pages() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `1485`
|
||||
// Minimum execution time: 3_882_000 picoseconds.
|
||||
Weight::from_parts(4_149_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1485))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `ParachainSystem::ValidationData` (r:1 w:0)
|
||||
/// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `ParachainSystem::UpgradeRestrictionSignal` (r:1 w:0)
|
||||
/// Proof: `ParachainSystem::UpgradeRestrictionSignal` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `ParachainSystem::PendingValidationCode` (r:1 w:1)
|
||||
/// Proof: `ParachainSystem::PendingValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
|
||||
/// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `ParachainSystem::NewValidationCode` (r:0 w:1)
|
||||
/// Proof: `ParachainSystem::NewValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `ParachainSystem::DidSetValidationCode` (r:0 w:1)
|
||||
/// Proof: `ParachainSystem::DidSetValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
fn set_code() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `119`
|
||||
// Estimated: `1604`
|
||||
// Minimum execution time: 103_389_161_000 picoseconds.
|
||||
Weight::from_parts(106_870_091_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1604))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: `Skipped::Metadata` (r:0 w:0)
|
||||
/// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// The range of component `i` is `[0, 1000]`.
|
||||
fn set_storage(i: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_236_000 picoseconds.
|
||||
Weight::from_parts(2_302_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 2_045
|
||||
.saturating_add(Weight::from_parts(763_456, 0).saturating_mul(i.into()))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into())))
|
||||
}
|
||||
/// Storage: `Skipped::Metadata` (r:0 w:0)
|
||||
/// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// The range of component `i` is `[0, 1000]`.
|
||||
fn kill_storage(i: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_175_000 picoseconds.
|
||||
Weight::from_parts(2_238_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 1_040
|
||||
.saturating_add(Weight::from_parts(571_397, 0).saturating_mul(i.into()))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into())))
|
||||
}
|
||||
/// Storage: `Skipped::Metadata` (r:0 w:0)
|
||||
/// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// The range of component `p` is `[0, 1000]`.
|
||||
fn kill_prefix(p: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `84 + p * (69 ±0)`
|
||||
// Estimated: `80 + p * (70 ±0)`
|
||||
// Minimum execution time: 3_843_000 picoseconds.
|
||||
Weight::from_parts(3_947_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 80))
|
||||
// Standard Error: 2_188
|
||||
.saturating_add(Weight::from_parts(1_212_360, 0).saturating_mul(p.into()))
|
||||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into())))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into())))
|
||||
.saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into()))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Cumulus.
|
||||
|
||||
// Cumulus is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Cumulus is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
pub mod block_weights;
|
||||
pub mod cumulus_pallet_xcmp_queue;
|
||||
pub mod extrinsic_weights;
|
||||
pub mod frame_system;
|
||||
pub mod pallet_asset_conversion;
|
||||
pub mod pallet_assets_foreign;
|
||||
pub mod pallet_assets_local;
|
||||
pub mod pallet_assets_pool;
|
||||
pub mod pallet_balances;
|
||||
pub mod pallet_collator_selection;
|
||||
pub mod pallet_multisig;
|
||||
pub mod pallet_nft_fractionalization;
|
||||
pub mod pallet_nfts;
|
||||
pub mod pallet_proxy;
|
||||
pub mod pallet_session;
|
||||
pub mod pallet_timestamp;
|
||||
pub mod pallet_uniques;
|
||||
pub mod pallet_utility;
|
||||
pub mod pallet_xcm;
|
||||
pub mod pallet_xcm_bridge_hub_router_to_rococo;
|
||||
pub mod pallet_xcm_bridge_hub_router_to_wococo;
|
||||
pub mod paritydb_weights;
|
||||
pub mod rocksdb_weights;
|
||||
pub mod xcm;
|
||||
|
||||
pub use block_weights::constants::BlockExecutionWeight;
|
||||
pub use extrinsic_weights::constants::ExtrinsicBaseWeight;
|
||||
pub use paritydb_weights::constants::ParityDbWeight;
|
||||
pub use rocksdb_weights::constants::RocksDbWeight;
|
||||
+155
@@ -0,0 +1,155 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Cumulus.
|
||||
|
||||
// Cumulus is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Cumulus is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_asset_conversion`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-07-26, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-rococo-dev")`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// target/production/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --extrinsic=*
|
||||
// --wasm-execution=compiled
|
||||
// --heap-pages=4096
|
||||
// --json-file=/builds/parity/mirrors/cumulus/.git/.artifacts/bench.json
|
||||
// --pallet=pallet_asset_conversion
|
||||
// --chain=asset-hub-rococo-dev
|
||||
// --header=./file_header.txt
|
||||
// --output=./parachains/runtimes/assets/asset-hub-rococo/src/weights/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_asset_conversion`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_asset_conversion::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `AssetConversion::Pools` (r:1 w:1)
|
||||
/// Proof: `AssetConversion::Pools` (`max_values`: None, `max_size`: Some(1224), added: 3699, mode: `MaxEncodedLen`)
|
||||
/// Storage: UNKNOWN KEY `0x76a2c49709deec21d9c05f96c1f47351` (r:1 w:0)
|
||||
/// Proof: UNKNOWN KEY `0x76a2c49709deec21d9c05f96c1f47351` (r:1 w:0)
|
||||
/// Storage: `System::Account` (r:2 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ForeignAssets::Account` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ForeignAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
|
||||
/// Storage: `AssetConversion::NextPoolAssetId` (r:1 w:1)
|
||||
/// Proof: `AssetConversion::NextPoolAssetId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
/// Storage: `PoolAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `PoolAssets::Account` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
|
||||
fn create_pool() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `480`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 88_484_000 picoseconds.
|
||||
Weight::from_parts(92_964_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6196))
|
||||
.saturating_add(T::DbWeight::get().reads(9))
|
||||
.saturating_add(T::DbWeight::get().writes(7))
|
||||
}
|
||||
/// Storage: `AssetConversion::Pools` (r:1 w:0)
|
||||
/// Proof: `AssetConversion::Pools` (`max_values`: None, `max_size`: Some(1224), added: 3699, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ForeignAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ForeignAssets::Account` (r:2 w:2)
|
||||
/// Proof: `ForeignAssets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`)
|
||||
/// Storage: `PoolAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `PoolAssets::Account` (r:2 w:2)
|
||||
/// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
|
||||
fn add_liquidity() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1117`
|
||||
// Estimated: `7404`
|
||||
// Minimum execution time: 153_015_000 picoseconds.
|
||||
Weight::from_parts(157_018_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 7404))
|
||||
.saturating_add(T::DbWeight::get().reads(8))
|
||||
.saturating_add(T::DbWeight::get().writes(7))
|
||||
}
|
||||
/// Storage: `AssetConversion::Pools` (r:1 w:0)
|
||||
/// Proof: `AssetConversion::Pools` (`max_values`: None, `max_size`: Some(1224), added: 3699, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ForeignAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ForeignAssets::Account` (r:2 w:2)
|
||||
/// Proof: `ForeignAssets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`)
|
||||
/// Storage: `PoolAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: UNKNOWN KEY `0x2433d831722b1f4aeb1666953f1c0e77` (r:1 w:0)
|
||||
/// Proof: UNKNOWN KEY `0x2433d831722b1f4aeb1666953f1c0e77` (r:1 w:0)
|
||||
/// Storage: `PoolAssets::Account` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
|
||||
fn remove_liquidity() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1106`
|
||||
// Estimated: `7404`
|
||||
// Minimum execution time: 141_726_000 picoseconds.
|
||||
Weight::from_parts(147_865_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 7404))
|
||||
.saturating_add(T::DbWeight::get().reads(8))
|
||||
.saturating_add(T::DbWeight::get().writes(6))
|
||||
}
|
||||
/// Storage: `ForeignAssets::Asset` (r:2 w:2)
|
||||
/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ForeignAssets::Account` (r:4 w:4)
|
||||
/// Proof: `ForeignAssets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:2 w:2)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn swap_exact_tokens_for_tokens() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1148`
|
||||
// Estimated: `13818`
|
||||
// Minimum execution time: 168_619_000 picoseconds.
|
||||
Weight::from_parts(174_283_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 13818))
|
||||
.saturating_add(T::DbWeight::get().reads(8))
|
||||
.saturating_add(T::DbWeight::get().writes(8))
|
||||
}
|
||||
/// Storage: `System::Account` (r:2 w:2)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ForeignAssets::Asset` (r:2 w:2)
|
||||
/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ForeignAssets::Account` (r:4 w:4)
|
||||
/// Proof: `ForeignAssets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`)
|
||||
fn swap_tokens_for_exact_tokens() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1148`
|
||||
// Estimated: `13818`
|
||||
// Minimum execution time: 171_565_000 picoseconds.
|
||||
Weight::from_parts(173_702_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 13818))
|
||||
.saturating_add(T::DbWeight::get().reads(8))
|
||||
.saturating_add(T::DbWeight::get().writes(8))
|
||||
}
|
||||
}
|
||||
+534
@@ -0,0 +1,534 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Cumulus.
|
||||
|
||||
// Cumulus is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Cumulus is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_assets`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-06-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-rococo-dev")`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --heap-pages=4096
|
||||
// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/cumulus/.git/.artifacts/bench.json
|
||||
// --pallet=pallet_assets
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --extrinsic=*
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --json
|
||||
// --header=./file_header.txt
|
||||
// --output=./parachains/runtimes/assets/asset-hub-rococo/src/weights/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_assets`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_assets::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
|
||||
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ForeignAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn create() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `107`
|
||||
// Estimated: `4273`
|
||||
// Minimum execution time: 30_485_000 picoseconds.
|
||||
Weight::from_parts(31_007_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4273))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `ForeignAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
|
||||
fn force_create() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `4`
|
||||
// Estimated: `4273`
|
||||
// Minimum execution time: 12_991_000 picoseconds.
|
||||
Weight::from_parts(13_304_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4273))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `ForeignAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
|
||||
fn start_destroy() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `276`
|
||||
// Estimated: `4273`
|
||||
// Minimum execution time: 15_689_000 picoseconds.
|
||||
Weight::from_parts(16_063_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4273))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: ForeignAssets Asset (r:1 w:1)
|
||||
/// Proof: ForeignAssets Asset (max_values: None, max_size: Some(808), added: 3283, mode: MaxEncodedLen)
|
||||
/// Storage: ForeignAssets Account (r:1001 w:1000)
|
||||
/// Proof: ForeignAssets Account (max_values: None, max_size: Some(732), added: 3207, mode: MaxEncodedLen)
|
||||
/// Storage: System Account (r:1000 w:1000)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// The range of component `c` is `[0, 1000]`.
|
||||
/// The range of component `c` is `[0, 1000]`.
|
||||
fn destroy_accounts(c: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0 + c * (208 ±0)`
|
||||
// Estimated: `4273 + c * (3207 ±0)`
|
||||
// Minimum execution time: 18_533_000 picoseconds.
|
||||
Weight::from_parts(18_791_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4273))
|
||||
// Standard Error: 5_059
|
||||
.saturating_add(Weight::from_parts(12_049_659, 0).saturating_mul(c.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(c.into())))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
.saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(c.into())))
|
||||
.saturating_add(Weight::from_parts(0, 3207).saturating_mul(c.into()))
|
||||
}
|
||||
/// Storage: ForeignAssets Asset (r:1 w:1)
|
||||
/// Proof: ForeignAssets Asset (max_values: None, max_size: Some(808), added: 3283, mode: MaxEncodedLen)
|
||||
/// Storage: ForeignAssets Approvals (r:1001 w:1000)
|
||||
/// Proof: ForeignAssets Approvals (max_values: None, max_size: Some(746), added: 3221, mode: MaxEncodedLen)
|
||||
/// The range of component `a` is `[0, 1000]`.
|
||||
/// The range of component `a` is `[0, 1000]`.
|
||||
fn destroy_approvals(a: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `413 + a * (86 ±0)`
|
||||
// Estimated: `4273 + a * (3221 ±0)`
|
||||
// Minimum execution time: 20_028_000 picoseconds.
|
||||
Weight::from_parts(20_148_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4273))
|
||||
// Standard Error: 3_401
|
||||
.saturating_add(Weight::from_parts(13_897_319, 0).saturating_mul(a.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into())))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(a.into())))
|
||||
.saturating_add(Weight::from_parts(0, 3221).saturating_mul(a.into()))
|
||||
}
|
||||
/// Storage: `ForeignAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ForeignAssets::Metadata` (r:1 w:0)
|
||||
/// Proof: `ForeignAssets::Metadata` (`max_values`: None, `max_size`: Some(738), added: 3213, mode: `MaxEncodedLen`)
|
||||
fn finish_destroy() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `242`
|
||||
// Estimated: `4273`
|
||||
// Minimum execution time: 15_949_000 picoseconds.
|
||||
Weight::from_parts(16_241_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4273))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `ForeignAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ForeignAssets::Account` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`)
|
||||
fn mint() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `242`
|
||||
// Estimated: `4273`
|
||||
// Minimum execution time: 27_156_000 picoseconds.
|
||||
Weight::from_parts(28_182_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4273))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `ForeignAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ForeignAssets::Account` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`)
|
||||
fn burn() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `350`
|
||||
// Estimated: `4273`
|
||||
// Minimum execution time: 33_503_000 picoseconds.
|
||||
Weight::from_parts(33_860_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4273))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `ForeignAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ForeignAssets::Account` (r:2 w:2)
|
||||
/// Proof: `ForeignAssets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn transfer() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `350`
|
||||
// Estimated: `7404`
|
||||
// Minimum execution time: 45_065_000 picoseconds.
|
||||
Weight::from_parts(45_856_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 7404))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: `ForeignAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ForeignAssets::Account` (r:2 w:2)
|
||||
/// Proof: `ForeignAssets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn transfer_keep_alive() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `350`
|
||||
// Estimated: `7404`
|
||||
// Minimum execution time: 39_913_000 picoseconds.
|
||||
Weight::from_parts(40_791_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 7404))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: `ForeignAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ForeignAssets::Account` (r:2 w:2)
|
||||
/// Proof: `ForeignAssets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn force_transfer() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `350`
|
||||
// Estimated: `7404`
|
||||
// Minimum execution time: 45_337_000 picoseconds.
|
||||
Weight::from_parts(45_980_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 7404))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: `ForeignAssets::Asset` (r:1 w:0)
|
||||
/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ForeignAssets::Account` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`)
|
||||
fn freeze() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `350`
|
||||
// Estimated: `4273`
|
||||
// Minimum execution time: 19_012_000 picoseconds.
|
||||
Weight::from_parts(19_326_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4273))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `ForeignAssets::Asset` (r:1 w:0)
|
||||
/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ForeignAssets::Account` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`)
|
||||
fn thaw() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `350`
|
||||
// Estimated: `4273`
|
||||
// Minimum execution time: 18_656_000 picoseconds.
|
||||
Weight::from_parts(19_205_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4273))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `ForeignAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
|
||||
fn freeze_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `276`
|
||||
// Estimated: `4273`
|
||||
// Minimum execution time: 15_440_000 picoseconds.
|
||||
Weight::from_parts(15_825_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4273))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `ForeignAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
|
||||
fn thaw_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `276`
|
||||
// Estimated: `4273`
|
||||
// Minimum execution time: 15_465_000 picoseconds.
|
||||
Weight::from_parts(15_769_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4273))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `ForeignAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ForeignAssets::Metadata` (r:1 w:0)
|
||||
/// Proof: `ForeignAssets::Metadata` (`max_values`: None, `max_size`: Some(738), added: 3213, mode: `MaxEncodedLen`)
|
||||
fn transfer_ownership() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `242`
|
||||
// Estimated: `4273`
|
||||
// Minimum execution time: 16_579_000 picoseconds.
|
||||
Weight::from_parts(16_931_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4273))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `ForeignAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
|
||||
fn set_team() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `242`
|
||||
// Estimated: `4273`
|
||||
// Minimum execution time: 15_138_000 picoseconds.
|
||||
Weight::from_parts(15_435_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4273))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: ForeignAssets Asset (r:1 w:0)
|
||||
/// Proof: ForeignAssets Asset (max_values: None, max_size: Some(808), added: 3283, mode: MaxEncodedLen)
|
||||
/// Storage: ForeignAssets Metadata (r:1 w:1)
|
||||
/// Proof: ForeignAssets Metadata (max_values: None, max_size: Some(738), added: 3213, mode: MaxEncodedLen)
|
||||
/// The range of component `n` is `[0, 50]`.
|
||||
/// The range of component `s` is `[0, 50]`.
|
||||
/// The range of component `n` is `[0, 50]`.
|
||||
/// The range of component `s` is `[0, 50]`.
|
||||
fn set_metadata(_n: u32, _s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `242`
|
||||
// Estimated: `4273`
|
||||
// Minimum execution time: 29_846_000 picoseconds.
|
||||
Weight::from_parts(31_607_649, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4273))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `ForeignAssets::Asset` (r:1 w:0)
|
||||
/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ForeignAssets::Metadata` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Metadata` (`max_values`: None, `max_size`: Some(738), added: 3213, mode: `MaxEncodedLen`)
|
||||
fn clear_metadata() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `406`
|
||||
// Estimated: `4273`
|
||||
// Minimum execution time: 30_582_000 picoseconds.
|
||||
Weight::from_parts(31_008_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4273))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: ForeignAssets Asset (r:1 w:0)
|
||||
/// Proof: ForeignAssets Asset (max_values: None, max_size: Some(808), added: 3283, mode: MaxEncodedLen)
|
||||
/// Storage: ForeignAssets Metadata (r:1 w:1)
|
||||
/// Proof: ForeignAssets Metadata (max_values: None, max_size: Some(738), added: 3213, mode: MaxEncodedLen)
|
||||
/// The range of component `n` is `[0, 50]`.
|
||||
/// The range of component `s` is `[0, 50]`.
|
||||
/// The range of component `n` is `[0, 50]`.
|
||||
/// The range of component `s` is `[0, 50]`.
|
||||
fn force_set_metadata(_n: u32, s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `81`
|
||||
// Estimated: `4273`
|
||||
// Minimum execution time: 14_186_000 picoseconds.
|
||||
Weight::from_parts(14_717_332, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4273))
|
||||
// Standard Error: 517
|
||||
.saturating_add(Weight::from_parts(2_595, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `ForeignAssets::Asset` (r:1 w:0)
|
||||
/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ForeignAssets::Metadata` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Metadata` (`max_values`: None, `max_size`: Some(738), added: 3213, mode: `MaxEncodedLen`)
|
||||
fn force_clear_metadata() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `406`
|
||||
// Estimated: `4273`
|
||||
// Minimum execution time: 29_499_000 picoseconds.
|
||||
Weight::from_parts(29_918_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4273))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `ForeignAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
|
||||
fn force_asset_status() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `242`
|
||||
// Estimated: `4273`
|
||||
// Minimum execution time: 13_815_000 picoseconds.
|
||||
Weight::from_parts(14_138_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4273))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `ForeignAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ForeignAssets::Approvals` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Approvals` (`max_values`: None, `max_size`: Some(746), added: 3221, mode: `MaxEncodedLen`)
|
||||
fn approve_transfer() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `276`
|
||||
// Estimated: `4273`
|
||||
// Minimum execution time: 33_029_000 picoseconds.
|
||||
Weight::from_parts(33_524_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4273))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `ForeignAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ForeignAssets::Approvals` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Approvals` (`max_values`: None, `max_size`: Some(746), added: 3221, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ForeignAssets::Account` (r:2 w:2)
|
||||
/// Proof: `ForeignAssets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn transfer_approved() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `520`
|
||||
// Estimated: `7404`
|
||||
// Minimum execution time: 63_205_000 picoseconds.
|
||||
Weight::from_parts(64_078_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 7404))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
/// Storage: `ForeignAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ForeignAssets::Approvals` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Approvals` (`max_values`: None, `max_size`: Some(746), added: 3221, mode: `MaxEncodedLen`)
|
||||
fn cancel_approval() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `446`
|
||||
// Estimated: `4273`
|
||||
// Minimum execution time: 34_948_000 picoseconds.
|
||||
Weight::from_parts(35_484_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4273))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `ForeignAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ForeignAssets::Approvals` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Approvals` (`max_values`: None, `max_size`: Some(746), added: 3221, mode: `MaxEncodedLen`)
|
||||
fn force_cancel_approval() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `446`
|
||||
// Estimated: `4273`
|
||||
// Minimum execution time: 35_722_000 picoseconds.
|
||||
Weight::from_parts(36_266_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4273))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `ForeignAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
|
||||
fn set_min_balance() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `242`
|
||||
// Estimated: `4273`
|
||||
// Minimum execution time: 15_855_000 picoseconds.
|
||||
Weight::from_parts(16_182_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4273))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `ForeignAssets::Account` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ForeignAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn touch() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `345`
|
||||
// Estimated: `4273`
|
||||
// Minimum execution time: 34_984_000 picoseconds.
|
||||
Weight::from_parts(35_512_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4273))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: `ForeignAssets::Account` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ForeignAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
|
||||
fn touch_other() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `242`
|
||||
// Estimated: `4273`
|
||||
// Minimum execution time: 33_041_000 picoseconds.
|
||||
Weight::from_parts(34_124_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4273))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `ForeignAssets::Account` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ForeignAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn refund() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `471`
|
||||
// Estimated: `4273`
|
||||
// Minimum execution time: 31_728_000 picoseconds.
|
||||
Weight::from_parts(32_012_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4273))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: `ForeignAssets::Account` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ForeignAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
|
||||
fn refund_other() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `401`
|
||||
// Estimated: `4273`
|
||||
// Minimum execution time: 29_432_000 picoseconds.
|
||||
Weight::from_parts(29_968_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4273))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `ForeignAssets::Asset` (r:1 w:0)
|
||||
/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ForeignAssets::Account` (r:1 w:1)
|
||||
/// Proof: `ForeignAssets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`)
|
||||
fn block() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `350`
|
||||
// Estimated: `4273`
|
||||
// Minimum execution time: 18_827_000 picoseconds.
|
||||
Weight::from_parts(19_172_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4273))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
+531
@@ -0,0 +1,531 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Cumulus.
|
||||
|
||||
// Cumulus is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Cumulus is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_assets`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-rococo-dev")`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=asset-hub-rococo-dev
|
||||
// --wasm-execution=compiled
|
||||
// --pallet=pallet_assets
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --extrinsic=*
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --json
|
||||
// --header=./file_header.txt
|
||||
// --output=./parachains/runtimes/assets/asset-hub-rococo/src/weights/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_assets`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_assets::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `Assets::Asset` (r:1 w:1)
|
||||
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn create() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `109`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 26_510_000 picoseconds.
|
||||
Weight::from_parts(27_332_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Assets::Asset` (r:1 w:1)
|
||||
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
fn force_create() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `6`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 10_899_000 picoseconds.
|
||||
Weight::from_parts(11_395_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Assets::Asset` (r:1 w:1)
|
||||
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
fn start_destroy() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `277`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 13_593_000 picoseconds.
|
||||
Weight::from_parts(14_108_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Assets::Asset` (r:1 w:1)
|
||||
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Assets::Account` (r:1001 w:1000)
|
||||
/// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1000 w:1000)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// The range of component `c` is `[0, 1000]`.
|
||||
/// The range of component `c` is `[0, 1000]`.
|
||||
fn destroy_accounts(c: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0 + c * (208 ±0)`
|
||||
// Estimated: `3675 + c * (2609 ±0)`
|
||||
// Minimum execution time: 16_216_000 picoseconds.
|
||||
Weight::from_parts(16_636_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
// Standard Error: 9_346
|
||||
.saturating_add(Weight::from_parts(15_306_152, 0).saturating_mul(c.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(c.into())))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
.saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(c.into())))
|
||||
.saturating_add(Weight::from_parts(0, 2609).saturating_mul(c.into()))
|
||||
}
|
||||
/// Storage: `Assets::Asset` (r:1 w:1)
|
||||
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Assets::Approvals` (r:1001 w:1000)
|
||||
/// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(148), added: 2623, mode: `MaxEncodedLen`)
|
||||
/// The range of component `a` is `[0, 1000]`.
|
||||
/// The range of component `a` is `[0, 1000]`.
|
||||
fn destroy_approvals(a: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `414 + a * (86 ±0)`
|
||||
// Estimated: `3675 + a * (2623 ±0)`
|
||||
// Minimum execution time: 16_745_000 picoseconds.
|
||||
Weight::from_parts(17_247_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(Weight::from_parts(15_634_963, 0).saturating_mul(a.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into())))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
.saturating_add(Weight::from_parts(0, 2623).saturating_mul(a.into()))
|
||||
}
|
||||
/// Storage: `Assets::Asset` (r:1 w:1)
|
||||
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Assets::Metadata` (r:1 w:0)
|
||||
/// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`)
|
||||
fn finish_destroy() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `243`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 13_650_000 picoseconds.
|
||||
Weight::from_parts(14_721_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Assets::Asset` (r:1 w:1)
|
||||
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Assets::Account` (r:1 w:1)
|
||||
/// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
|
||||
fn mint() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `243`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 24_121_000 picoseconds.
|
||||
Weight::from_parts(25_023_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Assets::Asset` (r:1 w:1)
|
||||
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Assets::Account` (r:1 w:1)
|
||||
/// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
|
||||
fn burn() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `351`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 31_414_000 picoseconds.
|
||||
Weight::from_parts(32_235_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Assets::Asset` (r:1 w:1)
|
||||
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Assets::Account` (r:2 w:2)
|
||||
/// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn transfer() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `351`
|
||||
// Estimated: `6208`
|
||||
// Minimum execution time: 43_114_000 picoseconds.
|
||||
Weight::from_parts(44_106_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6208))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: `Assets::Asset` (r:1 w:1)
|
||||
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Assets::Account` (r:2 w:2)
|
||||
/// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn transfer_keep_alive() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `351`
|
||||
// Estimated: `6208`
|
||||
// Minimum execution time: 37_954_000 picoseconds.
|
||||
Weight::from_parts(38_772_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6208))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: `Assets::Asset` (r:1 w:1)
|
||||
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Assets::Account` (r:2 w:2)
|
||||
/// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn force_transfer() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `351`
|
||||
// Estimated: `6208`
|
||||
// Minimum execution time: 43_051_000 picoseconds.
|
||||
Weight::from_parts(44_003_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6208))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: `Assets::Asset` (r:1 w:0)
|
||||
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Assets::Account` (r:1 w:1)
|
||||
/// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
|
||||
fn freeze() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `351`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 17_048_000 picoseconds.
|
||||
Weight::from_parts(17_614_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Assets::Asset` (r:1 w:0)
|
||||
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Assets::Account` (r:1 w:1)
|
||||
/// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
|
||||
fn thaw() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `351`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 16_705_000 picoseconds.
|
||||
Weight::from_parts(17_581_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Assets::Asset` (r:1 w:1)
|
||||
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
fn freeze_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `277`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 13_284_000 picoseconds.
|
||||
Weight::from_parts(13_735_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Assets::Asset` (r:1 w:1)
|
||||
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
fn thaw_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `277`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 13_030_000 picoseconds.
|
||||
Weight::from_parts(13_417_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Assets::Asset` (r:1 w:1)
|
||||
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Assets::Metadata` (r:1 w:0)
|
||||
/// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`)
|
||||
fn transfer_ownership() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `243`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 14_174_000 picoseconds.
|
||||
Weight::from_parts(14_660_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Assets::Asset` (r:1 w:1)
|
||||
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
fn set_team() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `243`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 12_737_000 picoseconds.
|
||||
Weight::from_parts(13_172_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Assets::Asset` (r:1 w:0)
|
||||
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Assets::Metadata` (r:1 w:1)
|
||||
/// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`)
|
||||
/// The range of component `n` is `[0, 50]`.
|
||||
/// The range of component `s` is `[0, 50]`.
|
||||
/// The range of component `n` is `[0, 50]`.
|
||||
/// The range of component `s` is `[0, 50]`.
|
||||
fn set_metadata(n: u32, s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `243`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 27_707_000 picoseconds.
|
||||
Weight::from_parts(29_036_880, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
// Standard Error: 688
|
||||
.saturating_add(Weight::from_parts(2_426, 0).saturating_mul(n.into()))
|
||||
// Standard Error: 688
|
||||
.saturating_add(Weight::from_parts(776, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Assets::Asset` (r:1 w:0)
|
||||
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Assets::Metadata` (r:1 w:1)
|
||||
/// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`)
|
||||
fn clear_metadata() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `407`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 28_514_000 picoseconds.
|
||||
Weight::from_parts(29_216_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Assets::Asset` (r:1 w:0)
|
||||
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Assets::Metadata` (r:1 w:1)
|
||||
/// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`)
|
||||
/// The range of component `n` is `[0, 50]`.
|
||||
/// The range of component `s` is `[0, 50]`.
|
||||
/// The range of component `n` is `[0, 50]`.
|
||||
/// The range of component `s` is `[0, 50]`.
|
||||
fn force_set_metadata(n: u32, s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `82`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 12_452_000 picoseconds.
|
||||
Weight::from_parts(13_095_356, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
// Standard Error: 275
|
||||
.saturating_add(Weight::from_parts(826, 0).saturating_mul(n.into()))
|
||||
// Standard Error: 275
|
||||
.saturating_add(Weight::from_parts(808, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Assets::Asset` (r:1 w:0)
|
||||
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Assets::Metadata` (r:1 w:1)
|
||||
/// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`)
|
||||
fn force_clear_metadata() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `407`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 28_181_000 picoseconds.
|
||||
Weight::from_parts(29_050_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Assets::Asset` (r:1 w:1)
|
||||
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
fn force_asset_status() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `243`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 12_253_000 picoseconds.
|
||||
Weight::from_parts(12_545_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Assets::Asset` (r:1 w:1)
|
||||
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Assets::Approvals` (r:1 w:1)
|
||||
/// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(148), added: 2623, mode: `MaxEncodedLen`)
|
||||
fn approve_transfer() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `277`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 31_084_000 picoseconds.
|
||||
Weight::from_parts(32_052_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Assets::Asset` (r:1 w:1)
|
||||
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Assets::Approvals` (r:1 w:1)
|
||||
/// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(148), added: 2623, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Assets::Account` (r:2 w:2)
|
||||
/// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn transfer_approved() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `521`
|
||||
// Estimated: `6208`
|
||||
// Minimum execution time: 61_756_000 picoseconds.
|
||||
Weight::from_parts(62_740_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6208))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
/// Storage: `Assets::Asset` (r:1 w:1)
|
||||
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Assets::Approvals` (r:1 w:1)
|
||||
/// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(148), added: 2623, mode: `MaxEncodedLen`)
|
||||
fn cancel_approval() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `447`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 33_370_000 picoseconds.
|
||||
Weight::from_parts(34_127_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Assets::Asset` (r:1 w:1)
|
||||
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Assets::Approvals` (r:1 w:1)
|
||||
/// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(148), added: 2623, mode: `MaxEncodedLen`)
|
||||
fn force_cancel_approval() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `447`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 33_753_000 picoseconds.
|
||||
Weight::from_parts(34_613_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Assets::Asset` (r:1 w:1)
|
||||
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
fn set_min_balance() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `243`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 13_508_000 picoseconds.
|
||||
Weight::from_parts(13_997_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Assets::Account` (r:1 w:1)
|
||||
/// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Assets::Asset` (r:1 w:1)
|
||||
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn touch() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `346`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 32_578_000 picoseconds.
|
||||
Weight::from_parts(33_675_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: `Assets::Account` (r:1 w:1)
|
||||
/// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Assets::Asset` (r:1 w:1)
|
||||
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
fn touch_other() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `243`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 30_768_000 picoseconds.
|
||||
Weight::from_parts(31_710_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Assets::Account` (r:1 w:1)
|
||||
/// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Assets::Asset` (r:1 w:1)
|
||||
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn refund() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `472`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 30_028_000 picoseconds.
|
||||
Weight::from_parts(30_793_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: `Assets::Account` (r:1 w:1)
|
||||
/// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Assets::Asset` (r:1 w:1)
|
||||
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
fn refund_other() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `402`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 28_354_000 picoseconds.
|
||||
Weight::from_parts(29_097_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Assets::Asset` (r:1 w:0)
|
||||
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Assets::Account` (r:1 w:1)
|
||||
/// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
|
||||
fn block() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `351`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 16_607_000 picoseconds.
|
||||
Weight::from_parts(17_433_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
+531
@@ -0,0 +1,531 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Cumulus.
|
||||
|
||||
// Cumulus is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Cumulus is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_assets`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-07-27, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-rococo-dev")`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// target/production/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --extrinsic=*
|
||||
// --wasm-execution=compiled
|
||||
// --heap-pages=4096
|
||||
// --json-file=/builds/parity/mirrors/cumulus/.git/.artifacts/bench.json
|
||||
// --pallet=pallet_assets
|
||||
// --chain=asset-hub-rococo-dev
|
||||
// --header=./file_header.txt
|
||||
// --output=./parachains/runtimes/assets/asset-hub-rococo/src/weights/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_assets`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_assets::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `PoolAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
fn create() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `42`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 11_591_000 picoseconds.
|
||||
Weight::from_parts(11_901_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `PoolAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
fn force_create() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `42`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 11_184_000 picoseconds.
|
||||
Weight::from_parts(11_640_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `PoolAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
fn start_destroy() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `314`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 13_809_000 picoseconds.
|
||||
Weight::from_parts(14_226_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `PoolAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `PoolAssets::Account` (r:1001 w:1000)
|
||||
/// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1000 w:1000)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// The range of component `c` is `[0, 1000]`.
|
||||
/// The range of component `c` is `[0, 1000]`.
|
||||
/// The range of component `c` is `[0, 1000]`.
|
||||
fn destroy_accounts(c: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0 + c * (208 ±0)`
|
||||
// Estimated: `3675 + c * (2609 ±0)`
|
||||
// Minimum execution time: 16_439_000 picoseconds.
|
||||
Weight::from_parts(16_743_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
// Standard Error: 4_792
|
||||
.saturating_add(Weight::from_parts(14_463_991, 0).saturating_mul(c.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(c.into())))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
.saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(c.into())))
|
||||
.saturating_add(Weight::from_parts(0, 2609).saturating_mul(c.into()))
|
||||
}
|
||||
/// Storage: `PoolAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `PoolAssets::Approvals` (r:1001 w:1000)
|
||||
/// Proof: `PoolAssets::Approvals` (`max_values`: None, `max_size`: Some(148), added: 2623, mode: `MaxEncodedLen`)
|
||||
/// The range of component `a` is `[0, 1000]`.
|
||||
/// The range of component `a` is `[0, 1000]`.
|
||||
/// The range of component `a` is `[0, 1000]`.
|
||||
fn destroy_approvals(a: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `451 + a * (86 ±0)`
|
||||
// Estimated: `3675 + a * (2623 ±0)`
|
||||
// Minimum execution time: 17_218_000 picoseconds.
|
||||
Weight::from_parts(17_585_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
// Standard Error: 2_056
|
||||
.saturating_add(Weight::from_parts(5_323_866, 0).saturating_mul(a.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into())))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(a.into())))
|
||||
.saturating_add(Weight::from_parts(0, 2623).saturating_mul(a.into()))
|
||||
}
|
||||
/// Storage: `PoolAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `PoolAssets::Metadata` (r:1 w:0)
|
||||
/// Proof: `PoolAssets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`)
|
||||
fn finish_destroy() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `280`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 13_848_000 picoseconds.
|
||||
Weight::from_parts(14_325_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `PoolAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `PoolAssets::Account` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
|
||||
fn mint() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `280`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 24_904_000 picoseconds.
|
||||
Weight::from_parts(25_607_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `PoolAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `PoolAssets::Account` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
|
||||
fn burn() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `388`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 31_477_000 picoseconds.
|
||||
Weight::from_parts(32_338_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `PoolAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `PoolAssets::Account` (r:2 w:2)
|
||||
/// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn transfer() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `388`
|
||||
// Estimated: `6208`
|
||||
// Minimum execution time: 42_994_000 picoseconds.
|
||||
Weight::from_parts(44_041_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6208))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: `PoolAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `PoolAssets::Account` (r:2 w:2)
|
||||
/// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn transfer_keep_alive() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `388`
|
||||
// Estimated: `6208`
|
||||
// Minimum execution time: 37_551_000 picoseconds.
|
||||
Weight::from_parts(38_648_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6208))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: `PoolAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `PoolAssets::Account` (r:2 w:2)
|
||||
/// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn force_transfer() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `388`
|
||||
// Estimated: `6208`
|
||||
// Minimum execution time: 42_829_000 picoseconds.
|
||||
Weight::from_parts(44_029_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6208))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: `PoolAssets::Asset` (r:1 w:0)
|
||||
/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `PoolAssets::Account` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
|
||||
fn freeze() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `388`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 17_304_000 picoseconds.
|
||||
Weight::from_parts(17_782_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `PoolAssets::Asset` (r:1 w:0)
|
||||
/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `PoolAssets::Account` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
|
||||
fn thaw() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `388`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 17_040_000 picoseconds.
|
||||
Weight::from_parts(17_698_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `PoolAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
fn freeze_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `314`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 13_238_000 picoseconds.
|
||||
Weight::from_parts(13_810_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `PoolAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
fn thaw_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `314`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 13_034_000 picoseconds.
|
||||
Weight::from_parts(13_603_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `PoolAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `PoolAssets::Metadata` (r:1 w:0)
|
||||
/// Proof: `PoolAssets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`)
|
||||
fn transfer_ownership() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `280`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 14_357_000 picoseconds.
|
||||
Weight::from_parts(14_774_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `PoolAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
fn set_team() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `280`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 13_040_000 picoseconds.
|
||||
Weight::from_parts(13_616_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `PoolAssets::Asset` (r:1 w:0)
|
||||
/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `PoolAssets::Metadata` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`)
|
||||
/// The range of component `n` is `[0, 50]`.
|
||||
/// The range of component `s` is `[0, 50]`.
|
||||
/// The range of component `n` is `[0, 50]`.
|
||||
/// The range of component `s` is `[0, 50]`.
|
||||
/// The range of component `n` is `[0, 50]`.
|
||||
/// The range of component `s` is `[0, 50]`.
|
||||
fn set_metadata(n: u32, s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `280`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 15_274_000 picoseconds.
|
||||
Weight::from_parts(16_096_881, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
// Standard Error: 239
|
||||
.saturating_add(Weight::from_parts(1_631, 0).saturating_mul(n.into()))
|
||||
// Standard Error: 239
|
||||
.saturating_add(Weight::from_parts(2_334, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `PoolAssets::Asset` (r:1 w:0)
|
||||
/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `PoolAssets::Metadata` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`)
|
||||
fn clear_metadata() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `444`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 15_900_000 picoseconds.
|
||||
Weight::from_parts(16_526_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `PoolAssets::Asset` (r:1 w:0)
|
||||
/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `PoolAssets::Metadata` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`)
|
||||
/// The range of component `n` is `[0, 50]`.
|
||||
/// The range of component `s` is `[0, 50]`.
|
||||
/// The range of component `n` is `[0, 50]`.
|
||||
/// The range of component `s` is `[0, 50]`.
|
||||
/// The range of component `n` is `[0, 50]`.
|
||||
/// The range of component `s` is `[0, 50]`.
|
||||
fn force_set_metadata(n: u32, s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `119`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 13_391_000 picoseconds.
|
||||
Weight::from_parts(14_047_176, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
// Standard Error: 172
|
||||
.saturating_add(Weight::from_parts(2_617, 0).saturating_mul(n.into()))
|
||||
// Standard Error: 172
|
||||
.saturating_add(Weight::from_parts(2_081, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `PoolAssets::Asset` (r:1 w:0)
|
||||
/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `PoolAssets::Metadata` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`)
|
||||
fn force_clear_metadata() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `444`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 15_794_000 picoseconds.
|
||||
Weight::from_parts(16_279_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `PoolAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
fn force_asset_status() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `280`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 12_538_000 picoseconds.
|
||||
Weight::from_parts(13_080_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `PoolAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `PoolAssets::Approvals` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Approvals` (`max_values`: None, `max_size`: Some(148), added: 2623, mode: `MaxEncodedLen`)
|
||||
fn approve_transfer() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `314`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 18_991_000 picoseconds.
|
||||
Weight::from_parts(19_812_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `PoolAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `PoolAssets::Approvals` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Approvals` (`max_values`: None, `max_size`: Some(148), added: 2623, mode: `MaxEncodedLen`)
|
||||
/// Storage: `PoolAssets::Account` (r:2 w:2)
|
||||
/// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn transfer_approved() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `558`
|
||||
// Estimated: `6208`
|
||||
// Minimum execution time: 50_336_000 picoseconds.
|
||||
Weight::from_parts(51_441_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6208))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
/// Storage: `PoolAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `PoolAssets::Approvals` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Approvals` (`max_values`: None, `max_size`: Some(148), added: 2623, mode: `MaxEncodedLen`)
|
||||
fn cancel_approval() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `484`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 21_195_000 picoseconds.
|
||||
Weight::from_parts(21_946_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `PoolAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `PoolAssets::Approvals` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Approvals` (`max_values`: None, `max_size`: Some(148), added: 2623, mode: `MaxEncodedLen`)
|
||||
fn force_cancel_approval() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `484`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 21_568_000 picoseconds.
|
||||
Weight::from_parts(22_366_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `PoolAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
fn set_min_balance() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `280`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 13_690_000 picoseconds.
|
||||
Weight::from_parts(14_086_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `PoolAssets::Account` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
|
||||
/// Storage: `PoolAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
fn touch() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `280`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 18_240_000 picoseconds.
|
||||
Weight::from_parts(19_000_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `PoolAssets::Account` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
|
||||
/// Storage: `PoolAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
fn touch_other() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `280`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 18_469_000 picoseconds.
|
||||
Weight::from_parts(19_040_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `PoolAssets::Account` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
|
||||
/// Storage: `PoolAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
fn refund() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `406`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 14_633_000 picoseconds.
|
||||
Weight::from_parts(15_296_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `PoolAssets::Account` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
|
||||
/// Storage: `PoolAssets::Asset` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
fn refund_other() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `439`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 14_751_000 picoseconds.
|
||||
Weight::from_parts(15_312_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `PoolAssets::Asset` (r:1 w:0)
|
||||
/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `PoolAssets::Account` (r:1 w:1)
|
||||
/// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
|
||||
fn block() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `388`
|
||||
// Estimated: `3675`
|
||||
// Minimum execution time: 16_930_000 picoseconds.
|
||||
Weight::from_parts(17_653_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3675))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,153 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Cumulus.
|
||||
|
||||
// Cumulus is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Cumulus is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_balances`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-rococo-dev")`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=asset-hub-rococo-dev
|
||||
// --wasm-execution=compiled
|
||||
// --pallet=pallet_balances
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --extrinsic=*
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --json
|
||||
// --header=./file_header.txt
|
||||
// --output=./parachains/runtimes/assets/asset-hub-rococo/src/weights/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_balances`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn transfer_allow_death() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 55_040_000 picoseconds.
|
||||
Weight::from_parts(56_106_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn transfer_keep_alive() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 41_342_000 picoseconds.
|
||||
Weight::from_parts(41_890_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn force_set_balance_creating() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `103`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 14_723_000 picoseconds.
|
||||
Weight::from_parts(15_182_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn force_set_balance_killing() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `103`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 22_073_000 picoseconds.
|
||||
Weight::from_parts(22_638_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `System::Account` (r:2 w:2)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn force_transfer() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `103`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 57_265_000 picoseconds.
|
||||
Weight::from_parts(58_222_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6196))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn transfer_all() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 51_485_000 picoseconds.
|
||||
Weight::from_parts(52_003_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn force_unreserve() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `103`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 17_460_000 picoseconds.
|
||||
Weight::from_parts(17_849_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `System::Account` (r:999 w:999)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// The range of component `u` is `[1, 1000]`.
|
||||
fn upgrade_accounts(u: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0 + u * (136 ±0)`
|
||||
// Estimated: `990 + u * (2603 ±0)`
|
||||
// Minimum execution time: 17_259_000 picoseconds.
|
||||
Weight::from_parts(17_478_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 990))
|
||||
// Standard Error: 16_756
|
||||
.saturating_add(Weight::from_parts(15_291_954, 0).saturating_mul(u.into()))
|
||||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into())))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into())))
|
||||
.saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into()))
|
||||
}
|
||||
}
|
||||
+225
@@ -0,0 +1,225 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Cumulus.
|
||||
|
||||
// Cumulus is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Cumulus is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_collator_selection`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-rococo-dev")`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=asset-hub-rococo-dev
|
||||
// --wasm-execution=compiled
|
||||
// --pallet=pallet_collator_selection
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --extrinsic=*
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --json
|
||||
// --header=./file_header.txt
|
||||
// --output=./parachains/runtimes/assets/asset-hub-rococo/src/weights/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_collator_selection`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_collator_selection::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `Session::NextKeys` (r:20 w:0)
|
||||
/// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `CollatorSelection::Invulnerables` (r:0 w:1)
|
||||
/// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
|
||||
/// The range of component `b` is `[1, 20]`.
|
||||
fn set_invulnerables(b: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `163 + b * (79 ±0)`
|
||||
// Estimated: `1154 + b * (2555 ±0)`
|
||||
// Minimum execution time: 15_408_000 picoseconds.
|
||||
Weight::from_parts(13_068_592, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1154))
|
||||
// Standard Error: 7_395
|
||||
.saturating_add(Weight::from_parts(3_219_916, 0).saturating_mul(b.into()))
|
||||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(b.into())))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
.saturating_add(Weight::from_parts(0, 2555).saturating_mul(b.into()))
|
||||
}
|
||||
/// Storage: `Session::NextKeys` (r:1 w:0)
|
||||
/// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `CollatorSelection::Invulnerables` (r:1 w:1)
|
||||
/// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
|
||||
/// Storage: `CollatorSelection::Candidates` (r:1 w:1)
|
||||
/// Proof: `CollatorSelection::Candidates` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// The range of component `b` is `[1, 19]`.
|
||||
/// The range of component `c` is `[1, 99]`.
|
||||
fn add_invulnerable(b: u32, c: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `756 + b * (32 ±0) + c * (53 ±0)`
|
||||
// Estimated: `6287 + b * (37 ±0) + c * (53 ±0)`
|
||||
// Minimum execution time: 49_692_000 picoseconds.
|
||||
Weight::from_parts(51_768_986, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6287))
|
||||
// Standard Error: 18_404
|
||||
.saturating_add(Weight::from_parts(55_676, 0).saturating_mul(b.into()))
|
||||
// Standard Error: 3_488
|
||||
.saturating_add(Weight::from_parts(184_343, 0).saturating_mul(c.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
.saturating_add(Weight::from_parts(0, 37).saturating_mul(b.into()))
|
||||
.saturating_add(Weight::from_parts(0, 53).saturating_mul(c.into()))
|
||||
}
|
||||
/// Storage: `CollatorSelection::Candidates` (r:1 w:0)
|
||||
/// Proof: `CollatorSelection::Candidates` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
|
||||
/// Storage: `CollatorSelection::Invulnerables` (r:1 w:1)
|
||||
/// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
|
||||
/// The range of component `b` is `[5, 20]`.
|
||||
fn remove_invulnerable(b: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `119 + b * (32 ±0)`
|
||||
// Estimated: `6287`
|
||||
// Minimum execution time: 16_486_000 picoseconds.
|
||||
Weight::from_parts(16_646_017, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6287))
|
||||
// Standard Error: 3_230
|
||||
.saturating_add(Weight::from_parts(148_941, 0).saturating_mul(b.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `CollatorSelection::DesiredCandidates` (r:0 w:1)
|
||||
/// Proof: `CollatorSelection::DesiredCandidates` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
fn set_desired_candidates() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 7_806_000 picoseconds.
|
||||
Weight::from_parts(8_002_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `CollatorSelection::CandidacyBond` (r:0 w:1)
|
||||
/// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
|
||||
fn set_candidacy_bond() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 7_937_000 picoseconds.
|
||||
Weight::from_parts(8_161_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `CollatorSelection::Candidates` (r:1 w:1)
|
||||
/// Proof: `CollatorSelection::Candidates` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
|
||||
/// Storage: `CollatorSelection::DesiredCandidates` (r:1 w:0)
|
||||
/// Proof: `CollatorSelection::DesiredCandidates` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
/// Storage: `CollatorSelection::Invulnerables` (r:1 w:0)
|
||||
/// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Session::NextKeys` (r:1 w:0)
|
||||
/// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0)
|
||||
/// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
|
||||
/// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1)
|
||||
/// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
|
||||
/// The range of component `c` is `[1, 99]`.
|
||||
fn register_as_candidate(c: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `736 + c * (52 ±0)`
|
||||
// Estimated: `6287 + c * (54 ±0)`
|
||||
// Minimum execution time: 42_805_000 picoseconds.
|
||||
Weight::from_parts(45_979_502, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6287))
|
||||
// Standard Error: 2_336
|
||||
.saturating_add(Weight::from_parts(221_049, 0).saturating_mul(c.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
.saturating_add(Weight::from_parts(0, 54).saturating_mul(c.into()))
|
||||
}
|
||||
/// Storage: `CollatorSelection::Candidates` (r:1 w:1)
|
||||
/// Proof: `CollatorSelection::Candidates` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
|
||||
/// Storage: `CollatorSelection::Invulnerables` (r:1 w:0)
|
||||
/// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
|
||||
/// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1)
|
||||
/// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
|
||||
/// The range of component `c` is `[4, 100]`.
|
||||
fn leave_intent(c: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `306 + c * (50 ±0)`
|
||||
// Estimated: `6287`
|
||||
// Minimum execution time: 34_814_000 picoseconds.
|
||||
Weight::from_parts(36_371_520, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6287))
|
||||
// Standard Error: 2_391
|
||||
.saturating_add(Weight::from_parts(201_700, 0).saturating_mul(c.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `System::Account` (r:2 w:2)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::BlockWeight` (r:1 w:1)
|
||||
/// Proof: `System::BlockWeight` (`max_values`: Some(1), `max_size`: Some(48), added: 543, mode: `MaxEncodedLen`)
|
||||
/// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1)
|
||||
/// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
|
||||
fn note_author() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `103`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 46_989_000 picoseconds.
|
||||
Weight::from_parts(48_151_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6196))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: `CollatorSelection::Candidates` (r:1 w:0)
|
||||
/// Proof: `CollatorSelection::Candidates` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
|
||||
/// Storage: `CollatorSelection::LastAuthoredBlock` (r:100 w:0)
|
||||
/// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
|
||||
/// Storage: `CollatorSelection::Invulnerables` (r:1 w:0)
|
||||
/// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::BlockWeight` (r:1 w:1)
|
||||
/// Proof: `System::BlockWeight` (`max_values`: Some(1), `max_size`: Some(48), added: 543, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:97 w:97)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// The range of component `r` is `[1, 100]`.
|
||||
/// The range of component `c` is `[1, 100]`.
|
||||
fn new_session(r: u32, c: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `2243 + c * (97 ±0) + r * (112 ±0)`
|
||||
// Estimated: `6287 + c * (2519 ±0) + r * (2603 ±0)`
|
||||
// Minimum execution time: 17_547_000 picoseconds.
|
||||
Weight::from_parts(17_854_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6287))
|
||||
// Standard Error: 370_637
|
||||
.saturating_add(Weight::from_parts(15_798_857, 0).saturating_mul(c.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into())))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into())))
|
||||
.saturating_add(Weight::from_parts(0, 2519).saturating_mul(c.into()))
|
||||
.saturating_add(Weight::from_parts(0, 2603).saturating_mul(r.into()))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,165 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Cumulus.
|
||||
|
||||
// Cumulus is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Cumulus is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_multisig`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-rococo-dev")`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=asset-hub-rococo-dev
|
||||
// --wasm-execution=compiled
|
||||
// --pallet=pallet_multisig
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --extrinsic=*
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --json
|
||||
// --header=./file_header.txt
|
||||
// --output=./parachains/runtimes/assets/asset-hub-rococo/src/weights/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_multisig`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
|
||||
/// The range of component `z` is `[0, 10000]`.
|
||||
fn as_multi_threshold_1(z: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 13_714_000 picoseconds.
|
||||
Weight::from_parts(14_440_231, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 5
|
||||
.saturating_add(Weight::from_parts(598, 0).saturating_mul(z.into()))
|
||||
}
|
||||
/// Storage: `Multisig::Multisigs` (r:1 w:1)
|
||||
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
|
||||
/// The range of component `s` is `[2, 100]`.
|
||||
/// The range of component `z` is `[0, 10000]`.
|
||||
fn as_multi_create(s: u32, z: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `262 + s * (2 ±0)`
|
||||
// Estimated: `6811`
|
||||
// Minimum execution time: 44_768_000 picoseconds.
|
||||
Weight::from_parts(33_662_218, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6811))
|
||||
// Standard Error: 1_633
|
||||
.saturating_add(Weight::from_parts(128_927, 0).saturating_mul(s.into()))
|
||||
// Standard Error: 16
|
||||
.saturating_add(Weight::from_parts(1_543, 0).saturating_mul(z.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Multisig::Multisigs` (r:1 w:1)
|
||||
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
|
||||
/// The range of component `s` is `[3, 100]`.
|
||||
/// The range of component `z` is `[0, 10000]`.
|
||||
fn as_multi_approve(s: u32, z: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `282`
|
||||
// Estimated: `6811`
|
||||
// Minimum execution time: 29_745_000 picoseconds.
|
||||
Weight::from_parts(20_559_891, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6811))
|
||||
// Standard Error: 914
|
||||
.saturating_add(Weight::from_parts(103_601, 0).saturating_mul(s.into()))
|
||||
// Standard Error: 8
|
||||
.saturating_add(Weight::from_parts(1_504, 0).saturating_mul(z.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Multisig::Multisigs` (r:1 w:1)
|
||||
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// The range of component `s` is `[2, 100]`.
|
||||
/// The range of component `z` is `[0, 10000]`.
|
||||
fn as_multi_complete(s: u32, z: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `385 + s * (33 ±0)`
|
||||
// Estimated: `6811`
|
||||
// Minimum execution time: 51_506_000 picoseconds.
|
||||
Weight::from_parts(36_510_777, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6811))
|
||||
// Standard Error: 2_183
|
||||
.saturating_add(Weight::from_parts(183_764, 0).saturating_mul(s.into()))
|
||||
// Standard Error: 21
|
||||
.saturating_add(Weight::from_parts(1_653, 0).saturating_mul(z.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Multisig::Multisigs` (r:1 w:1)
|
||||
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
|
||||
/// The range of component `s` is `[2, 100]`.
|
||||
fn approve_as_multi_create(s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `263 + s * (2 ±0)`
|
||||
// Estimated: `6811`
|
||||
// Minimum execution time: 31_072_000 picoseconds.
|
||||
Weight::from_parts(32_408_621, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6811))
|
||||
// Standard Error: 913
|
||||
.saturating_add(Weight::from_parts(121_410, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Multisig::Multisigs` (r:1 w:1)
|
||||
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
|
||||
/// The range of component `s` is `[2, 100]`.
|
||||
fn approve_as_multi_approve(s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `282`
|
||||
// Estimated: `6811`
|
||||
// Minimum execution time: 18_301_000 picoseconds.
|
||||
Weight::from_parts(18_223_547, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6811))
|
||||
// Standard Error: 747
|
||||
.saturating_add(Weight::from_parts(114_584, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Multisig::Multisigs` (r:1 w:1)
|
||||
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
|
||||
/// The range of component `s` is `[2, 100]`.
|
||||
fn cancel_as_multi(s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `454 + s * (1 ±0)`
|
||||
// Estimated: `6811`
|
||||
// Minimum execution time: 32_107_000 picoseconds.
|
||||
Weight::from_parts(33_674_827, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6811))
|
||||
// Standard Error: 1_220
|
||||
.saturating_add(Weight::from_parts(122_011, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
+115
@@ -0,0 +1,115 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Cumulus.
|
||||
|
||||
// Cumulus is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Cumulus is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_nft_fractionalization`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-rococo-dev")`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=asset-hub-rococo-dev
|
||||
// --wasm-execution=compiled
|
||||
// --pallet=pallet_nft_fractionalization
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --extrinsic=*
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --json
|
||||
// --header=./file_header.txt
|
||||
// --output=./parachains/runtimes/assets/asset-hub-rococo/src/weights/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_nft_fractionalization`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_nft_fractionalization::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `Nfts::Item` (r:1 w:0)
|
||||
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(861), added: 3336, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Balances::Holds` (r:1 w:1)
|
||||
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Attribute` (r:1 w:1)
|
||||
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(479), added: 2954, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Collection` (r:1 w:1)
|
||||
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Assets::Asset` (r:1 w:1)
|
||||
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Assets::Account` (r:1 w:1)
|
||||
/// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Assets::Metadata` (r:1 w:1)
|
||||
/// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`)
|
||||
/// Storage: `NftFractionalization::NftToAsset` (r:0 w:1)
|
||||
/// Proof: `NftFractionalization::NftToAsset` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`)
|
||||
fn fractionalize() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `462`
|
||||
// Estimated: `4326`
|
||||
// Minimum execution time: 178_501_000 picoseconds.
|
||||
Weight::from_parts(180_912_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4326))
|
||||
.saturating_add(T::DbWeight::get().reads(8))
|
||||
.saturating_add(T::DbWeight::get().writes(8))
|
||||
}
|
||||
/// Storage: `NftFractionalization::NftToAsset` (r:1 w:1)
|
||||
/// Proof: `NftFractionalization::NftToAsset` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Assets::Asset` (r:1 w:1)
|
||||
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Assets::Account` (r:1 w:1)
|
||||
/// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Attribute` (r:1 w:1)
|
||||
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(479), added: 2954, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Collection` (r:1 w:1)
|
||||
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
|
||||
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::ItemConfigOf` (r:1 w:0)
|
||||
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Item` (r:1 w:1)
|
||||
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(861), added: 3336, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Balances::Holds` (r:1 w:1)
|
||||
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Account` (r:0 w:1)
|
||||
/// Proof: `Nfts::Account` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::ItemPriceOf` (r:0 w:1)
|
||||
/// Proof: `Nfts::ItemPriceOf` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::PendingSwapOf` (r:0 w:1)
|
||||
/// Proof: `Nfts::PendingSwapOf` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`)
|
||||
fn unify() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1275`
|
||||
// Estimated: `4326`
|
||||
// Minimum execution time: 125_253_000 picoseconds.
|
||||
Weight::from_parts(128_238_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4326))
|
||||
.saturating_add(T::DbWeight::get().reads(9))
|
||||
.saturating_add(T::DbWeight::get().writes(10))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,773 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Cumulus.
|
||||
|
||||
// Cumulus is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Cumulus is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_nfts`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-rococo-dev")`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=asset-hub-rococo-dev
|
||||
// --wasm-execution=compiled
|
||||
// --pallet=pallet_nfts
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --extrinsic=*
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --json
|
||||
// --header=./file_header.txt
|
||||
// --output=./parachains/runtimes/assets/asset-hub-rococo/src/weights/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_nfts`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_nfts::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `Nfts::NextCollectionId` (r:1 w:1)
|
||||
/// Proof: `Nfts::NextCollectionId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Collection` (r:1 w:1)
|
||||
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::CollectionRoleOf` (r:0 w:1)
|
||||
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::CollectionConfigOf` (r:0 w:1)
|
||||
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::CollectionAccount` (r:0 w:1)
|
||||
/// Proof: `Nfts::CollectionAccount` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
|
||||
fn create() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `179`
|
||||
// Estimated: `3549`
|
||||
// Minimum execution time: 39_124_000 picoseconds.
|
||||
Weight::from_parts(39_975_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3549))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
/// Storage: `Nfts::NextCollectionId` (r:1 w:1)
|
||||
/// Proof: `Nfts::NextCollectionId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Collection` (r:1 w:1)
|
||||
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::CollectionRoleOf` (r:0 w:1)
|
||||
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::CollectionConfigOf` (r:0 w:1)
|
||||
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::CollectionAccount` (r:0 w:1)
|
||||
/// Proof: `Nfts::CollectionAccount` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
|
||||
fn force_create() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `76`
|
||||
// Estimated: `3549`
|
||||
// Minimum execution time: 23_444_000 picoseconds.
|
||||
Weight::from_parts(23_857_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3549))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
/// Storage: `Nfts::Collection` (r:1 w:1)
|
||||
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::ItemMetadataOf` (r:1 w:0)
|
||||
/// Proof: `Nfts::ItemMetadataOf` (`max_values`: None, `max_size`: Some(347), added: 2822, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:1)
|
||||
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Attribute` (r:1001 w:1000)
|
||||
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(479), added: 2954, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::ItemConfigOf` (r:1000 w:1000)
|
||||
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::CollectionMetadataOf` (r:0 w:1)
|
||||
/// Proof: `Nfts::CollectionMetadataOf` (`max_values`: None, `max_size`: Some(294), added: 2769, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::CollectionConfigOf` (r:0 w:1)
|
||||
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::CollectionAccount` (r:0 w:1)
|
||||
/// Proof: `Nfts::CollectionAccount` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
|
||||
/// The range of component `m` is `[0, 1000]`.
|
||||
/// The range of component `c` is `[0, 1000]`.
|
||||
/// The range of component `a` is `[0, 1000]`.
|
||||
fn destroy(_m: u32, _c: u32, a: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `32204 + a * (366 ±0)`
|
||||
// Estimated: `2523990 + a * (2954 ±0)`
|
||||
// Minimum execution time: 1_224_365_000 picoseconds.
|
||||
Weight::from_parts(1_281_136_346, 0)
|
||||
.saturating_add(Weight::from_parts(0, 2523990))
|
||||
// Standard Error: 10_484
|
||||
.saturating_add(Weight::from_parts(6_910_740, 0).saturating_mul(a.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1004))
|
||||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into())))
|
||||
.saturating_add(T::DbWeight::get().writes(1005))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(a.into())))
|
||||
.saturating_add(Weight::from_parts(0, 2954).saturating_mul(a.into()))
|
||||
}
|
||||
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
|
||||
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Item` (r:1 w:1)
|
||||
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(861), added: 3336, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Collection` (r:1 w:1)
|
||||
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
|
||||
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::ItemConfigOf` (r:1 w:1)
|
||||
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Account` (r:0 w:1)
|
||||
/// Proof: `Nfts::Account` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`)
|
||||
fn mint() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `455`
|
||||
// Estimated: `4326`
|
||||
// Minimum execution time: 50_489_000 picoseconds.
|
||||
Weight::from_parts(51_045_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4326))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
|
||||
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Item` (r:1 w:1)
|
||||
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(861), added: 3336, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Collection` (r:1 w:1)
|
||||
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
|
||||
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::ItemConfigOf` (r:1 w:1)
|
||||
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Account` (r:0 w:1)
|
||||
/// Proof: `Nfts::Account` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`)
|
||||
fn force_mint() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `455`
|
||||
// Estimated: `4326`
|
||||
// Minimum execution time: 49_146_000 picoseconds.
|
||||
Weight::from_parts(49_756_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4326))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: `Nfts::Attribute` (r:1 w:0)
|
||||
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(479), added: 2954, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::ItemConfigOf` (r:1 w:1)
|
||||
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Collection` (r:1 w:1)
|
||||
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Item` (r:1 w:1)
|
||||
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(861), added: 3336, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::ItemMetadataOf` (r:1 w:0)
|
||||
/// Proof: `Nfts::ItemMetadataOf` (`max_values`: None, `max_size`: Some(347), added: 2822, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Account` (r:0 w:1)
|
||||
/// Proof: `Nfts::Account` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::ItemPriceOf` (r:0 w:1)
|
||||
/// Proof: `Nfts::ItemPriceOf` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::ItemAttributesApprovalsOf` (r:0 w:1)
|
||||
/// Proof: `Nfts::ItemAttributesApprovalsOf` (`max_values`: None, `max_size`: Some(1001), added: 3476, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::PendingSwapOf` (r:0 w:1)
|
||||
/// Proof: `Nfts::PendingSwapOf` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`)
|
||||
fn burn() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `564`
|
||||
// Estimated: `4326`
|
||||
// Minimum execution time: 56_059_000 picoseconds.
|
||||
Weight::from_parts(57_162_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4326))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(7))
|
||||
}
|
||||
/// Storage: `Nfts::Collection` (r:1 w:0)
|
||||
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Attribute` (r:1 w:0)
|
||||
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(479), added: 2954, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
|
||||
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::ItemConfigOf` (r:1 w:0)
|
||||
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Item` (r:1 w:1)
|
||||
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(861), added: 3336, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Account` (r:0 w:2)
|
||||
/// Proof: `Nfts::Account` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::ItemPriceOf` (r:0 w:1)
|
||||
/// Proof: `Nfts::ItemPriceOf` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::PendingSwapOf` (r:0 w:1)
|
||||
/// Proof: `Nfts::PendingSwapOf` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`)
|
||||
fn transfer() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `593`
|
||||
// Estimated: `4326`
|
||||
// Minimum execution time: 42_406_000 picoseconds.
|
||||
Weight::from_parts(43_187_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4326))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
/// Storage: `Nfts::Collection` (r:1 w:0)
|
||||
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
|
||||
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Item` (r:5000 w:5000)
|
||||
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(861), added: 3336, mode: `MaxEncodedLen`)
|
||||
/// The range of component `i` is `[0, 5000]`.
|
||||
fn redeposit(i: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `763 + i * (108 ±0)`
|
||||
// Estimated: `3549 + i * (3336 ±0)`
|
||||
// Minimum execution time: 16_960_000 picoseconds.
|
||||
Weight::from_parts(17_167_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3549))
|
||||
// Standard Error: 24_110
|
||||
.saturating_add(Weight::from_parts(18_046_970, 0).saturating_mul(i.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(i.into())))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into())))
|
||||
.saturating_add(Weight::from_parts(0, 3336).saturating_mul(i.into()))
|
||||
}
|
||||
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
|
||||
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::ItemConfigOf` (r:1 w:1)
|
||||
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||
fn lock_item_transfer() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `435`
|
||||
// Estimated: `3534`
|
||||
// Minimum execution time: 21_023_000 picoseconds.
|
||||
Weight::from_parts(21_409_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3534))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
|
||||
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::ItemConfigOf` (r:1 w:1)
|
||||
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||
fn unlock_item_transfer() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `435`
|
||||
// Estimated: `3534`
|
||||
// Minimum execution time: 20_706_000 picoseconds.
|
||||
Weight::from_parts(21_030_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3534))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Nfts::Collection` (r:1 w:0)
|
||||
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:1)
|
||||
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
|
||||
fn lock_collection() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `340`
|
||||
// Estimated: `3549`
|
||||
// Minimum execution time: 17_449_000 picoseconds.
|
||||
Weight::from_parts(17_804_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3549))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Nfts::OwnershipAcceptance` (r:1 w:1)
|
||||
/// Proof: `Nfts::OwnershipAcceptance` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Collection` (r:1 w:1)
|
||||
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::CollectionAccount` (r:0 w:2)
|
||||
/// Proof: `Nfts::CollectionAccount` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
|
||||
fn transfer_ownership() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `388`
|
||||
// Estimated: `3549`
|
||||
// Minimum execution time: 22_958_000 picoseconds.
|
||||
Weight::from_parts(23_499_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3549))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: `Nfts::Collection` (r:1 w:1)
|
||||
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::CollectionRoleOf` (r:2 w:4)
|
||||
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
|
||||
fn set_team() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `369`
|
||||
// Estimated: `6078`
|
||||
// Minimum execution time: 40_105_000 picoseconds.
|
||||
Weight::from_parts(40_800_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6078))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
/// Storage: `Nfts::Collection` (r:1 w:1)
|
||||
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::CollectionAccount` (r:0 w:2)
|
||||
/// Proof: `Nfts::CollectionAccount` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
|
||||
fn force_collection_owner() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `311`
|
||||
// Estimated: `3549`
|
||||
// Minimum execution time: 17_832_000 picoseconds.
|
||||
Weight::from_parts(18_297_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3549))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: `Nfts::Collection` (r:1 w:0)
|
||||
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::CollectionConfigOf` (r:0 w:1)
|
||||
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
|
||||
fn force_collection_config() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `276`
|
||||
// Estimated: `3549`
|
||||
// Minimum execution time: 15_027_000 picoseconds.
|
||||
Weight::from_parts(15_370_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3549))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
|
||||
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::ItemConfigOf` (r:1 w:1)
|
||||
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||
fn lock_item_properties() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `435`
|
||||
// Estimated: `3534`
|
||||
// Minimum execution time: 19_912_000 picoseconds.
|
||||
Weight::from_parts(20_258_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3534))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Nfts::Collection` (r:1 w:1)
|
||||
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
|
||||
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
|
||||
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::ItemConfigOf` (r:1 w:0)
|
||||
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Attribute` (r:1 w:1)
|
||||
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(479), added: 2954, mode: `MaxEncodedLen`)
|
||||
fn set_attribute() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `539`
|
||||
// Estimated: `3944`
|
||||
// Minimum execution time: 50_138_000 picoseconds.
|
||||
Weight::from_parts(50_971_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3944))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Nfts::Collection` (r:1 w:1)
|
||||
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Attribute` (r:1 w:1)
|
||||
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(479), added: 2954, mode: `MaxEncodedLen`)
|
||||
fn force_set_attribute() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `344`
|
||||
// Estimated: `3944`
|
||||
// Minimum execution time: 26_385_000 picoseconds.
|
||||
Weight::from_parts(27_086_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3944))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Nfts::Attribute` (r:1 w:1)
|
||||
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(479), added: 2954, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
|
||||
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::ItemConfigOf` (r:1 w:0)
|
||||
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Collection` (r:1 w:1)
|
||||
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
|
||||
fn clear_attribute() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `983`
|
||||
// Estimated: `3944`
|
||||
// Minimum execution time: 45_687_000 picoseconds.
|
||||
Weight::from_parts(47_107_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3944))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Nfts::Item` (r:1 w:0)
|
||||
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(861), added: 3336, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::ItemAttributesApprovalsOf` (r:1 w:1)
|
||||
/// Proof: `Nfts::ItemAttributesApprovalsOf` (`max_values`: None, `max_size`: Some(1001), added: 3476, mode: `MaxEncodedLen`)
|
||||
fn approve_item_attributes() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `381`
|
||||
// Estimated: `4466`
|
||||
// Minimum execution time: 18_065_000 picoseconds.
|
||||
Weight::from_parts(18_371_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4466))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Nfts::Item` (r:1 w:0)
|
||||
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(861), added: 3336, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::ItemAttributesApprovalsOf` (r:1 w:1)
|
||||
/// Proof: `Nfts::ItemAttributesApprovalsOf` (`max_values`: None, `max_size`: Some(1001), added: 3476, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Attribute` (r:1001 w:1000)
|
||||
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(479), added: 2954, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// The range of component `n` is `[0, 1000]`.
|
||||
fn cancel_item_attributes_approval(n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `760 + n * (398 ±0)`
|
||||
// Estimated: `4466 + n * (2954 ±0)`
|
||||
// Minimum execution time: 26_680_000 picoseconds.
|
||||
Weight::from_parts(27_010_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4466))
|
||||
// Standard Error: 6_351
|
||||
.saturating_add(Weight::from_parts(6_584_290, 0).saturating_mul(n.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
|
||||
.saturating_add(Weight::from_parts(0, 2954).saturating_mul(n.into()))
|
||||
}
|
||||
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
|
||||
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Collection` (r:1 w:1)
|
||||
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::ItemConfigOf` (r:1 w:0)
|
||||
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
|
||||
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::ItemMetadataOf` (r:1 w:1)
|
||||
/// Proof: `Nfts::ItemMetadataOf` (`max_values`: None, `max_size`: Some(347), added: 2822, mode: `MaxEncodedLen`)
|
||||
fn set_metadata() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `539`
|
||||
// Estimated: `3812`
|
||||
// Minimum execution time: 42_038_000 picoseconds.
|
||||
Weight::from_parts(42_758_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3812))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
|
||||
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::ItemMetadataOf` (r:1 w:1)
|
||||
/// Proof: `Nfts::ItemMetadataOf` (`max_values`: None, `max_size`: Some(347), added: 2822, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Collection` (r:1 w:1)
|
||||
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::ItemConfigOf` (r:1 w:0)
|
||||
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||
fn clear_metadata() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `849`
|
||||
// Estimated: `3812`
|
||||
// Minimum execution time: 40_220_000 picoseconds.
|
||||
Weight::from_parts(41_026_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3812))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
|
||||
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
|
||||
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Collection` (r:1 w:1)
|
||||
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::CollectionMetadataOf` (r:1 w:1)
|
||||
/// Proof: `Nfts::CollectionMetadataOf` (`max_values`: None, `max_size`: Some(294), added: 2769, mode: `MaxEncodedLen`)
|
||||
fn set_collection_metadata() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `398`
|
||||
// Estimated: `3759`
|
||||
// Minimum execution time: 38_135_000 picoseconds.
|
||||
Weight::from_parts(38_561_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3759))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
|
||||
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Collection` (r:1 w:0)
|
||||
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
|
||||
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::CollectionMetadataOf` (r:1 w:1)
|
||||
/// Proof: `Nfts::CollectionMetadataOf` (`max_values`: None, `max_size`: Some(294), added: 2769, mode: `MaxEncodedLen`)
|
||||
fn clear_collection_metadata() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `716`
|
||||
// Estimated: `3759`
|
||||
// Minimum execution time: 37_583_000 picoseconds.
|
||||
Weight::from_parts(38_215_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3759))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Nfts::Item` (r:1 w:1)
|
||||
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(861), added: 3336, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
|
||||
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
|
||||
fn approve_transfer() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `410`
|
||||
// Estimated: `4326`
|
||||
// Minimum execution time: 21_405_000 picoseconds.
|
||||
Weight::from_parts(21_803_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4326))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Nfts::Item` (r:1 w:1)
|
||||
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(861), added: 3336, mode: `MaxEncodedLen`)
|
||||
fn cancel_approval() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `418`
|
||||
// Estimated: `4326`
|
||||
// Minimum execution time: 18_713_000 picoseconds.
|
||||
Weight::from_parts(19_185_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4326))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Nfts::Item` (r:1 w:1)
|
||||
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(861), added: 3336, mode: `MaxEncodedLen`)
|
||||
fn clear_all_transfer_approvals() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `418`
|
||||
// Estimated: `4326`
|
||||
// Minimum execution time: 17_803_000 picoseconds.
|
||||
Weight::from_parts(18_270_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4326))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Nfts::OwnershipAcceptance` (r:1 w:1)
|
||||
/// Proof: `Nfts::OwnershipAcceptance` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
|
||||
fn set_accept_ownership() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `76`
|
||||
// Estimated: `3517`
|
||||
// Minimum execution time: 15_982_000 picoseconds.
|
||||
Weight::from_parts(16_700_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3517))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:1)
|
||||
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Collection` (r:1 w:0)
|
||||
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
|
||||
fn set_collection_max_supply() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `340`
|
||||
// Estimated: `3549`
|
||||
// Minimum execution time: 19_501_000 picoseconds.
|
||||
Weight::from_parts(19_785_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3549))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
|
||||
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:1)
|
||||
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
|
||||
fn update_mint_settings() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `323`
|
||||
// Estimated: `3538`
|
||||
// Minimum execution time: 18_914_000 picoseconds.
|
||||
Weight::from_parts(19_292_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3538))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Nfts::Item` (r:1 w:0)
|
||||
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(861), added: 3336, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
|
||||
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::ItemConfigOf` (r:1 w:0)
|
||||
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::ItemPriceOf` (r:0 w:1)
|
||||
/// Proof: `Nfts::ItemPriceOf` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`)
|
||||
fn set_price() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `518`
|
||||
// Estimated: `4326`
|
||||
// Minimum execution time: 24_625_000 picoseconds.
|
||||
Weight::from_parts(25_257_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4326))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Nfts::Item` (r:1 w:1)
|
||||
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(861), added: 3336, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::ItemPriceOf` (r:1 w:1)
|
||||
/// Proof: `Nfts::ItemPriceOf` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Collection` (r:1 w:0)
|
||||
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Attribute` (r:1 w:0)
|
||||
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(479), added: 2954, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
|
||||
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::ItemConfigOf` (r:1 w:0)
|
||||
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Account` (r:0 w:2)
|
||||
/// Proof: `Nfts::Account` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::PendingSwapOf` (r:0 w:1)
|
||||
/// Proof: `Nfts::PendingSwapOf` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`)
|
||||
fn buy_item() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `705`
|
||||
// Estimated: `4326`
|
||||
// Minimum execution time: 50_833_000 picoseconds.
|
||||
Weight::from_parts(52_161_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4326))
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
/// The range of component `n` is `[0, 10]`.
|
||||
fn pay_tips(n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_220_000 picoseconds.
|
||||
Weight::from_parts(3_476_001, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 7_084
|
||||
.saturating_add(Weight::from_parts(3_844_820, 0).saturating_mul(n.into()))
|
||||
}
|
||||
/// Storage: `Nfts::Item` (r:2 w:0)
|
||||
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(861), added: 3336, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::PendingSwapOf` (r:0 w:1)
|
||||
/// Proof: `Nfts::PendingSwapOf` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`)
|
||||
fn create_swap() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `494`
|
||||
// Estimated: `7662`
|
||||
// Minimum execution time: 21_983_000 picoseconds.
|
||||
Weight::from_parts(22_746_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 7662))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Nfts::PendingSwapOf` (r:1 w:1)
|
||||
/// Proof: `Nfts::PendingSwapOf` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Item` (r:1 w:0)
|
||||
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(861), added: 3336, mode: `MaxEncodedLen`)
|
||||
fn cancel_swap() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `513`
|
||||
// Estimated: `4326`
|
||||
// Minimum execution time: 20_875_000 picoseconds.
|
||||
Weight::from_parts(21_465_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4326))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Nfts::Item` (r:2 w:2)
|
||||
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(861), added: 3336, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::PendingSwapOf` (r:1 w:2)
|
||||
/// Proof: `Nfts::PendingSwapOf` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Collection` (r:1 w:0)
|
||||
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Attribute` (r:2 w:0)
|
||||
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(479), added: 2954, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
|
||||
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::ItemConfigOf` (r:2 w:0)
|
||||
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Account` (r:0 w:4)
|
||||
/// Proof: `Nfts::Account` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::ItemPriceOf` (r:0 w:2)
|
||||
/// Proof: `Nfts::ItemPriceOf` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`)
|
||||
fn claim_swap() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `834`
|
||||
// Estimated: `7662`
|
||||
// Minimum execution time: 84_771_000 picoseconds.
|
||||
Weight::from_parts(86_078_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 7662))
|
||||
.saturating_add(T::DbWeight::get().reads(9))
|
||||
.saturating_add(T::DbWeight::get().writes(10))
|
||||
}
|
||||
/// Storage: `Nfts::CollectionRoleOf` (r:2 w:0)
|
||||
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
|
||||
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Item` (r:1 w:1)
|
||||
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(861), added: 3336, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Collection` (r:1 w:1)
|
||||
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::ItemConfigOf` (r:1 w:1)
|
||||
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Attribute` (r:10 w:10)
|
||||
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(479), added: 2954, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::ItemMetadataOf` (r:1 w:1)
|
||||
/// Proof: `Nfts::ItemMetadataOf` (`max_values`: None, `max_size`: Some(347), added: 2822, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Account` (r:0 w:1)
|
||||
/// Proof: `Nfts::Account` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`)
|
||||
/// The range of component `n` is `[0, 10]`.
|
||||
fn mint_pre_signed(n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `558`
|
||||
// Estimated: `6078 + n * (2954 ±0)`
|
||||
// Minimum execution time: 143_265_000 picoseconds.
|
||||
Weight::from_parts(150_978_773, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6078))
|
||||
// Standard Error: 49_443
|
||||
.saturating_add(Weight::from_parts(31_888_255, 0).saturating_mul(n.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(8))
|
||||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
|
||||
.saturating_add(T::DbWeight::get().writes(6))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
|
||||
.saturating_add(Weight::from_parts(0, 2954).saturating_mul(n.into()))
|
||||
}
|
||||
/// Storage: `Nfts::Item` (r:1 w:0)
|
||||
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(861), added: 3336, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::ItemAttributesApprovalsOf` (r:1 w:1)
|
||||
/// Proof: `Nfts::ItemAttributesApprovalsOf` (`max_values`: None, `max_size`: Some(1001), added: 3476, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
|
||||
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Collection` (r:1 w:1)
|
||||
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Nfts::Attribute` (r:10 w:10)
|
||||
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(479), added: 2954, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// The range of component `n` is `[0, 10]`.
|
||||
fn set_attributes_pre_signed(n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `588`
|
||||
// Estimated: `4466 + n * (2954 ±0)`
|
||||
// Minimum execution time: 83_754_000 picoseconds.
|
||||
Weight::from_parts(96_685_026, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4466))
|
||||
// Standard Error: 72_592
|
||||
.saturating_add(Weight::from_parts(30_914_858, 0).saturating_mul(n.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
|
||||
.saturating_add(Weight::from_parts(0, 2954).saturating_mul(n.into()))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,226 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Cumulus.
|
||||
|
||||
// Cumulus is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Cumulus is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_proxy`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-rococo-dev")`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=asset-hub-rococo-dev
|
||||
// --wasm-execution=compiled
|
||||
// --pallet=pallet_proxy
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --extrinsic=*
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --json
|
||||
// --header=./file_header.txt
|
||||
// --output=./parachains/runtimes/assets/asset-hub-rococo/src/weights/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_proxy`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `Proxy::Proxies` (r:1 w:0)
|
||||
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
|
||||
/// The range of component `p` is `[1, 31]`.
|
||||
fn proxy(p: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `127 + p * (37 ±0)`
|
||||
// Estimated: `4706`
|
||||
// Minimum execution time: 16_417_000 picoseconds.
|
||||
Weight::from_parts(17_283_443, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4706))
|
||||
// Standard Error: 2_409
|
||||
.saturating_add(Weight::from_parts(32_123, 0).saturating_mul(p.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
}
|
||||
/// Storage: `Proxy::Proxies` (r:1 w:0)
|
||||
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Proxy::Announcements` (r:1 w:1)
|
||||
/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// The range of component `a` is `[0, 31]`.
|
||||
/// The range of component `p` is `[1, 31]`.
|
||||
fn proxy_announced(a: u32, p: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `454 + a * (68 ±0) + p * (37 ±0)`
|
||||
// Estimated: `5698`
|
||||
// Minimum execution time: 37_572_000 picoseconds.
|
||||
Weight::from_parts(37_045_756, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5698))
|
||||
// Standard Error: 2_896
|
||||
.saturating_add(Weight::from_parts(139_561, 0).saturating_mul(a.into()))
|
||||
// Standard Error: 2_993
|
||||
.saturating_add(Weight::from_parts(73_270, 0).saturating_mul(p.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Proxy::Announcements` (r:1 w:1)
|
||||
/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// The range of component `a` is `[0, 31]`.
|
||||
/// The range of component `p` is `[1, 31]`.
|
||||
fn remove_announcement(a: u32, p: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `369 + a * (68 ±0)`
|
||||
// Estimated: `5698`
|
||||
// Minimum execution time: 24_066_000 picoseconds.
|
||||
Weight::from_parts(24_711_403, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5698))
|
||||
// Standard Error: 1_626
|
||||
.saturating_add(Weight::from_parts(128_391, 0).saturating_mul(a.into()))
|
||||
// Standard Error: 1_680
|
||||
.saturating_add(Weight::from_parts(23_124, 0).saturating_mul(p.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Proxy::Announcements` (r:1 w:1)
|
||||
/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// The range of component `a` is `[0, 31]`.
|
||||
/// The range of component `p` is `[1, 31]`.
|
||||
fn reject_announcement(a: u32, p: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `369 + a * (68 ±0)`
|
||||
// Estimated: `5698`
|
||||
// Minimum execution time: 24_162_000 picoseconds.
|
||||
Weight::from_parts(23_928_058, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5698))
|
||||
// Standard Error: 2_072
|
||||
.saturating_add(Weight::from_parts(152_299, 0).saturating_mul(a.into()))
|
||||
// Standard Error: 2_141
|
||||
.saturating_add(Weight::from_parts(39_775, 0).saturating_mul(p.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Proxy::Proxies` (r:1 w:0)
|
||||
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Proxy::Announcements` (r:1 w:1)
|
||||
/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// The range of component `a` is `[0, 31]`.
|
||||
/// The range of component `p` is `[1, 31]`.
|
||||
fn announce(a: u32, p: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `386 + a * (68 ±0) + p * (37 ±0)`
|
||||
// Estimated: `5698`
|
||||
// Minimum execution time: 33_858_000 picoseconds.
|
||||
Weight::from_parts(33_568_059, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5698))
|
||||
// Standard Error: 1_816
|
||||
.saturating_add(Weight::from_parts(134_400, 0).saturating_mul(a.into()))
|
||||
// Standard Error: 1_876
|
||||
.saturating_add(Weight::from_parts(57_028, 0).saturating_mul(p.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Proxy::Proxies` (r:1 w:1)
|
||||
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
|
||||
/// The range of component `p` is `[1, 31]`.
|
||||
fn add_proxy(p: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `127 + p * (37 ±0)`
|
||||
// Estimated: `4706`
|
||||
// Minimum execution time: 24_947_000 picoseconds.
|
||||
Weight::from_parts(26_235_199, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4706))
|
||||
// Standard Error: 1_363
|
||||
.saturating_add(Weight::from_parts(41_435, 0).saturating_mul(p.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Proxy::Proxies` (r:1 w:1)
|
||||
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
|
||||
/// The range of component `p` is `[1, 31]`.
|
||||
fn remove_proxy(p: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `127 + p * (37 ±0)`
|
||||
// Estimated: `4706`
|
||||
// Minimum execution time: 25_186_000 picoseconds.
|
||||
Weight::from_parts(26_823_133, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4706))
|
||||
// Standard Error: 2_259
|
||||
.saturating_add(Weight::from_parts(34_224, 0).saturating_mul(p.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Proxy::Proxies` (r:1 w:1)
|
||||
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
|
||||
/// The range of component `p` is `[1, 31]`.
|
||||
fn remove_proxies(p: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `127 + p * (37 ±0)`
|
||||
// Estimated: `4706`
|
||||
// Minimum execution time: 22_156_000 picoseconds.
|
||||
Weight::from_parts(23_304_060, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4706))
|
||||
// Standard Error: 1_738
|
||||
.saturating_add(Weight::from_parts(39_612, 0).saturating_mul(p.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Proxy::Proxies` (r:1 w:1)
|
||||
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
|
||||
/// The range of component `p` is `[1, 31]`.
|
||||
fn create_pure(p: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `139`
|
||||
// Estimated: `4706`
|
||||
// Minimum execution time: 26_914_000 picoseconds.
|
||||
Weight::from_parts(28_009_062, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4706))
|
||||
// Standard Error: 1_978
|
||||
.saturating_add(Weight::from_parts(12_255, 0).saturating_mul(p.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Proxy::Proxies` (r:1 w:1)
|
||||
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
|
||||
/// The range of component `p` is `[0, 30]`.
|
||||
fn kill_pure(p: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `164 + p * (37 ±0)`
|
||||
// Estimated: `4706`
|
||||
// Minimum execution time: 23_281_000 picoseconds.
|
||||
Weight::from_parts(24_392_989, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4706))
|
||||
// Standard Error: 2_943
|
||||
.saturating_add(Weight::from_parts(30_287, 0).saturating_mul(p.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Cumulus.
|
||||
|
||||
// Cumulus is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Cumulus is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_session`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-rococo-dev")`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=asset-hub-rococo-dev
|
||||
// --wasm-execution=compiled
|
||||
// --pallet=pallet_session
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --extrinsic=*
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --json
|
||||
// --header=./file_header.txt
|
||||
// --output=./parachains/runtimes/assets/asset-hub-rococo/src/weights/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_session`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_session::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `Session::NextKeys` (r:1 w:1)
|
||||
/// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Session::KeyOwner` (r:1 w:1)
|
||||
/// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn set_keys() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `270`
|
||||
// Estimated: `3735`
|
||||
// Minimum execution time: 16_932_000 picoseconds.
|
||||
Weight::from_parts(17_357_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3735))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Session::NextKeys` (r:1 w:1)
|
||||
/// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Session::KeyOwner` (r:0 w:1)
|
||||
/// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn purge_keys() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `242`
|
||||
// Estimated: `3707`
|
||||
// Minimum execution time: 12_157_000 picoseconds.
|
||||
Weight::from_parts(12_770_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3707))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Cumulus.
|
||||
|
||||
// Cumulus is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Cumulus is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_timestamp`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-rococo-dev")`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=asset-hub-rococo-dev
|
||||
// --wasm-execution=compiled
|
||||
// --pallet=pallet_timestamp
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --extrinsic=*
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --json
|
||||
// --header=./file_header.txt
|
||||
// --output=./parachains/runtimes/assets/asset-hub-rococo/src/weights/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_timestamp`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_timestamp::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `Timestamp::Now` (r:1 w:1)
|
||||
/// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Aura::CurrentSlot` (r:1 w:0)
|
||||
/// Proof: `Aura::CurrentSlot` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
|
||||
fn set() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `86`
|
||||
// Estimated: `1493`
|
||||
// Minimum execution time: 9_313_000 picoseconds.
|
||||
Weight::from_parts(9_775_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1493))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
fn on_finalize() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `57`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_322_000 picoseconds.
|
||||
Weight::from_parts(3_577_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,467 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Cumulus.
|
||||
|
||||
// Cumulus is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Cumulus is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_uniques`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-rococo-dev")`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=asset-hub-rococo-dev
|
||||
// --wasm-execution=compiled
|
||||
// --pallet=pallet_uniques
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --extrinsic=*
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --json
|
||||
// --header=./file_header.txt
|
||||
// --output=./parachains/runtimes/assets/asset-hub-rococo/src/weights/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_uniques`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_uniques::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `Uniques::Class` (r:1 w:1)
|
||||
/// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::ClassAccount` (r:0 w:1)
|
||||
/// Proof: `Uniques::ClassAccount` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
|
||||
fn create() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `145`
|
||||
// Estimated: `3643`
|
||||
// Minimum execution time: 28_845_000 picoseconds.
|
||||
Weight::from_parts(29_675_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3643))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Uniques::Class` (r:1 w:1)
|
||||
/// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::ClassAccount` (r:0 w:1)
|
||||
/// Proof: `Uniques::ClassAccount` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
|
||||
fn force_create() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `42`
|
||||
// Estimated: `3643`
|
||||
// Minimum execution time: 13_492_000 picoseconds.
|
||||
Weight::from_parts(14_049_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3643))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Uniques::Class` (r:1 w:1)
|
||||
/// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::Asset` (r:1001 w:1000)
|
||||
/// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(122), added: 2597, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::InstanceMetadataOf` (r:1000 w:1000)
|
||||
/// Proof: `Uniques::InstanceMetadataOf` (`max_values`: None, `max_size`: Some(187), added: 2662, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::Attribute` (r:1000 w:1000)
|
||||
/// Proof: `Uniques::Attribute` (`max_values`: None, `max_size`: Some(172), added: 2647, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::ClassAccount` (r:0 w:1)
|
||||
/// Proof: `Uniques::ClassAccount` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::ClassMetadataOf` (r:0 w:1)
|
||||
/// Proof: `Uniques::ClassMetadataOf` (`max_values`: None, `max_size`: Some(167), added: 2642, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::Account` (r:0 w:1000)
|
||||
/// Proof: `Uniques::Account` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::CollectionMaxSupply` (r:0 w:1)
|
||||
/// Proof: `Uniques::CollectionMaxSupply` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
|
||||
/// The range of component `n` is `[0, 1000]`.
|
||||
/// The range of component `m` is `[0, 1000]`.
|
||||
/// The range of component `a` is `[0, 1000]`.
|
||||
fn destroy(n: u32, m: u32, a: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `257 + a * (107 ±0) + m * (56 ±0) + n * (76 ±0)`
|
||||
// Estimated: `3643 + a * (2647 ±0) + m * (2662 ±0) + n * (2597 ±0)`
|
||||
// Minimum execution time: 2_920_070_000 picoseconds.
|
||||
Weight::from_parts(2_983_862_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3643))
|
||||
// Standard Error: 36_415
|
||||
.saturating_add(Weight::from_parts(7_589_778, 0).saturating_mul(n.into()))
|
||||
// Standard Error: 36_415
|
||||
.saturating_add(Weight::from_parts(479_496, 0).saturating_mul(m.into()))
|
||||
// Standard Error: 36_415
|
||||
.saturating_add(Weight::from_parts(562_056, 0).saturating_mul(a.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
|
||||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m.into())))
|
||||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into())))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
.saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(n.into())))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(m.into())))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(a.into())))
|
||||
.saturating_add(Weight::from_parts(0, 2647).saturating_mul(a.into()))
|
||||
.saturating_add(Weight::from_parts(0, 2662).saturating_mul(m.into()))
|
||||
.saturating_add(Weight::from_parts(0, 2597).saturating_mul(n.into()))
|
||||
}
|
||||
/// Storage: `Uniques::Asset` (r:1 w:1)
|
||||
/// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(122), added: 2597, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::Class` (r:1 w:1)
|
||||
/// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::CollectionMaxSupply` (r:1 w:0)
|
||||
/// Proof: `Uniques::CollectionMaxSupply` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::Account` (r:0 w:1)
|
||||
/// Proof: `Uniques::Account` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`)
|
||||
fn mint() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `282`
|
||||
// Estimated: `3643`
|
||||
// Minimum execution time: 35_329_000 picoseconds.
|
||||
Weight::from_parts(36_019_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3643))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: `Uniques::Class` (r:1 w:1)
|
||||
/// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::Asset` (r:1 w:1)
|
||||
/// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(122), added: 2597, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::Account` (r:0 w:1)
|
||||
/// Proof: `Uniques::Account` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::ItemPriceOf` (r:0 w:1)
|
||||
/// Proof: `Uniques::ItemPriceOf` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`)
|
||||
fn burn() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `428`
|
||||
// Estimated: `3643`
|
||||
// Minimum execution time: 36_474_000 picoseconds.
|
||||
Weight::from_parts(37_190_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3643))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: `Uniques::Class` (r:1 w:0)
|
||||
/// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::Asset` (r:1 w:1)
|
||||
/// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(122), added: 2597, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::Account` (r:0 w:2)
|
||||
/// Proof: `Uniques::Account` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::ItemPriceOf` (r:0 w:1)
|
||||
/// Proof: `Uniques::ItemPriceOf` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`)
|
||||
fn transfer() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `428`
|
||||
// Estimated: `3643`
|
||||
// Minimum execution time: 26_786_000 picoseconds.
|
||||
Weight::from_parts(27_400_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3643))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: `Uniques::Class` (r:1 w:1)
|
||||
/// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::Asset` (r:5000 w:5000)
|
||||
/// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(122), added: 2597, mode: `MaxEncodedLen`)
|
||||
/// The range of component `i` is `[0, 5000]`.
|
||||
fn redeposit(i: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `738 + i * (76 ±0)`
|
||||
// Estimated: `3643 + i * (2597 ±0)`
|
||||
// Minimum execution time: 14_546_000 picoseconds.
|
||||
Weight::from_parts(14_831_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3643))
|
||||
// Standard Error: 24_362
|
||||
.saturating_add(Weight::from_parts(17_972_938, 0).saturating_mul(i.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(i.into())))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into())))
|
||||
.saturating_add(Weight::from_parts(0, 2597).saturating_mul(i.into()))
|
||||
}
|
||||
/// Storage: `Uniques::Asset` (r:1 w:1)
|
||||
/// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(122), added: 2597, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::Class` (r:1 w:0)
|
||||
/// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`)
|
||||
fn freeze() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `428`
|
||||
// Estimated: `3643`
|
||||
// Minimum execution time: 18_919_000 picoseconds.
|
||||
Weight::from_parts(19_547_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3643))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Uniques::Asset` (r:1 w:1)
|
||||
/// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(122), added: 2597, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::Class` (r:1 w:0)
|
||||
/// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`)
|
||||
fn thaw() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `428`
|
||||
// Estimated: `3643`
|
||||
// Minimum execution time: 18_643_000 picoseconds.
|
||||
Weight::from_parts(19_000_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3643))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Uniques::Class` (r:1 w:1)
|
||||
/// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`)
|
||||
fn freeze_collection() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `282`
|
||||
// Estimated: `3643`
|
||||
// Minimum execution time: 13_530_000 picoseconds.
|
||||
Weight::from_parts(14_165_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3643))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Uniques::Class` (r:1 w:1)
|
||||
/// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`)
|
||||
fn thaw_collection() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `282`
|
||||
// Estimated: `3643`
|
||||
// Minimum execution time: 13_523_000 picoseconds.
|
||||
Weight::from_parts(14_055_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3643))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Uniques::OwnershipAcceptance` (r:1 w:1)
|
||||
/// Proof: `Uniques::OwnershipAcceptance` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::Class` (r:1 w:1)
|
||||
/// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::ClassAccount` (r:0 w:2)
|
||||
/// Proof: `Uniques::ClassAccount` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
|
||||
fn transfer_ownership() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `356`
|
||||
// Estimated: `3643`
|
||||
// Minimum execution time: 22_131_000 picoseconds.
|
||||
Weight::from_parts(22_628_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3643))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: `Uniques::Class` (r:1 w:1)
|
||||
/// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`)
|
||||
fn set_team() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `282`
|
||||
// Estimated: `3643`
|
||||
// Minimum execution time: 13_841_000 picoseconds.
|
||||
Weight::from_parts(14_408_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3643))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Uniques::Class` (r:1 w:1)
|
||||
/// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::ClassAccount` (r:0 w:1)
|
||||
/// Proof: `Uniques::ClassAccount` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
|
||||
fn force_item_status() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `282`
|
||||
// Estimated: `3643`
|
||||
// Minimum execution time: 16_954_000 picoseconds.
|
||||
Weight::from_parts(17_482_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3643))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Uniques::Class` (r:1 w:1)
|
||||
/// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::InstanceMetadataOf` (r:1 w:0)
|
||||
/// Proof: `Uniques::InstanceMetadataOf` (`max_values`: None, `max_size`: Some(187), added: 2662, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::Attribute` (r:1 w:1)
|
||||
/// Proof: `Uniques::Attribute` (`max_values`: None, `max_size`: Some(172), added: 2647, mode: `MaxEncodedLen`)
|
||||
fn set_attribute() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `559`
|
||||
// Estimated: `3652`
|
||||
// Minimum execution time: 38_493_000 picoseconds.
|
||||
Weight::from_parts(39_513_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3652))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Uniques::Class` (r:1 w:1)
|
||||
/// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::InstanceMetadataOf` (r:1 w:0)
|
||||
/// Proof: `Uniques::InstanceMetadataOf` (`max_values`: None, `max_size`: Some(187), added: 2662, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::Attribute` (r:1 w:1)
|
||||
/// Proof: `Uniques::Attribute` (`max_values`: None, `max_size`: Some(172), added: 2647, mode: `MaxEncodedLen`)
|
||||
fn clear_attribute() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `756`
|
||||
// Estimated: `3652`
|
||||
// Minimum execution time: 37_918_000 picoseconds.
|
||||
Weight::from_parts(38_666_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3652))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Uniques::Class` (r:1 w:1)
|
||||
/// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::InstanceMetadataOf` (r:1 w:1)
|
||||
/// Proof: `Uniques::InstanceMetadataOf` (`max_values`: None, `max_size`: Some(187), added: 2662, mode: `MaxEncodedLen`)
|
||||
fn set_metadata() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `348`
|
||||
// Estimated: `3652`
|
||||
// Minimum execution time: 29_810_000 picoseconds.
|
||||
Weight::from_parts(30_363_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3652))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Uniques::Class` (r:1 w:1)
|
||||
/// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::InstanceMetadataOf` (r:1 w:1)
|
||||
/// Proof: `Uniques::InstanceMetadataOf` (`max_values`: None, `max_size`: Some(187), added: 2662, mode: `MaxEncodedLen`)
|
||||
fn clear_metadata() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `559`
|
||||
// Estimated: `3652`
|
||||
// Minimum execution time: 30_877_000 picoseconds.
|
||||
Weight::from_parts(31_430_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3652))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Uniques::Class` (r:1 w:1)
|
||||
/// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::ClassMetadataOf` (r:1 w:1)
|
||||
/// Proof: `Uniques::ClassMetadataOf` (`max_values`: None, `max_size`: Some(167), added: 2642, mode: `MaxEncodedLen`)
|
||||
fn set_collection_metadata() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `282`
|
||||
// Estimated: `3643`
|
||||
// Minimum execution time: 30_478_000 picoseconds.
|
||||
Weight::from_parts(31_065_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3643))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Uniques::Class` (r:1 w:0)
|
||||
/// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::ClassMetadataOf` (r:1 w:1)
|
||||
/// Proof: `Uniques::ClassMetadataOf` (`max_values`: None, `max_size`: Some(167), added: 2642, mode: `MaxEncodedLen`)
|
||||
fn clear_collection_metadata() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `473`
|
||||
// Estimated: `3643`
|
||||
// Minimum execution time: 29_582_000 picoseconds.
|
||||
Weight::from_parts(30_160_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3643))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Uniques::Class` (r:1 w:0)
|
||||
/// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::Asset` (r:1 w:1)
|
||||
/// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(122), added: 2597, mode: `MaxEncodedLen`)
|
||||
fn approve_transfer() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `428`
|
||||
// Estimated: `3643`
|
||||
// Minimum execution time: 19_328_000 picoseconds.
|
||||
Weight::from_parts(19_866_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3643))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Uniques::Class` (r:1 w:0)
|
||||
/// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::Asset` (r:1 w:1)
|
||||
/// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(122), added: 2597, mode: `MaxEncodedLen`)
|
||||
fn cancel_approval() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `461`
|
||||
// Estimated: `3643`
|
||||
// Minimum execution time: 19_131_000 picoseconds.
|
||||
Weight::from_parts(19_569_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3643))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Uniques::OwnershipAcceptance` (r:1 w:1)
|
||||
/// Proof: `Uniques::OwnershipAcceptance` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
|
||||
fn set_accept_ownership() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `42`
|
||||
// Estimated: `3517`
|
||||
// Minimum execution time: 15_212_000 picoseconds.
|
||||
Weight::from_parts(15_691_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3517))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Uniques::CollectionMaxSupply` (r:1 w:1)
|
||||
/// Proof: `Uniques::CollectionMaxSupply` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::Class` (r:1 w:0)
|
||||
/// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`)
|
||||
fn set_collection_max_supply() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `282`
|
||||
// Estimated: `3643`
|
||||
// Minimum execution time: 16_290_000 picoseconds.
|
||||
Weight::from_parts(16_654_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3643))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Uniques::Asset` (r:1 w:0)
|
||||
/// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(122), added: 2597, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::ItemPriceOf` (r:0 w:1)
|
||||
/// Proof: `Uniques::ItemPriceOf` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`)
|
||||
fn set_price() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `259`
|
||||
// Estimated: `3587`
|
||||
// Minimum execution time: 16_095_000 picoseconds.
|
||||
Weight::from_parts(16_555_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3587))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Uniques::Asset` (r:1 w:1)
|
||||
/// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(122), added: 2597, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::ItemPriceOf` (r:1 w:1)
|
||||
/// Proof: `Uniques::ItemPriceOf` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::Class` (r:1 w:0)
|
||||
/// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Uniques::Account` (r:0 w:2)
|
||||
/// Proof: `Uniques::Account` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`)
|
||||
fn buy_item() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `540`
|
||||
// Estimated: `3643`
|
||||
// Minimum execution time: 35_506_000 picoseconds.
|
||||
Weight::from_parts(36_305_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3643))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Cumulus.
|
||||
|
||||
// Cumulus is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Cumulus is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_utility`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-rococo-dev")`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=asset-hub-rococo-dev
|
||||
// --wasm-execution=compiled
|
||||
// --pallet=pallet_utility
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --extrinsic=*
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --json
|
||||
// --header=./file_header.txt
|
||||
// --output=./parachains/runtimes/assets/asset-hub-rococo/src/weights/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_utility`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_utility::WeightInfo for WeightInfo<T> {
|
||||
/// The range of component `c` is `[0, 1000]`.
|
||||
fn batch(c: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 7_103_000 picoseconds.
|
||||
Weight::from_parts(7_226_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 2_732
|
||||
.saturating_add(Weight::from_parts(6_560_347, 0).saturating_mul(c.into()))
|
||||
}
|
||||
fn as_derivative() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 5_208_000 picoseconds.
|
||||
Weight::from_parts(5_480_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
/// The range of component `c` is `[0, 1000]`.
|
||||
fn batch_all(c: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 7_070_000 picoseconds.
|
||||
Weight::from_parts(1_321_270, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 3_454
|
||||
.saturating_add(Weight::from_parts(6_864_640, 0).saturating_mul(c.into()))
|
||||
}
|
||||
fn dispatch_as() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 9_255_000 picoseconds.
|
||||
Weight::from_parts(9_683_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
/// The range of component `c` is `[0, 1000]`.
|
||||
fn force_batch(c: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 6_852_000 picoseconds.
|
||||
Weight::from_parts(7_007_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 1_745
|
||||
.saturating_add(Weight::from_parts(6_562_902, 0).saturating_mul(c.into()))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,290 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Cumulus.
|
||||
|
||||
// Cumulus is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Cumulus is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_xcm`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-rococo-dev")`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=asset-hub-rococo-dev
|
||||
// --wasm-execution=compiled
|
||||
// --pallet=pallet_xcm
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --extrinsic=*
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --json
|
||||
// --header=./file_header.txt
|
||||
// --output=./parachains/runtimes/assets/asset-hub-rococo/src/weights/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_xcm`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
|
||||
/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
|
||||
/// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0)
|
||||
/// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
|
||||
/// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
|
||||
/// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
fn send() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `109`
|
||||
// Estimated: `3574`
|
||||
// Minimum execution time: 30_015_000 picoseconds.
|
||||
Weight::from_parts(30_576_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3574))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
|
||||
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
fn teleport_assets() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `1489`
|
||||
// Minimum execution time: 24_785_000 picoseconds.
|
||||
Weight::from_parts(25_097_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1489))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
}
|
||||
/// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
|
||||
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
fn reserve_transfer_assets() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `1489`
|
||||
// Minimum execution time: 18_561_000 picoseconds.
|
||||
Weight::from_parts(19_121_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1489))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
}
|
||||
/// Storage: `Benchmark::Override` (r:0 w:0)
|
||||
/// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn execute() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 18_446_744_073_709_551_000 picoseconds.
|
||||
Weight::from_parts(18_446_744_073_709_551_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
/// Storage: `PolkadotXcm::SupportedVersion` (r:0 w:1)
|
||||
/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn force_xcm_version() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 9_298_000 picoseconds.
|
||||
Weight::from_parts(9_721_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `PolkadotXcm::SafeXcmVersion` (r:0 w:1)
|
||||
/// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
fn force_default_xcm_version() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_912_000 picoseconds.
|
||||
Weight::from_parts(3_262_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `PolkadotXcm::VersionNotifiers` (r:1 w:1)
|
||||
/// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `PolkadotXcm::QueryCounter` (r:1 w:1)
|
||||
/// Proof: `PolkadotXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
|
||||
/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
|
||||
/// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0)
|
||||
/// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
|
||||
/// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
|
||||
/// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `PolkadotXcm::Queries` (r:0 w:1)
|
||||
/// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn force_subscribe_version_notify() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `109`
|
||||
// Estimated: `3574`
|
||||
// Minimum execution time: 35_127_000 picoseconds.
|
||||
Weight::from_parts(36_317_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3574))
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
/// Storage: `PolkadotXcm::VersionNotifiers` (r:1 w:1)
|
||||
/// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
|
||||
/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
|
||||
/// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0)
|
||||
/// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
|
||||
/// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
|
||||
/// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `PolkadotXcm::Queries` (r:0 w:1)
|
||||
/// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn force_unsubscribe_version_notify() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `326`
|
||||
// Estimated: `3791`
|
||||
// Minimum execution time: 36_634_000 picoseconds.
|
||||
Weight::from_parts(37_983_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3791))
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: `PolkadotXcm::XcmExecutionSuspended` (r:0 w:1)
|
||||
/// Proof: `PolkadotXcm::XcmExecutionSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
fn force_suspension() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_940_000 picoseconds.
|
||||
Weight::from_parts(3_085_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `PolkadotXcm::SupportedVersion` (r:4 w:2)
|
||||
/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn migrate_supported_version() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `162`
|
||||
// Estimated: `11052`
|
||||
// Minimum execution time: 17_400_000 picoseconds.
|
||||
Weight::from_parts(17_759_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11052))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `PolkadotXcm::VersionNotifiers` (r:4 w:2)
|
||||
/// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn migrate_version_notifiers() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `166`
|
||||
// Estimated: `11056`
|
||||
// Minimum execution time: 17_287_000 picoseconds.
|
||||
Weight::from_parts(17_678_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11056))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `PolkadotXcm::VersionNotifyTargets` (r:5 w:0)
|
||||
/// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn already_notified_target() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `173`
|
||||
// Estimated: `13538`
|
||||
// Minimum execution time: 18_941_000 picoseconds.
|
||||
Weight::from_parts(19_285_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 13538))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
}
|
||||
/// Storage: `PolkadotXcm::VersionNotifyTargets` (r:2 w:1)
|
||||
/// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
|
||||
/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
|
||||
/// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0)
|
||||
/// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
|
||||
/// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
|
||||
/// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
fn notify_current_targets() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `176`
|
||||
// Estimated: `6116`
|
||||
// Minimum execution time: 32_668_000 picoseconds.
|
||||
Weight::from_parts(33_533_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6116))
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: `PolkadotXcm::VersionNotifyTargets` (r:3 w:0)
|
||||
/// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn notify_target_migration_fail() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `206`
|
||||
// Estimated: `8621`
|
||||
// Minimum execution time: 9_182_000 picoseconds.
|
||||
Weight::from_parts(9_498_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 8621))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
}
|
||||
/// Storage: `PolkadotXcm::VersionNotifyTargets` (r:4 w:2)
|
||||
/// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn migrate_version_notify_targets() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `173`
|
||||
// Estimated: `11063`
|
||||
// Minimum execution time: 17_519_000 picoseconds.
|
||||
Weight::from_parts(17_943_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11063))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `PolkadotXcm::VersionNotifyTargets` (r:4 w:2)
|
||||
/// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
|
||||
/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
|
||||
/// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0)
|
||||
/// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
|
||||
/// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
|
||||
/// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
fn migrate_and_notify_old_targets() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `179`
|
||||
// Estimated: `11069`
|
||||
// Minimum execution time: 38_680_000 picoseconds.
|
||||
Weight::from_parts(39_984_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11069))
|
||||
.saturating_add(T::DbWeight::get().reads(9))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
}
|
||||
+124
@@ -0,0 +1,124 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Cumulus.
|
||||
|
||||
// Cumulus is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Cumulus is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_xcm_bridge_hub_router`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-09-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-guclnr1q-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-rococo-dev")`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// target/production/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --extrinsic=*
|
||||
// --wasm-execution=compiled
|
||||
// --heap-pages=4096
|
||||
// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json
|
||||
// --pallet=pallet_xcm_bridge_hub_router
|
||||
// --chain=asset-hub-rococo-dev
|
||||
// --header=./cumulus/file_header.txt
|
||||
// --output=./cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_xcm_bridge_hub_router`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_xcm_bridge_hub_router::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: UNKNOWN KEY `0x48297505634037ef48c848c99c0b1f1b` (r:1 w:0)
|
||||
/// Proof: UNKNOWN KEY `0x48297505634037ef48c848c99c0b1f1b` (r:1 w:0)
|
||||
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0)
|
||||
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmpQueue::InboundXcmpStatus` (r:1 w:0)
|
||||
/// Proof: `XcmpQueue::InboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `ToRococoXcmRouter::Bridge` (r:1 w:1)
|
||||
/// Proof: `ToRococoXcmRouter::Bridge` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`)
|
||||
fn on_initialize_when_non_congested() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `232`
|
||||
// Estimated: `3697`
|
||||
// Minimum execution time: 10_861_000 picoseconds.
|
||||
Weight::from_parts(11_253_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3697))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: UNKNOWN KEY `0x48297505634037ef48c848c99c0b1f1b` (r:1 w:0)
|
||||
/// Proof: UNKNOWN KEY `0x48297505634037ef48c848c99c0b1f1b` (r:1 w:0)
|
||||
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0)
|
||||
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
fn on_initialize_when_congested() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `169`
|
||||
// Estimated: `3634`
|
||||
// Minimum execution time: 5_807_000 picoseconds.
|
||||
Weight::from_parts(6_018_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3634))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
}
|
||||
/// Storage: `ToRococoXcmRouter::Bridge` (r:1 w:1)
|
||||
/// Proof: `ToRococoXcmRouter::Bridge` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`)
|
||||
fn report_bridge_status() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `117`
|
||||
// Estimated: `1502`
|
||||
// Minimum execution time: 11_479_000 picoseconds.
|
||||
Weight::from_parts(11_831_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1502))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: UNKNOWN KEY `0x48297505634037ef48c848c99c0b1f1b` (r:1 w:0)
|
||||
/// Proof: UNKNOWN KEY `0x48297505634037ef48c848c99c0b1f1b` (r:1 w:0)
|
||||
/// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
|
||||
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
/// Storage: UNKNOWN KEY `0x0973fe64c85043ba1c965cbc38eb63c7` (r:1 w:0)
|
||||
/// Proof: UNKNOWN KEY `0x0973fe64c85043ba1c965cbc38eb63c7` (r:1 w:0)
|
||||
/// Storage: `ToRococoXcmRouter::Bridge` (r:1 w:1)
|
||||
/// Proof: `ToRococoXcmRouter::Bridge` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`)
|
||||
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
|
||||
/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
|
||||
/// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0)
|
||||
/// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `ParachainSystem::RelevantMessagingState` (r:1 w:0)
|
||||
/// Proof: `ParachainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
|
||||
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
|
||||
/// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn send_message() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `445`
|
||||
// Estimated: `3910`
|
||||
// Minimum execution time: 52_670_000 picoseconds.
|
||||
Weight::from_parts(54_368_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3910))
|
||||
.saturating_add(T::DbWeight::get().reads(9))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
}
|
||||
+124
@@ -0,0 +1,124 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Cumulus.
|
||||
|
||||
// Cumulus is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Cumulus is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_xcm_bridge_hub_router`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-09-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-guclnr1q-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-rococo-dev")`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// target/production/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --extrinsic=*
|
||||
// --wasm-execution=compiled
|
||||
// --heap-pages=4096
|
||||
// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json
|
||||
// --pallet=pallet_xcm_bridge_hub_router
|
||||
// --chain=asset-hub-rococo-dev
|
||||
// --header=./cumulus/file_header.txt
|
||||
// --output=./cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_xcm_bridge_hub_router`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_xcm_bridge_hub_router::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: UNKNOWN KEY `0x48297505634037ef48c848c99c0b1f1b` (r:1 w:0)
|
||||
/// Proof: UNKNOWN KEY `0x48297505634037ef48c848c99c0b1f1b` (r:1 w:0)
|
||||
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0)
|
||||
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmpQueue::InboundXcmpStatus` (r:1 w:0)
|
||||
/// Proof: `XcmpQueue::InboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `ToWococoXcmRouter::Bridge` (r:1 w:1)
|
||||
/// Proof: `ToWococoXcmRouter::Bridge` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`)
|
||||
fn on_initialize_when_non_congested() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `198`
|
||||
// Estimated: `3663`
|
||||
// Minimum execution time: 10_936_000 picoseconds.
|
||||
Weight::from_parts(11_432_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3663))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: UNKNOWN KEY `0x48297505634037ef48c848c99c0b1f1b` (r:1 w:0)
|
||||
/// Proof: UNKNOWN KEY `0x48297505634037ef48c848c99c0b1f1b` (r:1 w:0)
|
||||
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0)
|
||||
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
fn on_initialize_when_congested() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `150`
|
||||
// Estimated: `3615`
|
||||
// Minimum execution time: 5_165_000 picoseconds.
|
||||
Weight::from_parts(5_356_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3615))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
}
|
||||
/// Storage: `ToWococoXcmRouter::Bridge` (r:1 w:1)
|
||||
/// Proof: `ToWococoXcmRouter::Bridge` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`)
|
||||
fn report_bridge_status() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `83`
|
||||
// Estimated: `1502`
|
||||
// Minimum execution time: 11_420_000 picoseconds.
|
||||
Weight::from_parts(11_946_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1502))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: UNKNOWN KEY `0x48297505634037ef48c848c99c0b1f1b` (r:1 w:0)
|
||||
/// Proof: UNKNOWN KEY `0x48297505634037ef48c848c99c0b1f1b` (r:1 w:0)
|
||||
/// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
|
||||
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
/// Storage: UNKNOWN KEY `0x0973fe64c85043ba1c965cbc38eb63c7` (r:1 w:0)
|
||||
/// Proof: UNKNOWN KEY `0x0973fe64c85043ba1c965cbc38eb63c7` (r:1 w:0)
|
||||
/// Storage: `ToWococoXcmRouter::Bridge` (r:1 w:1)
|
||||
/// Proof: `ToWococoXcmRouter::Bridge` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`)
|
||||
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
|
||||
/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
|
||||
/// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0)
|
||||
/// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `ParachainSystem::RelevantMessagingState` (r:1 w:0)
|
||||
/// Proof: `ParachainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
|
||||
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
|
||||
/// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn send_message() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `392`
|
||||
// Estimated: `3857`
|
||||
// Minimum execution time: 52_129_000 picoseconds.
|
||||
Weight::from_parts(53_552_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3857))
|
||||
.saturating_add(T::DbWeight::get().reads(9))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
pub mod constants {
|
||||
use frame_support::{
|
||||
parameter_types,
|
||||
weights::{constants, RuntimeDbWeight},
|
||||
};
|
||||
|
||||
parameter_types! {
|
||||
/// `ParityDB` can be enabled with a feature flag, but is still experimental. These weights
|
||||
/// are available for brave runtime engineers who may want to try this out as default.
|
||||
pub const ParityDbWeight: RuntimeDbWeight = RuntimeDbWeight {
|
||||
read: 8_000 * constants::WEIGHT_REF_TIME_PER_NANOS,
|
||||
write: 50_000 * constants::WEIGHT_REF_TIME_PER_NANOS,
|
||||
};
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod test_db_weights {
|
||||
use super::constants::ParityDbWeight as W;
|
||||
use frame_support::weights::constants;
|
||||
|
||||
/// Checks that all weights exist and have sane values.
|
||||
// NOTE: If this test fails but you are sure that the generated values are fine,
|
||||
// you can delete it.
|
||||
#[test]
|
||||
fn sane() {
|
||||
// At least 1 µs.
|
||||
assert!(
|
||||
W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS,
|
||||
"Read weight should be at least 1 µs."
|
||||
);
|
||||
assert!(
|
||||
W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS,
|
||||
"Write weight should be at least 1 µs."
|
||||
);
|
||||
// At most 1 ms.
|
||||
assert!(
|
||||
W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS,
|
||||
"Read weight should be at most 1 ms."
|
||||
);
|
||||
assert!(
|
||||
W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS,
|
||||
"Write weight should be at most 1 ms."
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
pub mod constants {
|
||||
use frame_support::{
|
||||
parameter_types,
|
||||
weights::{constants, RuntimeDbWeight},
|
||||
};
|
||||
|
||||
parameter_types! {
|
||||
/// By default, Substrate uses `RocksDB`, so this will be the weight used throughout
|
||||
/// the runtime.
|
||||
pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight {
|
||||
read: 25_000 * constants::WEIGHT_REF_TIME_PER_NANOS,
|
||||
write: 100_000 * constants::WEIGHT_REF_TIME_PER_NANOS,
|
||||
};
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod test_db_weights {
|
||||
use super::constants::RocksDbWeight as W;
|
||||
use frame_support::weights::constants;
|
||||
|
||||
/// Checks that all weights exist and have sane values.
|
||||
// NOTE: If this test fails but you are sure that the generated values are fine,
|
||||
// you can delete it.
|
||||
#[test]
|
||||
fn sane() {
|
||||
// At least 1 µs.
|
||||
assert!(
|
||||
W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS,
|
||||
"Read weight should be at least 1 µs."
|
||||
);
|
||||
assert!(
|
||||
W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS,
|
||||
"Write weight should be at least 1 µs."
|
||||
);
|
||||
// At most 1 ms.
|
||||
assert!(
|
||||
W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS,
|
||||
"Read weight should be at most 1 ms."
|
||||
);
|
||||
assert!(
|
||||
W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS,
|
||||
"Write weight should be at most 1 ms."
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,256 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Cumulus.
|
||||
|
||||
// Cumulus is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Cumulus is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
mod pallet_xcm_benchmarks_fungible;
|
||||
mod pallet_xcm_benchmarks_generic;
|
||||
|
||||
use crate::{xcm_config::MaxAssetsIntoHolding, Runtime};
|
||||
use frame_support::weights::Weight;
|
||||
use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight;
|
||||
use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric;
|
||||
use sp_std::prelude::*;
|
||||
use xcm::{latest::prelude::*, DoubleEncoded};
|
||||
|
||||
trait WeighMultiAssets {
|
||||
fn weigh_multi_assets(&self, weight: Weight) -> Weight;
|
||||
}
|
||||
|
||||
const MAX_ASSETS: u64 = 100;
|
||||
|
||||
impl WeighMultiAssets for MultiAssetFilter {
|
||||
fn weigh_multi_assets(&self, weight: Weight) -> Weight {
|
||||
match self {
|
||||
Self::Definite(assets) => weight.saturating_mul(assets.inner().iter().count() as u64),
|
||||
Self::Wild(asset) => match asset {
|
||||
All => weight.saturating_mul(MAX_ASSETS),
|
||||
AllOf { fun, .. } => match fun {
|
||||
WildFungibility::Fungible => weight,
|
||||
// Magic number 2 has to do with the fact that we could have up to 2 times
|
||||
// MaxAssetsIntoHolding in the worst-case scenario.
|
||||
WildFungibility::NonFungible =>
|
||||
weight.saturating_mul((MaxAssetsIntoHolding::get() * 2) as u64),
|
||||
},
|
||||
AllCounted(count) => weight.saturating_mul(MAX_ASSETS.min(*count as u64)),
|
||||
AllOfCounted { count, .. } => weight.saturating_mul(MAX_ASSETS.min(*count as u64)),
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl WeighMultiAssets for MultiAssets {
|
||||
fn weigh_multi_assets(&self, weight: Weight) -> Weight {
|
||||
weight.saturating_mul(self.inner().iter().count() as u64)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct AssetHubRococoXcmWeight<Call>(core::marker::PhantomData<Call>);
|
||||
impl<Call> XcmWeightInfo<Call> for AssetHubRococoXcmWeight<Call> {
|
||||
fn withdraw_asset(assets: &MultiAssets) -> Weight {
|
||||
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::withdraw_asset())
|
||||
}
|
||||
// Currently there is no trusted reserve (`IsReserve = ()`),
|
||||
// but we need this hack for `pallet_xcm::reserve_transfer_assets`
|
||||
// (TODO) fix https://github.com/paritytech/polkadot/pull/7424
|
||||
// (TODO) fix https://github.com/paritytech/polkadot/pull/7546
|
||||
fn reserve_asset_deposited(_assets: &MultiAssets) -> Weight {
|
||||
// TODO: if we change `IsReserve = ...` then use this line...
|
||||
// TODO: or if remote weight estimation is fixed, then remove
|
||||
// TODO: hardcoded - fix https://github.com/paritytech/cumulus/issues/1974
|
||||
let hardcoded_weight = Weight::from_parts(1_000_000_000_u64, 0);
|
||||
hardcoded_weight.min(XcmFungibleWeight::<Runtime>::reserve_asset_deposited())
|
||||
}
|
||||
fn receive_teleported_asset(assets: &MultiAssets) -> Weight {
|
||||
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::receive_teleported_asset())
|
||||
}
|
||||
fn query_response(
|
||||
_query_id: &u64,
|
||||
_response: &Response,
|
||||
_max_weight: &Weight,
|
||||
_querier: &Option<MultiLocation>,
|
||||
) -> Weight {
|
||||
XcmGeneric::<Runtime>::query_response()
|
||||
}
|
||||
fn transfer_asset(assets: &MultiAssets, _dest: &MultiLocation) -> Weight {
|
||||
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::transfer_asset())
|
||||
}
|
||||
fn transfer_reserve_asset(
|
||||
assets: &MultiAssets,
|
||||
_dest: &MultiLocation,
|
||||
_xcm: &Xcm<()>,
|
||||
) -> Weight {
|
||||
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::transfer_reserve_asset())
|
||||
}
|
||||
fn transact(
|
||||
_origin_type: &OriginKind,
|
||||
_require_weight_at_most: &Weight,
|
||||
_call: &DoubleEncoded<Call>,
|
||||
) -> Weight {
|
||||
XcmGeneric::<Runtime>::transact()
|
||||
}
|
||||
fn hrmp_new_channel_open_request(
|
||||
_sender: &u32,
|
||||
_max_message_size: &u32,
|
||||
_max_capacity: &u32,
|
||||
) -> Weight {
|
||||
// XCM Executor does not currently support HRMP channel operations
|
||||
Weight::MAX
|
||||
}
|
||||
fn hrmp_channel_accepted(_recipient: &u32) -> Weight {
|
||||
// XCM Executor does not currently support HRMP channel operations
|
||||
Weight::MAX
|
||||
}
|
||||
fn hrmp_channel_closing(_initiator: &u32, _sender: &u32, _recipient: &u32) -> Weight {
|
||||
// XCM Executor does not currently support HRMP channel operations
|
||||
Weight::MAX
|
||||
}
|
||||
fn clear_origin() -> Weight {
|
||||
XcmGeneric::<Runtime>::clear_origin()
|
||||
}
|
||||
fn descend_origin(_who: &InteriorMultiLocation) -> Weight {
|
||||
XcmGeneric::<Runtime>::descend_origin()
|
||||
}
|
||||
fn report_error(_query_response_info: &QueryResponseInfo) -> Weight {
|
||||
XcmGeneric::<Runtime>::report_error()
|
||||
}
|
||||
|
||||
fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> Weight {
|
||||
// Hardcoded till the XCM pallet is fixed
|
||||
let hardcoded_weight = Weight::from_parts(1_000_000_000_u64, 0);
|
||||
let weight = assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::deposit_asset());
|
||||
hardcoded_weight.min(weight)
|
||||
}
|
||||
fn deposit_reserve_asset(
|
||||
assets: &MultiAssetFilter,
|
||||
_dest: &MultiLocation,
|
||||
_xcm: &Xcm<()>,
|
||||
) -> Weight {
|
||||
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::deposit_reserve_asset())
|
||||
}
|
||||
fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets, _maximal: &bool) -> Weight {
|
||||
Weight::MAX
|
||||
}
|
||||
fn initiate_reserve_withdraw(
|
||||
assets: &MultiAssetFilter,
|
||||
_reserve: &MultiLocation,
|
||||
_xcm: &Xcm<()>,
|
||||
) -> Weight {
|
||||
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::initiate_reserve_withdraw())
|
||||
}
|
||||
fn initiate_teleport(
|
||||
assets: &MultiAssetFilter,
|
||||
_dest: &MultiLocation,
|
||||
_xcm: &Xcm<()>,
|
||||
) -> Weight {
|
||||
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::initiate_teleport())
|
||||
}
|
||||
fn report_holding(_response_info: &QueryResponseInfo, _assets: &MultiAssetFilter) -> Weight {
|
||||
XcmGeneric::<Runtime>::report_holding()
|
||||
}
|
||||
fn buy_execution(_fees: &MultiAsset, _weight_limit: &WeightLimit) -> Weight {
|
||||
XcmGeneric::<Runtime>::buy_execution()
|
||||
}
|
||||
fn refund_surplus() -> Weight {
|
||||
XcmGeneric::<Runtime>::refund_surplus()
|
||||
}
|
||||
fn set_error_handler(_xcm: &Xcm<Call>) -> Weight {
|
||||
XcmGeneric::<Runtime>::set_error_handler()
|
||||
}
|
||||
fn set_appendix(_xcm: &Xcm<Call>) -> Weight {
|
||||
XcmGeneric::<Runtime>::set_appendix()
|
||||
}
|
||||
fn clear_error() -> Weight {
|
||||
XcmGeneric::<Runtime>::clear_error()
|
||||
}
|
||||
fn claim_asset(_assets: &MultiAssets, _ticket: &MultiLocation) -> Weight {
|
||||
XcmGeneric::<Runtime>::claim_asset()
|
||||
}
|
||||
fn trap(_code: &u64) -> Weight {
|
||||
XcmGeneric::<Runtime>::trap()
|
||||
}
|
||||
fn subscribe_version(_query_id: &QueryId, _max_response_weight: &Weight) -> Weight {
|
||||
XcmGeneric::<Runtime>::subscribe_version()
|
||||
}
|
||||
fn unsubscribe_version() -> Weight {
|
||||
XcmGeneric::<Runtime>::unsubscribe_version()
|
||||
}
|
||||
fn burn_asset(assets: &MultiAssets) -> Weight {
|
||||
assets.weigh_multi_assets(XcmGeneric::<Runtime>::burn_asset())
|
||||
}
|
||||
fn expect_asset(assets: &MultiAssets) -> Weight {
|
||||
assets.weigh_multi_assets(XcmGeneric::<Runtime>::expect_asset())
|
||||
}
|
||||
fn expect_origin(_origin: &Option<MultiLocation>) -> Weight {
|
||||
XcmGeneric::<Runtime>::expect_origin()
|
||||
}
|
||||
fn expect_error(_error: &Option<(u32, XcmError)>) -> Weight {
|
||||
XcmGeneric::<Runtime>::expect_error()
|
||||
}
|
||||
fn expect_transact_status(_transact_status: &MaybeErrorCode) -> Weight {
|
||||
XcmGeneric::<Runtime>::expect_transact_status()
|
||||
}
|
||||
fn query_pallet(_module_name: &Vec<u8>, _response_info: &QueryResponseInfo) -> Weight {
|
||||
XcmGeneric::<Runtime>::query_pallet()
|
||||
}
|
||||
fn expect_pallet(
|
||||
_index: &u32,
|
||||
_name: &Vec<u8>,
|
||||
_module_name: &Vec<u8>,
|
||||
_crate_major: &u32,
|
||||
_min_crate_minor: &u32,
|
||||
) -> Weight {
|
||||
XcmGeneric::<Runtime>::expect_pallet()
|
||||
}
|
||||
fn report_transact_status(_response_info: &QueryResponseInfo) -> Weight {
|
||||
XcmGeneric::<Runtime>::report_transact_status()
|
||||
}
|
||||
fn clear_transact_status() -> Weight {
|
||||
XcmGeneric::<Runtime>::clear_transact_status()
|
||||
}
|
||||
fn universal_origin(_: &Junction) -> Weight {
|
||||
XcmGeneric::<Runtime>::universal_origin()
|
||||
}
|
||||
fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> Weight {
|
||||
Weight::MAX
|
||||
}
|
||||
fn lock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight {
|
||||
Weight::MAX
|
||||
}
|
||||
fn unlock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight {
|
||||
Weight::MAX
|
||||
}
|
||||
fn note_unlockable(_: &MultiAsset, _: &MultiLocation) -> Weight {
|
||||
Weight::MAX
|
||||
}
|
||||
fn request_unlock(_: &MultiAsset, _: &MultiLocation) -> Weight {
|
||||
Weight::MAX
|
||||
}
|
||||
fn set_fees_mode(_: &bool) -> Weight {
|
||||
XcmGeneric::<Runtime>::set_fees_mode()
|
||||
}
|
||||
fn set_topic(_topic: &[u8; 32]) -> Weight {
|
||||
XcmGeneric::<Runtime>::set_topic()
|
||||
}
|
||||
fn clear_topic() -> Weight {
|
||||
XcmGeneric::<Runtime>::clear_topic()
|
||||
}
|
||||
fn alias_origin(_: &MultiLocation) -> Weight {
|
||||
// XCM Executor does not currently support alias origin operations
|
||||
Weight::MAX
|
||||
}
|
||||
fn unpaid_execution(_: &WeightLimit, _: &Option<MultiLocation>) -> Weight {
|
||||
XcmGeneric::<Runtime>::unpaid_execution()
|
||||
}
|
||||
}
|
||||
+190
@@ -0,0 +1,190 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Cumulus.
|
||||
|
||||
// Cumulus is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Cumulus is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_xcm_benchmarks::fungible`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-rococo-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --template=./templates/xcm-bench-template.hbs
|
||||
// --chain=asset-hub-rococo-dev
|
||||
// --wasm-execution=compiled
|
||||
// --pallet=pallet_xcm_benchmarks::fungible
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --extrinsic=*
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --json
|
||||
// --header=./file_header.txt
|
||||
// --output=./parachains/runtimes/assets/asset-hub-rococo/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use sp_std::marker::PhantomData;
|
||||
|
||||
/// Weights for `pallet_xcm_benchmarks::fungible`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo<T> {
|
||||
// Storage: `System::Account` (r:1 w:1)
|
||||
// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
pub fn withdraw_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `101`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 26_104_000 picoseconds.
|
||||
Weight::from_parts(26_722_000, 3593)
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
// Storage: `System::Account` (r:2 w:2)
|
||||
// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
pub fn transfer_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `101`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 52_259_000 picoseconds.
|
||||
Weight::from_parts(53_854_000, 6196)
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
// Storage: `System::Account` (r:2 w:2)
|
||||
// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
|
||||
// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
|
||||
// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
|
||||
// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0)
|
||||
// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
|
||||
// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
|
||||
// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
pub fn transfer_reserve_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `210`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 77_248_000 picoseconds.
|
||||
Weight::from_parts(80_354_000, 6196)
|
||||
.saturating_add(T::DbWeight::get().reads(8))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
// Storage: `Benchmark::Override` (r:0 w:0)
|
||||
// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
pub fn reserve_asset_deposited() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 500_000_000_000 picoseconds.
|
||||
Weight::from_parts(500_000_000_000, 0)
|
||||
}
|
||||
// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
|
||||
// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
|
||||
// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
|
||||
// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0)
|
||||
// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
|
||||
// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
|
||||
// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
pub fn initiate_reserve_withdraw() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `109`
|
||||
// Estimated: `3574`
|
||||
// Minimum execution time: 482_070_000 picoseconds.
|
||||
Weight::from_parts(490_269_000, 3574)
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
pub fn receive_teleported_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_970_000 picoseconds.
|
||||
Weight::from_parts(4_056_000, 0)
|
||||
}
|
||||
// Storage: `System::Account` (r:1 w:1)
|
||||
// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
pub fn deposit_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 26_324_000 picoseconds.
|
||||
Weight::from_parts(26_985_000, 3593)
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
// Storage: `System::Account` (r:1 w:1)
|
||||
// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
|
||||
// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
|
||||
// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
|
||||
// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0)
|
||||
// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
|
||||
// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
|
||||
// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
pub fn deposit_reserve_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `109`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 52_814_000 picoseconds.
|
||||
Weight::from_parts(54_666_000, 3593)
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
|
||||
// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
|
||||
// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
|
||||
// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0)
|
||||
// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
|
||||
// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
|
||||
// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
pub fn initiate_teleport() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `109`
|
||||
// Estimated: `3574`
|
||||
// Minimum execution time: 33_044_000 picoseconds.
|
||||
Weight::from_parts(33_849_000, 3574)
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
}
|
||||
+339
@@ -0,0 +1,339 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Cumulus.
|
||||
|
||||
// Cumulus is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Cumulus is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_xcm_benchmarks::generic`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-rococo-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --template=./templates/xcm-bench-template.hbs
|
||||
// --chain=asset-hub-rococo-dev
|
||||
// --wasm-execution=compiled
|
||||
// --pallet=pallet_xcm_benchmarks::generic
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --extrinsic=*
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --json
|
||||
// --header=./file_header.txt
|
||||
// --output=./parachains/runtimes/assets/asset-hub-rococo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use sp_std::marker::PhantomData;
|
||||
|
||||
/// Weights for `pallet_xcm_benchmarks::generic`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo<T> {
|
||||
// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
|
||||
// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
|
||||
// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
|
||||
// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0)
|
||||
// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
|
||||
// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
|
||||
// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
pub fn report_holding() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `109`
|
||||
// Estimated: `3574`
|
||||
// Minimum execution time: 432_196_000 picoseconds.
|
||||
Weight::from_parts(438_017_000, 3574)
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
pub fn buy_execution() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 4_223_000 picoseconds.
|
||||
Weight::from_parts(4_412_000, 0)
|
||||
}
|
||||
// Storage: `PolkadotXcm::Queries` (r:1 w:0)
|
||||
// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
pub fn query_response() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `103`
|
||||
// Estimated: `3568`
|
||||
// Minimum execution time: 11_582_000 picoseconds.
|
||||
Weight::from_parts(11_830_000, 3568)
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
}
|
||||
pub fn transact() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 13_955_000 picoseconds.
|
||||
Weight::from_parts(14_320_000, 0)
|
||||
}
|
||||
pub fn refund_surplus() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 4_423_000 picoseconds.
|
||||
Weight::from_parts(4_709_000, 0)
|
||||
}
|
||||
pub fn set_error_handler() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_028_000 picoseconds.
|
||||
Weight::from_parts(3_151_000, 0)
|
||||
}
|
||||
pub fn set_appendix() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_966_000 picoseconds.
|
||||
Weight::from_parts(3_076_000, 0)
|
||||
}
|
||||
pub fn clear_error() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_971_000 picoseconds.
|
||||
Weight::from_parts(3_119_000, 0)
|
||||
}
|
||||
pub fn descend_origin() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_772_000 picoseconds.
|
||||
Weight::from_parts(3_853_000, 0)
|
||||
}
|
||||
pub fn clear_origin() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_940_000 picoseconds.
|
||||
Weight::from_parts(3_050_000, 0)
|
||||
}
|
||||
// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
|
||||
// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
|
||||
// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
|
||||
// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0)
|
||||
// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
|
||||
// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
|
||||
// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
pub fn report_error() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `109`
|
||||
// Estimated: `3574`
|
||||
// Minimum execution time: 27_734_000 picoseconds.
|
||||
Weight::from_parts(28_351_000, 3574)
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
// Storage: `PolkadotXcm::AssetTraps` (r:1 w:1)
|
||||
// Proof: `PolkadotXcm::AssetTraps` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
pub fn claim_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `160`
|
||||
// Estimated: `3625`
|
||||
// Minimum execution time: 16_456_000 picoseconds.
|
||||
Weight::from_parts(16_846_000, 3625)
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
pub fn trap() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_974_000 picoseconds.
|
||||
Weight::from_parts(3_108_000, 0)
|
||||
}
|
||||
// Storage: `PolkadotXcm::VersionNotifyTargets` (r:1 w:1)
|
||||
// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
|
||||
// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
|
||||
// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0)
|
||||
// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
|
||||
// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
|
||||
// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
pub fn subscribe_version() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `109`
|
||||
// Estimated: `3574`
|
||||
// Minimum execution time: 29_823_000 picoseconds.
|
||||
Weight::from_parts(30_776_000, 3574)
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
// Storage: `PolkadotXcm::VersionNotifyTargets` (r:0 w:1)
|
||||
// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
pub fn unsubscribe_version() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 4_966_000 picoseconds.
|
||||
Weight::from_parts(5_157_000, 0)
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
pub fn burn_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 141_875_000 picoseconds.
|
||||
Weight::from_parts(144_925_000, 0)
|
||||
}
|
||||
pub fn expect_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 13_147_000 picoseconds.
|
||||
Weight::from_parts(13_420_000, 0)
|
||||
}
|
||||
pub fn expect_origin() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_050_000 picoseconds.
|
||||
Weight::from_parts(3_161_000, 0)
|
||||
}
|
||||
pub fn expect_error() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_930_000 picoseconds.
|
||||
Weight::from_parts(3_077_000, 0)
|
||||
}
|
||||
pub fn expect_transact_status() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_188_000 picoseconds.
|
||||
Weight::from_parts(3_299_000, 0)
|
||||
}
|
||||
// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
|
||||
// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
|
||||
// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
|
||||
// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0)
|
||||
// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
|
||||
// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
|
||||
// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
pub fn query_pallet() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `109`
|
||||
// Estimated: `3574`
|
||||
// Minimum execution time: 31_678_000 picoseconds.
|
||||
Weight::from_parts(32_462_000, 3574)
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
pub fn expect_pallet() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 5_638_000 picoseconds.
|
||||
Weight::from_parts(5_756_000, 0)
|
||||
}
|
||||
// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
|
||||
// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
|
||||
// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
|
||||
// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0)
|
||||
// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
|
||||
// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
|
||||
// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
pub fn report_transact_status() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `109`
|
||||
// Estimated: `3574`
|
||||
// Minimum execution time: 27_556_000 picoseconds.
|
||||
Weight::from_parts(28_240_000, 3574)
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
pub fn clear_transact_status() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_932_000 picoseconds.
|
||||
Weight::from_parts(3_097_000, 0)
|
||||
}
|
||||
pub fn set_topic() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_860_000 picoseconds.
|
||||
Weight::from_parts(2_957_000, 0)
|
||||
}
|
||||
pub fn clear_topic() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_886_000 picoseconds.
|
||||
Weight::from_parts(3_015_000, 0)
|
||||
}
|
||||
// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
|
||||
// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
pub fn universal_origin() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `1489`
|
||||
// Minimum execution time: 5_088_000 picoseconds.
|
||||
Weight::from_parts(5_253_000, 1489)
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
}
|
||||
pub fn set_fees_mode() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_874_000 picoseconds.
|
||||
Weight::from_parts(3_060_000, 0)
|
||||
}
|
||||
pub fn unpaid_execution() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_029_000 picoseconds.
|
||||
Weight::from_parts(3_158_000, 0)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,942 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use super::{
|
||||
AccountId, AllPalletsWithSystem, Assets, Authorship, Balance, Balances, ForeignAssets,
|
||||
ForeignAssetsInstance, ParachainInfo, ParachainSystem, PolkadotXcm, PoolAssets, Runtime,
|
||||
RuntimeCall, RuntimeEvent, RuntimeFlavor, RuntimeOrigin, ToRococoXcmRouter, ToWococoXcmRouter,
|
||||
TransactionByteFee, TrustBackedAssetsInstance, WeightToFee, XcmpQueue,
|
||||
};
|
||||
use assets_common::{
|
||||
local_and_foreign_assets::MatchesLocalAndForeignAssetsMultiLocation,
|
||||
matching::{FromSiblingParachain, IsForeignConcreteAsset},
|
||||
};
|
||||
use frame_support::{
|
||||
match_types, parameter_types,
|
||||
traits::{ConstU32, Contains, Equals, Everything, Get, Nothing, PalletInfoAccess},
|
||||
};
|
||||
use frame_system::EnsureRoot;
|
||||
use pallet_xcm::XcmPassthrough;
|
||||
use parachains_common::{
|
||||
impls::ToStakingPot,
|
||||
xcm_config::{AssetFeeAsExistentialDepositMultiplier, ConcreteAssetFromSystem},
|
||||
};
|
||||
use polkadot_parachain_primitives::primitives::Sibling;
|
||||
use sp_runtime::traits::ConvertInto;
|
||||
use xcm::latest::prelude::*;
|
||||
use xcm_builder::{
|
||||
AccountId32Aliases, AllAssets, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
|
||||
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter,
|
||||
DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily,
|
||||
EnsureXcmOrigin, FungiblesAdapter, GlobalConsensusParachainConvertsFor, HashedDescription,
|
||||
IsConcrete, LocalMint, LocationWithAssetFilters, NetworkExportTableItem, NoChecking,
|
||||
ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative,
|
||||
SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,
|
||||
SovereignSignedViaLocation, StartsWith, StartsWithExplicitGlobalConsensus, TakeWeightCredit,
|
||||
TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
|
||||
};
|
||||
use xcm_executor::{traits::WithOriginFilter, XcmExecutor};
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
use cumulus_primitives_core::ParaId;
|
||||
|
||||
parameter_types! {
|
||||
pub storage Flavor: RuntimeFlavor = RuntimeFlavor::default();
|
||||
pub const TokenLocation: MultiLocation = MultiLocation::parent();
|
||||
pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into();
|
||||
pub UniversalLocation: InteriorMultiLocation =
|
||||
X2(GlobalConsensus(RelayNetwork::get()), Parachain(ParachainInfo::parachain_id().into()));
|
||||
pub UniversalLocationNetworkId: NetworkId = UniversalLocation::get().global_consensus().unwrap();
|
||||
pub TrustBackedAssetsPalletLocation: MultiLocation =
|
||||
PalletInstance(<Assets as PalletInfoAccess>::index() as u8).into();
|
||||
pub ForeignAssetsPalletLocation: MultiLocation =
|
||||
PalletInstance(<ForeignAssets as PalletInfoAccess>::index() as u8).into();
|
||||
pub PoolAssetsPalletLocation: MultiLocation =
|
||||
PalletInstance(<PoolAssets as PalletInfoAccess>::index() as u8).into();
|
||||
pub CheckingAccount: AccountId = PolkadotXcm::check_account();
|
||||
pub const GovernanceLocation: MultiLocation = MultiLocation::parent();
|
||||
}
|
||||
|
||||
/// Adapter for resolving `NetworkId` based on `pub storage Flavor: RuntimeFlavor`.
|
||||
pub struct RelayNetwork;
|
||||
impl Get<Option<NetworkId>> for RelayNetwork {
|
||||
fn get() -> Option<NetworkId> {
|
||||
Some(Self::get())
|
||||
}
|
||||
}
|
||||
impl Get<NetworkId> for RelayNetwork {
|
||||
fn get() -> NetworkId {
|
||||
match Flavor::get() {
|
||||
RuntimeFlavor::Rococo => NetworkId::Rococo,
|
||||
RuntimeFlavor::Wococo => NetworkId::Wococo,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used
|
||||
/// when determining ownership of accounts for asset transacting and when attempting to use XCM
|
||||
/// `Transact` in order to determine the dispatch Origin.
|
||||
pub type LocationToAccountId = (
|
||||
// The parent (Relay-chain) origin converts to the parent `AccountId`.
|
||||
ParentIsPreset<AccountId>,
|
||||
// Sibling parachain origins convert to AccountId via the `ParaId::into`.
|
||||
SiblingParachainConvertsVia<Sibling, AccountId>,
|
||||
// Straight up local `AccountId32` origins just alias directly to `AccountId`.
|
||||
AccountId32Aliases<RelayNetwork, AccountId>,
|
||||
// Foreign locations alias into accounts according to a hash of their standard description.
|
||||
HashedDescription<AccountId, DescribeFamily<DescribeAllTerminal>>,
|
||||
// Different global consensus parachain sovereign account.
|
||||
// (Used for over-bridge transfers and reserve processing)
|
||||
GlobalConsensusParachainConvertsFor<UniversalLocation, AccountId>,
|
||||
);
|
||||
|
||||
/// Means for transacting the native currency on this chain.
|
||||
pub type CurrencyTransactor = CurrencyAdapter<
|
||||
// Use this currency:
|
||||
Balances,
|
||||
// Use this currency when it is a fungible asset matching the given location or name:
|
||||
IsConcrete<TokenLocation>,
|
||||
// Convert an XCM MultiLocation into a local account id:
|
||||
LocationToAccountId,
|
||||
// Our chain's account ID type (we can't get away without mentioning it explicitly):
|
||||
AccountId,
|
||||
// We don't track any teleports of `Balances`.
|
||||
(),
|
||||
>;
|
||||
|
||||
/// `AssetId`/`Balance` converter for `PoolAssets`.
|
||||
pub type TrustBackedAssetsConvertedConcreteId =
|
||||
assets_common::TrustBackedAssetsConvertedConcreteId<TrustBackedAssetsPalletLocation, Balance>;
|
||||
|
||||
/// Means for transacting assets besides the native currency on this chain.
|
||||
pub type FungiblesTransactor = FungiblesAdapter<
|
||||
// Use this fungibles implementation:
|
||||
Assets,
|
||||
// Use this currency when it is a fungible asset matching the given location or name:
|
||||
TrustBackedAssetsConvertedConcreteId,
|
||||
// Convert an XCM MultiLocation into a local account id:
|
||||
LocationToAccountId,
|
||||
// Our chain's account ID type (we can't get away without mentioning it explicitly):
|
||||
AccountId,
|
||||
// We only want to allow teleports of known assets. We use non-zero issuance as an indication
|
||||
// that this asset is known.
|
||||
LocalMint<parachains_common::impls::NonZeroIssuance<AccountId, Assets>>,
|
||||
// The account to use for tracking teleports.
|
||||
CheckingAccount,
|
||||
>;
|
||||
|
||||
/// `AssetId/Balance` converter for `TrustBackedAssets`
|
||||
pub type ForeignAssetsConvertedConcreteId = assets_common::ForeignAssetsConvertedConcreteId<
|
||||
(
|
||||
// Ignore `TrustBackedAssets` explicitly
|
||||
StartsWith<TrustBackedAssetsPalletLocation>,
|
||||
// Ignore assets that start explicitly with our `GlobalConsensus(NetworkId)`, means:
|
||||
// - foreign assets from our consensus should be: `MultiLocation {parents: 1,
|
||||
// X*(Parachain(xyz), ..)}`
|
||||
// - foreign assets outside our consensus with the same `GlobalConsensus(NetworkId)` won't
|
||||
// be accepted here
|
||||
StartsWithExplicitGlobalConsensus<UniversalLocationNetworkId>,
|
||||
),
|
||||
Balance,
|
||||
>;
|
||||
|
||||
/// Means for transacting foreign assets from different global consensus.
|
||||
pub type ForeignFungiblesTransactor = FungiblesAdapter<
|
||||
// Use this fungibles implementation:
|
||||
ForeignAssets,
|
||||
// Use this currency when it is a fungible asset matching the given location or name:
|
||||
ForeignAssetsConvertedConcreteId,
|
||||
// Convert an XCM MultiLocation into a local account id:
|
||||
LocationToAccountId,
|
||||
// Our chain's account ID type (we can't get away without mentioning it explicitly):
|
||||
AccountId,
|
||||
// We dont need to check teleports here.
|
||||
NoChecking,
|
||||
// The account to use for tracking teleports.
|
||||
CheckingAccount,
|
||||
>;
|
||||
|
||||
/// `AssetId`/`Balance` converter for `PoolAssets`.
|
||||
pub type PoolAssetsConvertedConcreteId =
|
||||
assets_common::PoolAssetsConvertedConcreteId<PoolAssetsPalletLocation, Balance>;
|
||||
|
||||
/// Means for transacting asset conversion pool assets on this chain.
|
||||
pub type PoolFungiblesTransactor = FungiblesAdapter<
|
||||
// Use this fungibles implementation:
|
||||
PoolAssets,
|
||||
// Use this currency when it is a fungible asset matching the given location or name:
|
||||
PoolAssetsConvertedConcreteId,
|
||||
// Convert an XCM MultiLocation into a local account id:
|
||||
LocationToAccountId,
|
||||
// Our chain's account ID type (we can't get away without mentioning it explicitly):
|
||||
AccountId,
|
||||
// We only want to allow teleports of known assets. We use non-zero issuance as an indication
|
||||
// that this asset is known.
|
||||
LocalMint<parachains_common::impls::NonZeroIssuance<AccountId, PoolAssets>>,
|
||||
// The account to use for tracking teleports.
|
||||
CheckingAccount,
|
||||
>;
|
||||
|
||||
/// Means for transacting assets on this chain.
|
||||
pub type AssetTransactors =
|
||||
(CurrencyTransactor, FungiblesTransactor, ForeignFungiblesTransactor, PoolFungiblesTransactor);
|
||||
|
||||
/// Simple `MultiLocation` matcher for Local and Foreign asset `MultiLocation`.
|
||||
pub struct LocalAndForeignAssetsMultiLocationMatcher;
|
||||
impl MatchesLocalAndForeignAssetsMultiLocation for LocalAndForeignAssetsMultiLocationMatcher {
|
||||
fn is_local(location: &MultiLocation) -> bool {
|
||||
use assets_common::fungible_conversion::MatchesMultiLocation;
|
||||
TrustBackedAssetsConvertedConcreteId::contains(location)
|
||||
}
|
||||
fn is_foreign(location: &MultiLocation) -> bool {
|
||||
use assets_common::fungible_conversion::MatchesMultiLocation;
|
||||
ForeignAssetsConvertedConcreteId::contains(location)
|
||||
}
|
||||
}
|
||||
impl Contains<MultiLocation> for LocalAndForeignAssetsMultiLocationMatcher {
|
||||
fn contains(location: &MultiLocation) -> bool {
|
||||
Self::is_local(location) || Self::is_foreign(location)
|
||||
}
|
||||
}
|
||||
|
||||
/// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance,
|
||||
/// ready for dispatching a transaction with Xcm's `Transact`. There is an `OriginKind` which can
|
||||
/// biases the kind of local `Origin` it will become.
|
||||
pub type XcmOriginToTransactDispatchOrigin = (
|
||||
// Sovereign account converter; this attempts to derive an `AccountId` from the origin location
|
||||
// using `LocationToAccountId` and then turn that into the usual `Signed` origin. Useful for
|
||||
// foreign chains who want to have a local sovereign account on this chain which they control.
|
||||
SovereignSignedViaLocation<LocationToAccountId, RuntimeOrigin>,
|
||||
// Native converter for Relay-chain (Parent) location; will convert to a `Relay` origin when
|
||||
// recognised.
|
||||
RelayChainAsNative<RelayChainOrigin, RuntimeOrigin>,
|
||||
// Native converter for sibling Parachains; will convert to a `SiblingPara` origin when
|
||||
// recognised.
|
||||
SiblingParachainAsNative<cumulus_pallet_xcm::Origin, RuntimeOrigin>,
|
||||
// Superuser converter for the Relay-chain (Parent) location. This will allow it to issue a
|
||||
// transaction from the Root origin.
|
||||
ParentAsSuperuser<RuntimeOrigin>,
|
||||
// Native signed account converter; this just converts an `AccountId32` origin into a normal
|
||||
// `RuntimeOrigin::Signed` origin of the same 32-byte value.
|
||||
SignedAccountId32AsNative<RelayNetwork, RuntimeOrigin>,
|
||||
// Xcm origins can be represented natively under the Xcm pallet's Xcm origin.
|
||||
XcmPassthrough<RuntimeOrigin>,
|
||||
);
|
||||
|
||||
parameter_types! {
|
||||
pub const MaxInstructions: u32 = 100;
|
||||
pub const MaxAssetsIntoHolding: u32 = 64;
|
||||
pub XcmAssetFeesReceiver: Option<AccountId> = Authorship::author();
|
||||
}
|
||||
|
||||
match_types! {
|
||||
pub type ParentOrParentsPlurality: impl Contains<MultiLocation> = {
|
||||
MultiLocation { parents: 1, interior: Here } |
|
||||
MultiLocation { parents: 1, interior: X1(Plurality { .. }) }
|
||||
};
|
||||
pub type ParentOrSiblings: impl Contains<MultiLocation> = {
|
||||
MultiLocation { parents: 1, interior: Here } |
|
||||
MultiLocation { parents: 1, interior: X1(_) }
|
||||
};
|
||||
pub type WithParentsZeroOrOne: impl Contains<MultiLocation> = {
|
||||
MultiLocation { parents: 0, .. } |
|
||||
MultiLocation { parents: 1, .. }
|
||||
};
|
||||
}
|
||||
|
||||
/// A call filter for the XCM Transact instruction. This is a temporary measure until we properly
|
||||
/// account for proof size weights.
|
||||
///
|
||||
/// Calls that are allowed through this filter must:
|
||||
/// 1. Have a fixed weight;
|
||||
/// 2. Cannot lead to another call being made;
|
||||
/// 3. Have a defined proof size weight, e.g. no unbounded vecs in call parameters.
|
||||
pub struct SafeCallFilter;
|
||||
impl Contains<RuntimeCall> for SafeCallFilter {
|
||||
fn contains(call: &RuntimeCall) -> bool {
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
{
|
||||
if matches!(call, RuntimeCall::System(frame_system::Call::remark_with_event { .. })) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
// Allow to change dedicated storage items (called by governance-like)
|
||||
match call {
|
||||
RuntimeCall::System(frame_system::Call::set_storage { items })
|
||||
if items.iter().all(|(k, _)| k.eq(&bridging::XcmBridgeHubRouterByteFee::key())) ||
|
||||
items.iter().all(|(k, _)| k.eq(&Flavor::key())) =>
|
||||
return true,
|
||||
_ => (),
|
||||
};
|
||||
|
||||
matches!(
|
||||
call,
|
||||
RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) |
|
||||
RuntimeCall::System(
|
||||
frame_system::Call::set_heap_pages { .. } |
|
||||
frame_system::Call::set_code { .. } |
|
||||
frame_system::Call::set_code_without_checks { .. } |
|
||||
frame_system::Call::kill_prefix { .. },
|
||||
) | RuntimeCall::ParachainSystem(..) |
|
||||
RuntimeCall::Timestamp(..) |
|
||||
RuntimeCall::Balances(..) |
|
||||
RuntimeCall::CollatorSelection(
|
||||
pallet_collator_selection::Call::set_desired_candidates { .. } |
|
||||
pallet_collator_selection::Call::set_candidacy_bond { .. } |
|
||||
pallet_collator_selection::Call::register_as_candidate { .. } |
|
||||
pallet_collator_selection::Call::leave_intent { .. } |
|
||||
pallet_collator_selection::Call::set_invulnerables { .. } |
|
||||
pallet_collator_selection::Call::add_invulnerable { .. } |
|
||||
pallet_collator_selection::Call::remove_invulnerable { .. },
|
||||
) | RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) |
|
||||
RuntimeCall::XcmpQueue(..) |
|
||||
RuntimeCall::DmpQueue(..) |
|
||||
RuntimeCall::Assets(
|
||||
pallet_assets::Call::create { .. } |
|
||||
pallet_assets::Call::force_create { .. } |
|
||||
pallet_assets::Call::start_destroy { .. } |
|
||||
pallet_assets::Call::destroy_accounts { .. } |
|
||||
pallet_assets::Call::destroy_approvals { .. } |
|
||||
pallet_assets::Call::finish_destroy { .. } |
|
||||
pallet_assets::Call::block { .. } |
|
||||
pallet_assets::Call::mint { .. } |
|
||||
pallet_assets::Call::burn { .. } |
|
||||
pallet_assets::Call::transfer { .. } |
|
||||
pallet_assets::Call::transfer_keep_alive { .. } |
|
||||
pallet_assets::Call::force_transfer { .. } |
|
||||
pallet_assets::Call::freeze { .. } |
|
||||
pallet_assets::Call::thaw { .. } |
|
||||
pallet_assets::Call::freeze_asset { .. } |
|
||||
pallet_assets::Call::thaw_asset { .. } |
|
||||
pallet_assets::Call::transfer_ownership { .. } |
|
||||
pallet_assets::Call::set_team { .. } |
|
||||
pallet_assets::Call::set_metadata { .. } |
|
||||
pallet_assets::Call::clear_metadata { .. } |
|
||||
pallet_assets::Call::force_set_metadata { .. } |
|
||||
pallet_assets::Call::force_clear_metadata { .. } |
|
||||
pallet_assets::Call::force_asset_status { .. } |
|
||||
pallet_assets::Call::approve_transfer { .. } |
|
||||
pallet_assets::Call::cancel_approval { .. } |
|
||||
pallet_assets::Call::force_cancel_approval { .. } |
|
||||
pallet_assets::Call::transfer_approved { .. } |
|
||||
pallet_assets::Call::touch { .. } |
|
||||
pallet_assets::Call::touch_other { .. } |
|
||||
pallet_assets::Call::refund { .. } |
|
||||
pallet_assets::Call::refund_other { .. },
|
||||
) | RuntimeCall::ForeignAssets(
|
||||
pallet_assets::Call::create { .. } |
|
||||
pallet_assets::Call::force_create { .. } |
|
||||
pallet_assets::Call::start_destroy { .. } |
|
||||
pallet_assets::Call::destroy_accounts { .. } |
|
||||
pallet_assets::Call::destroy_approvals { .. } |
|
||||
pallet_assets::Call::finish_destroy { .. } |
|
||||
pallet_assets::Call::block { .. } |
|
||||
pallet_assets::Call::mint { .. } |
|
||||
pallet_assets::Call::burn { .. } |
|
||||
pallet_assets::Call::transfer { .. } |
|
||||
pallet_assets::Call::transfer_keep_alive { .. } |
|
||||
pallet_assets::Call::force_transfer { .. } |
|
||||
pallet_assets::Call::freeze { .. } |
|
||||
pallet_assets::Call::thaw { .. } |
|
||||
pallet_assets::Call::freeze_asset { .. } |
|
||||
pallet_assets::Call::thaw_asset { .. } |
|
||||
pallet_assets::Call::transfer_ownership { .. } |
|
||||
pallet_assets::Call::set_team { .. } |
|
||||
pallet_assets::Call::set_metadata { .. } |
|
||||
pallet_assets::Call::clear_metadata { .. } |
|
||||
pallet_assets::Call::force_set_metadata { .. } |
|
||||
pallet_assets::Call::force_clear_metadata { .. } |
|
||||
pallet_assets::Call::force_asset_status { .. } |
|
||||
pallet_assets::Call::approve_transfer { .. } |
|
||||
pallet_assets::Call::cancel_approval { .. } |
|
||||
pallet_assets::Call::force_cancel_approval { .. } |
|
||||
pallet_assets::Call::transfer_approved { .. } |
|
||||
pallet_assets::Call::touch { .. } |
|
||||
pallet_assets::Call::touch_other { .. } |
|
||||
pallet_assets::Call::refund { .. } |
|
||||
pallet_assets::Call::refund_other { .. },
|
||||
) | RuntimeCall::PoolAssets(
|
||||
pallet_assets::Call::force_create { .. } |
|
||||
pallet_assets::Call::block { .. } |
|
||||
pallet_assets::Call::burn { .. } |
|
||||
pallet_assets::Call::transfer { .. } |
|
||||
pallet_assets::Call::transfer_keep_alive { .. } |
|
||||
pallet_assets::Call::force_transfer { .. } |
|
||||
pallet_assets::Call::freeze { .. } |
|
||||
pallet_assets::Call::thaw { .. } |
|
||||
pallet_assets::Call::freeze_asset { .. } |
|
||||
pallet_assets::Call::thaw_asset { .. } |
|
||||
pallet_assets::Call::transfer_ownership { .. } |
|
||||
pallet_assets::Call::set_team { .. } |
|
||||
pallet_assets::Call::set_metadata { .. } |
|
||||
pallet_assets::Call::clear_metadata { .. } |
|
||||
pallet_assets::Call::force_set_metadata { .. } |
|
||||
pallet_assets::Call::force_clear_metadata { .. } |
|
||||
pallet_assets::Call::force_asset_status { .. } |
|
||||
pallet_assets::Call::approve_transfer { .. } |
|
||||
pallet_assets::Call::cancel_approval { .. } |
|
||||
pallet_assets::Call::force_cancel_approval { .. } |
|
||||
pallet_assets::Call::transfer_approved { .. } |
|
||||
pallet_assets::Call::touch { .. } |
|
||||
pallet_assets::Call::touch_other { .. } |
|
||||
pallet_assets::Call::refund { .. } |
|
||||
pallet_assets::Call::refund_other { .. },
|
||||
) | RuntimeCall::AssetConversion(
|
||||
pallet_asset_conversion::Call::create_pool { .. } |
|
||||
pallet_asset_conversion::Call::add_liquidity { .. } |
|
||||
pallet_asset_conversion::Call::remove_liquidity { .. } |
|
||||
pallet_asset_conversion::Call::swap_tokens_for_exact_tokens { .. } |
|
||||
pallet_asset_conversion::Call::swap_exact_tokens_for_tokens { .. },
|
||||
) | RuntimeCall::NftFractionalization(
|
||||
pallet_nft_fractionalization::Call::fractionalize { .. } |
|
||||
pallet_nft_fractionalization::Call::unify { .. },
|
||||
) | RuntimeCall::Nfts(
|
||||
pallet_nfts::Call::create { .. } |
|
||||
pallet_nfts::Call::force_create { .. } |
|
||||
pallet_nfts::Call::destroy { .. } |
|
||||
pallet_nfts::Call::mint { .. } |
|
||||
pallet_nfts::Call::force_mint { .. } |
|
||||
pallet_nfts::Call::burn { .. } |
|
||||
pallet_nfts::Call::transfer { .. } |
|
||||
pallet_nfts::Call::lock_item_transfer { .. } |
|
||||
pallet_nfts::Call::unlock_item_transfer { .. } |
|
||||
pallet_nfts::Call::lock_collection { .. } |
|
||||
pallet_nfts::Call::transfer_ownership { .. } |
|
||||
pallet_nfts::Call::set_team { .. } |
|
||||
pallet_nfts::Call::force_collection_owner { .. } |
|
||||
pallet_nfts::Call::force_collection_config { .. } |
|
||||
pallet_nfts::Call::approve_transfer { .. } |
|
||||
pallet_nfts::Call::cancel_approval { .. } |
|
||||
pallet_nfts::Call::clear_all_transfer_approvals { .. } |
|
||||
pallet_nfts::Call::lock_item_properties { .. } |
|
||||
pallet_nfts::Call::set_attribute { .. } |
|
||||
pallet_nfts::Call::force_set_attribute { .. } |
|
||||
pallet_nfts::Call::clear_attribute { .. } |
|
||||
pallet_nfts::Call::approve_item_attributes { .. } |
|
||||
pallet_nfts::Call::cancel_item_attributes_approval { .. } |
|
||||
pallet_nfts::Call::set_metadata { .. } |
|
||||
pallet_nfts::Call::clear_metadata { .. } |
|
||||
pallet_nfts::Call::set_collection_metadata { .. } |
|
||||
pallet_nfts::Call::clear_collection_metadata { .. } |
|
||||
pallet_nfts::Call::set_accept_ownership { .. } |
|
||||
pallet_nfts::Call::set_collection_max_supply { .. } |
|
||||
pallet_nfts::Call::update_mint_settings { .. } |
|
||||
pallet_nfts::Call::set_price { .. } |
|
||||
pallet_nfts::Call::buy_item { .. } |
|
||||
pallet_nfts::Call::pay_tips { .. } |
|
||||
pallet_nfts::Call::create_swap { .. } |
|
||||
pallet_nfts::Call::cancel_swap { .. } |
|
||||
pallet_nfts::Call::claim_swap { .. },
|
||||
) | RuntimeCall::Uniques(
|
||||
pallet_uniques::Call::create { .. } |
|
||||
pallet_uniques::Call::force_create { .. } |
|
||||
pallet_uniques::Call::destroy { .. } |
|
||||
pallet_uniques::Call::mint { .. } |
|
||||
pallet_uniques::Call::burn { .. } |
|
||||
pallet_uniques::Call::transfer { .. } |
|
||||
pallet_uniques::Call::freeze { .. } |
|
||||
pallet_uniques::Call::thaw { .. } |
|
||||
pallet_uniques::Call::freeze_collection { .. } |
|
||||
pallet_uniques::Call::thaw_collection { .. } |
|
||||
pallet_uniques::Call::transfer_ownership { .. } |
|
||||
pallet_uniques::Call::set_team { .. } |
|
||||
pallet_uniques::Call::approve_transfer { .. } |
|
||||
pallet_uniques::Call::cancel_approval { .. } |
|
||||
pallet_uniques::Call::force_item_status { .. } |
|
||||
pallet_uniques::Call::set_attribute { .. } |
|
||||
pallet_uniques::Call::clear_attribute { .. } |
|
||||
pallet_uniques::Call::set_metadata { .. } |
|
||||
pallet_uniques::Call::clear_metadata { .. } |
|
||||
pallet_uniques::Call::set_collection_metadata { .. } |
|
||||
pallet_uniques::Call::clear_collection_metadata { .. } |
|
||||
pallet_uniques::Call::set_accept_ownership { .. } |
|
||||
pallet_uniques::Call::set_collection_max_supply { .. } |
|
||||
pallet_uniques::Call::set_price { .. } |
|
||||
pallet_uniques::Call::buy_item { .. }
|
||||
) | RuntimeCall::ToWococoXcmRouter(
|
||||
pallet_xcm_bridge_hub_router::Call::report_bridge_status { .. }
|
||||
) | RuntimeCall::ToRococoXcmRouter(
|
||||
pallet_xcm_bridge_hub_router::Call::report_bridge_status { .. }
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
pub type Barrier = TrailingSetTopicAsId<
|
||||
DenyThenTry<
|
||||
DenyReserveTransferToRelayChain,
|
||||
(
|
||||
TakeWeightCredit,
|
||||
// Expected responses are OK.
|
||||
AllowKnownQueryResponses<PolkadotXcm>,
|
||||
// Allow XCMs with some computed origins to pass through.
|
||||
WithComputedOrigin<
|
||||
(
|
||||
// If the message is one that immediately attempts to pay for execution, then
|
||||
// allow it.
|
||||
AllowTopLevelPaidExecutionFrom<Everything>,
|
||||
// Parent, its pluralities (i.e. governance bodies) and BridgeHub get free
|
||||
// execution.
|
||||
AllowExplicitUnpaidExecutionFrom<(
|
||||
ParentOrParentsPlurality,
|
||||
Equals<bridging::SiblingBridgeHub>,
|
||||
)>,
|
||||
// Subscriptions for version tracking are OK.
|
||||
AllowSubscriptionsFrom<ParentOrSiblings>,
|
||||
),
|
||||
UniversalLocation,
|
||||
ConstU32<8>,
|
||||
>,
|
||||
),
|
||||
>,
|
||||
>;
|
||||
|
||||
/// Multiplier used for dedicated `TakeFirstAssetTrader` with `Assets` instance.
|
||||
pub type AssetFeeAsExistentialDepositMultiplierFeeCharger = AssetFeeAsExistentialDepositMultiplier<
|
||||
Runtime,
|
||||
WeightToFee,
|
||||
pallet_assets::BalanceToAssetBalance<Balances, Runtime, ConvertInto, TrustBackedAssetsInstance>,
|
||||
TrustBackedAssetsInstance,
|
||||
>;
|
||||
|
||||
/// Multiplier used for dedicated `TakeFirstAssetTrader` with `ForeignAssets` instance.
|
||||
pub type ForeignAssetFeeAsExistentialDepositMultiplierFeeCharger =
|
||||
AssetFeeAsExistentialDepositMultiplier<
|
||||
Runtime,
|
||||
WeightToFee,
|
||||
pallet_assets::BalanceToAssetBalance<Balances, Runtime, ConvertInto, ForeignAssetsInstance>,
|
||||
ForeignAssetsInstance,
|
||||
>;
|
||||
|
||||
/// Cases where a remote origin is accepted as trusted Teleporter for a given asset:
|
||||
///
|
||||
/// - ROC with the parent Relay Chain and sibling system parachains; and
|
||||
/// - Sibling parachains' assets from where they originate (as `ForeignCreators`).
|
||||
pub type TrustedTeleporters = (
|
||||
ConcreteAssetFromSystem<TokenLocation>,
|
||||
IsForeignConcreteAsset<FromSiblingParachain<parachain_info::Pallet<Runtime>>>,
|
||||
);
|
||||
|
||||
pub struct XcmConfig;
|
||||
impl xcm_executor::Config for XcmConfig {
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type XcmSender = XcmRouter;
|
||||
type AssetTransactor = AssetTransactors;
|
||||
type OriginConverter = XcmOriginToTransactDispatchOrigin;
|
||||
// Asset Hub trusts only particular configured bridge locations as reserve locations.
|
||||
// Asset Hub may _act_ as a reserve location for ROC and assets created under `pallet-assets`.
|
||||
// Users must use teleport where allowed (e.g. ROC with the Relay Chain).
|
||||
type IsReserve = (
|
||||
bridging::to_wococo::IsTrustedBridgedReserveLocationForConcreteAsset,
|
||||
bridging::to_rococo::IsTrustedBridgedReserveLocationForConcreteAsset,
|
||||
);
|
||||
type IsTeleporter = TrustedTeleporters;
|
||||
type UniversalLocation = UniversalLocation;
|
||||
type Barrier = Barrier;
|
||||
type Weigher = WeightInfoBounds<
|
||||
crate::weights::xcm::AssetHubRococoXcmWeight<RuntimeCall>,
|
||||
RuntimeCall,
|
||||
MaxInstructions,
|
||||
>;
|
||||
type Trader = (
|
||||
UsingComponents<WeightToFee, TokenLocation, AccountId, Balances, ToStakingPot<Runtime>>,
|
||||
// This trader allows to pay with `is_sufficient=true` "Trust Backed" assets from dedicated
|
||||
// `pallet_assets` instance - `Assets`.
|
||||
cumulus_primitives_utility::TakeFirstAssetTrader<
|
||||
AccountId,
|
||||
AssetFeeAsExistentialDepositMultiplierFeeCharger,
|
||||
TrustBackedAssetsConvertedConcreteId,
|
||||
Assets,
|
||||
cumulus_primitives_utility::XcmFeesTo32ByteAccount<
|
||||
FungiblesTransactor,
|
||||
AccountId,
|
||||
XcmAssetFeesReceiver,
|
||||
>,
|
||||
>,
|
||||
// This trader allows to pay with `is_sufficient=true` "Foreign" assets from dedicated
|
||||
// `pallet_assets` instance - `ForeignAssets`.
|
||||
cumulus_primitives_utility::TakeFirstAssetTrader<
|
||||
AccountId,
|
||||
ForeignAssetFeeAsExistentialDepositMultiplierFeeCharger,
|
||||
ForeignAssetsConvertedConcreteId,
|
||||
ForeignAssets,
|
||||
cumulus_primitives_utility::XcmFeesTo32ByteAccount<
|
||||
ForeignFungiblesTransactor,
|
||||
AccountId,
|
||||
XcmAssetFeesReceiver,
|
||||
>,
|
||||
>,
|
||||
);
|
||||
type ResponseHandler = PolkadotXcm;
|
||||
type AssetTrap = PolkadotXcm;
|
||||
type AssetClaims = PolkadotXcm;
|
||||
type SubscriptionService = PolkadotXcm;
|
||||
type PalletInstancesInfo = AllPalletsWithSystem;
|
||||
type MaxAssetsIntoHolding = MaxAssetsIntoHolding;
|
||||
type AssetLocker = ();
|
||||
type AssetExchanger = ();
|
||||
// TODO:check-parameter: change and assert in tests when (https://github.com/paritytech/polkadot-sdk/pull/1234) merged
|
||||
type FeeManager = ();
|
||||
type MessageExporter = ();
|
||||
type UniversalAliases =
|
||||
(bridging::to_wococo::UniversalAliases, bridging::to_rococo::UniversalAliases);
|
||||
type CallDispatcher = WithOriginFilter<SafeCallFilter>;
|
||||
type SafeCallFilter = SafeCallFilter;
|
||||
type Aliasers = Nothing;
|
||||
}
|
||||
|
||||
/// Converts a local signed origin into an XCM multilocation.
|
||||
/// Forms the basis for local origins sending/executing XCMs.
|
||||
pub type LocalOriginToLocation = SignedToAccountId32<RuntimeOrigin, AccountId, RelayNetwork>;
|
||||
|
||||
/// For routing XCM messages which do not cross local consensus boundary.
|
||||
type LocalXcmRouter = (
|
||||
// Two routers - use UMP to communicate with the relay chain:
|
||||
cumulus_primitives_utility::ParentAsUmp<ParachainSystem, PolkadotXcm, ()>,
|
||||
// ..and XCMP to communicate with the sibling chains.
|
||||
XcmpQueue,
|
||||
);
|
||||
|
||||
/// The means for routing XCM messages which are not for local execution into the right message
|
||||
/// queues.
|
||||
pub type XcmRouter = WithUniqueTopic<(
|
||||
LocalXcmRouter,
|
||||
// Router which wraps and sends xcm to BridgeHub to be delivered to the Wococo
|
||||
// GlobalConsensus
|
||||
ToWococoXcmRouter,
|
||||
// Router which wraps and sends xcm to BridgeHub to be delivered to the Rococo
|
||||
// GlobalConsensus
|
||||
ToRococoXcmRouter,
|
||||
)>;
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
parameter_types! {
|
||||
pub ReachableDest: Option<MultiLocation> = Some(Parent.into());
|
||||
}
|
||||
|
||||
impl pallet_xcm::Config for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
// We want to disallow users sending (arbitrary) XCMs from this chain.
|
||||
type SendXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, ()>;
|
||||
type XcmRouter = XcmRouter;
|
||||
// We support local origins dispatching XCM executions in principle...
|
||||
type ExecuteXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
|
||||
// ... but disallow generic XCM execution. As a result only teleports and reserve transfers are
|
||||
// allowed.
|
||||
type XcmExecuteFilter = Nothing;
|
||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||
type XcmTeleportFilter = Everything;
|
||||
// Allow reserve based transfer to everywhere except for bridging, here we strictly check what
|
||||
// assets are allowed.
|
||||
type XcmReserveTransferFilter = (
|
||||
LocationWithAssetFilters<WithParentsZeroOrOne, AllAssets>,
|
||||
bridging::to_rococo::AllowedReserveTransferAssets,
|
||||
bridging::to_wococo::AllowedReserveTransferAssets,
|
||||
);
|
||||
|
||||
type Weigher = WeightInfoBounds<
|
||||
crate::weights::xcm::AssetHubRococoXcmWeight<RuntimeCall>,
|
||||
RuntimeCall,
|
||||
MaxInstructions,
|
||||
>;
|
||||
type UniversalLocation = UniversalLocation;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;
|
||||
type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;
|
||||
type Currency = Balances;
|
||||
type CurrencyMatcher = ();
|
||||
type TrustedLockers = ();
|
||||
type SovereignAccountOf = LocationToAccountId;
|
||||
type MaxLockers = ConstU32<8>;
|
||||
type WeightInfo = crate::weights::pallet_xcm::WeightInfo<Runtime>;
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
type ReachableDest = ReachableDest;
|
||||
type AdminOrigin = EnsureRoot<AccountId>;
|
||||
type MaxRemoteLockConsumers = ConstU32<0>;
|
||||
type RemoteLockConsumerIdentifier = ();
|
||||
}
|
||||
|
||||
impl cumulus_pallet_xcm::Config for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||
}
|
||||
|
||||
pub type ForeignCreatorsSovereignAccountOf = (
|
||||
SiblingParachainConvertsVia<Sibling, AccountId>,
|
||||
AccountId32Aliases<RelayNetwork, AccountId>,
|
||||
ParentIsPreset<AccountId>,
|
||||
);
|
||||
|
||||
/// Simple conversion of `u32` into an `AssetId` for use in benchmarking.
|
||||
pub struct XcmBenchmarkHelper;
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
impl pallet_assets::BenchmarkHelper<MultiLocation> for XcmBenchmarkHelper {
|
||||
fn create_asset_id_parameter(id: u32) -> MultiLocation {
|
||||
MultiLocation { parents: 1, interior: X1(Parachain(id)) }
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
pub struct BenchmarkMultiLocationConverter<SelfParaId> {
|
||||
_phantom: sp_std::marker::PhantomData<SelfParaId>,
|
||||
}
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
impl<SelfParaId>
|
||||
pallet_asset_conversion::BenchmarkHelper<MultiLocation, sp_std::boxed::Box<MultiLocation>>
|
||||
for BenchmarkMultiLocationConverter<SelfParaId>
|
||||
where
|
||||
SelfParaId: Get<ParaId>,
|
||||
{
|
||||
fn asset_id(asset_id: u32) -> MultiLocation {
|
||||
MultiLocation {
|
||||
parents: 1,
|
||||
interior: X3(
|
||||
Parachain(SelfParaId::get().into()),
|
||||
PalletInstance(<Assets as PalletInfoAccess>::index() as u8),
|
||||
GeneralIndex(asset_id.into()),
|
||||
),
|
||||
}
|
||||
}
|
||||
fn multiasset_id(asset_id: u32) -> sp_std::boxed::Box<MultiLocation> {
|
||||
sp_std::boxed::Box::new(Self::asset_id(asset_id))
|
||||
}
|
||||
}
|
||||
|
||||
/// All configuration related to bridging
|
||||
pub mod bridging {
|
||||
use super::*;
|
||||
use assets_common::matching;
|
||||
use sp_std::collections::btree_set::BTreeSet;
|
||||
|
||||
// common/shared parameters for Wococo/Rococo
|
||||
parameter_types! {
|
||||
pub SiblingBridgeHubParaId: u32 = match Flavor::get() {
|
||||
RuntimeFlavor::Rococo => bp_bridge_hub_rococo::BRIDGE_HUB_ROCOCO_PARACHAIN_ID,
|
||||
RuntimeFlavor::Wococo => bp_bridge_hub_wococo::BRIDGE_HUB_WOCOCO_PARACHAIN_ID,
|
||||
};
|
||||
pub SiblingBridgeHub: MultiLocation = MultiLocation::new(1, X1(Parachain(SiblingBridgeHubParaId::get())));
|
||||
/// Router expects payment with this `AssetId`.
|
||||
/// (`AssetId` has to be aligned with `BridgeTable`)
|
||||
pub XcmBridgeHubRouterFeeAssetId: AssetId = TokenLocation::get().into();
|
||||
/// Price per byte - can be adjusted via governance `set_storage` call.
|
||||
pub storage XcmBridgeHubRouterByteFee: Balance = TransactionByteFee::get();
|
||||
}
|
||||
|
||||
pub mod to_wococo {
|
||||
use super::*;
|
||||
|
||||
parameter_types! {
|
||||
pub SiblingBridgeHubWithBridgeHubWococoInstance: MultiLocation = MultiLocation::new(
|
||||
1,
|
||||
X2(
|
||||
Parachain(SiblingBridgeHubParaId::get()),
|
||||
PalletInstance(bp_bridge_hub_rococo::WITH_BRIDGE_WOCOCO_MESSAGES_PALLET_INDEX)
|
||||
)
|
||||
);
|
||||
|
||||
pub const WococoNetwork: NetworkId = NetworkId::Wococo;
|
||||
pub AssetHubWococo: MultiLocation = MultiLocation::new(2, X2(GlobalConsensus(WococoNetwork::get()), Parachain(bp_asset_hub_wococo::ASSET_HUB_WOCOCO_PARACHAIN_ID)));
|
||||
pub WocLocation: MultiLocation = MultiLocation::new(2, X1(GlobalConsensus(WococoNetwork::get())));
|
||||
|
||||
pub WocFromAssetHubWococo: (MultiAssetFilter, MultiLocation) = (
|
||||
Wild(AllOf { fun: WildFungible, id: Concrete(WocLocation::get()) }),
|
||||
AssetHubWococo::get()
|
||||
);
|
||||
|
||||
/// Set up exporters configuration.
|
||||
/// `Option<MultiAsset>` represents static "base fee" which is used for total delivery fee calculation.
|
||||
pub BridgeTable: sp_std::vec::Vec<NetworkExportTableItem> = sp_std::vec![
|
||||
NetworkExportTableItem::new(
|
||||
WococoNetwork::get(),
|
||||
Some(sp_std::vec![
|
||||
AssetHubWococo::get().interior.split_global().expect("invalid configuration for AssetHubWococo").1,
|
||||
]),
|
||||
SiblingBridgeHub::get(),
|
||||
// base delivery fee to local `BridgeHub`
|
||||
Some((
|
||||
XcmBridgeHubRouterFeeAssetId::get(),
|
||||
bp_asset_hub_rococo::BridgeHubRococoBaseFeeInRocs::get(),
|
||||
).into())
|
||||
)
|
||||
];
|
||||
|
||||
/// Allowed assets for reserve transfer to `AssetHubWococo`.
|
||||
pub AllowedReserveTransferAssetsToAssetHubWococo: sp_std::vec::Vec<MultiAssetFilter> = sp_std::vec![
|
||||
// allow send only ROC
|
||||
Wild(AllOf { fun: WildFungible, id: Concrete(TokenLocation::get()) }),
|
||||
// and nothing else
|
||||
];
|
||||
|
||||
/// Universal aliases
|
||||
pub UniversalAliases: BTreeSet<(MultiLocation, Junction)> = BTreeSet::from_iter(
|
||||
sp_std::vec![
|
||||
(SiblingBridgeHubWithBridgeHubWococoInstance::get(), GlobalConsensus(WococoNetwork::get()))
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
impl Contains<(MultiLocation, Junction)> for UniversalAliases {
|
||||
fn contains(alias: &(MultiLocation, Junction)) -> bool {
|
||||
UniversalAliases::get().contains(alias)
|
||||
}
|
||||
}
|
||||
|
||||
pub type NetworkExportTable = xcm_builder::NetworkExportTable<BridgeTable>;
|
||||
|
||||
/// Trusted reserve locations filter for `xcm_executor::Config::IsReserve`.
|
||||
/// Locations from which the runtime accepts reserved assets.
|
||||
pub type IsTrustedBridgedReserveLocationForConcreteAsset =
|
||||
matching::IsTrustedBridgedReserveLocationForConcreteAsset<
|
||||
UniversalLocation,
|
||||
(
|
||||
// allow receive WOC from AssetHubWococo
|
||||
xcm_builder::Case<WocFromAssetHubWococo>,
|
||||
// and nothing else
|
||||
),
|
||||
>;
|
||||
|
||||
/// Allows to reserve transfer assets to `AssetHubWococo`.
|
||||
pub type AllowedReserveTransferAssets = LocationWithAssetFilters<
|
||||
Equals<AssetHubWococo>,
|
||||
AllowedReserveTransferAssetsToAssetHubWococo,
|
||||
>;
|
||||
|
||||
impl Contains<RuntimeCall> for ToWococoXcmRouter {
|
||||
fn contains(call: &RuntimeCall) -> bool {
|
||||
matches!(
|
||||
call,
|
||||
RuntimeCall::ToWococoXcmRouter(
|
||||
pallet_xcm_bridge_hub_router::Call::report_bridge_status { .. }
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub mod to_rococo {
|
||||
use super::*;
|
||||
|
||||
parameter_types! {
|
||||
pub SiblingBridgeHubWithBridgeHubRococoInstance: MultiLocation = MultiLocation::new(
|
||||
1,
|
||||
X2(
|
||||
Parachain(SiblingBridgeHubParaId::get()),
|
||||
PalletInstance(bp_bridge_hub_wococo::WITH_BRIDGE_ROCOCO_MESSAGES_PALLET_INDEX)
|
||||
)
|
||||
);
|
||||
|
||||
pub const RococoNetwork: NetworkId = NetworkId::Rococo;
|
||||
pub AssetHubRococo: MultiLocation = MultiLocation::new(2, X2(GlobalConsensus(RococoNetwork::get()), Parachain(bp_asset_hub_rococo::ASSET_HUB_ROCOCO_PARACHAIN_ID)));
|
||||
pub RocLocation: MultiLocation = MultiLocation::new(2, X1(GlobalConsensus(RococoNetwork::get())));
|
||||
|
||||
pub RocFromAssetHubRococo: (MultiAssetFilter, MultiLocation) = (
|
||||
Wild(AllOf { fun: WildFungible, id: Concrete(RocLocation::get()) }),
|
||||
AssetHubRococo::get()
|
||||
);
|
||||
|
||||
/// Set up exporters configuration.
|
||||
/// `Option<MultiAsset>` represents static "base fee" which is used for total delivery fee calculation.
|
||||
pub BridgeTable: sp_std::vec::Vec<NetworkExportTableItem> = sp_std::vec![
|
||||
NetworkExportTableItem::new(
|
||||
RococoNetwork::get(),
|
||||
Some(sp_std::vec![
|
||||
AssetHubRococo::get().interior.split_global().expect("invalid configuration for AssetHubRococo").1,
|
||||
]),
|
||||
SiblingBridgeHub::get(),
|
||||
// base delivery fee to local `BridgeHub`
|
||||
Some((
|
||||
XcmBridgeHubRouterFeeAssetId::get(),
|
||||
bp_asset_hub_wococo::BridgeHubWococoBaseFeeInWocs::get(),
|
||||
).into())
|
||||
)
|
||||
];
|
||||
|
||||
/// Allowed assets for reserve transfer to `AssetHubWococo`.
|
||||
pub AllowedReserveTransferAssetsToAssetHubRococo: sp_std::vec::Vec<MultiAssetFilter> = sp_std::vec![
|
||||
// allow send only WOC
|
||||
Wild(AllOf { fun: WildFungible, id: Concrete(TokenLocation::get()) }),
|
||||
// and nothing else
|
||||
];
|
||||
|
||||
/// Universal aliases
|
||||
pub UniversalAliases: BTreeSet<(MultiLocation, Junction)> = BTreeSet::from_iter(
|
||||
sp_std::vec![
|
||||
(SiblingBridgeHubWithBridgeHubRococoInstance::get(), GlobalConsensus(RococoNetwork::get()))
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
impl Contains<(MultiLocation, Junction)> for UniversalAliases {
|
||||
fn contains(alias: &(MultiLocation, Junction)) -> bool {
|
||||
UniversalAliases::get().contains(alias)
|
||||
}
|
||||
}
|
||||
|
||||
pub type NetworkExportTable = xcm_builder::NetworkExportTable<BridgeTable>;
|
||||
|
||||
/// Reserve locations filter for `xcm_executor::Config::IsReserve`.
|
||||
/// Locations from which the runtime accepts reserved assets.
|
||||
pub type IsTrustedBridgedReserveLocationForConcreteAsset =
|
||||
matching::IsTrustedBridgedReserveLocationForConcreteAsset<
|
||||
UniversalLocation,
|
||||
(
|
||||
// allow receive ROC from AssetHubRococo
|
||||
xcm_builder::Case<RocFromAssetHubRococo>,
|
||||
// and nothing else
|
||||
),
|
||||
>;
|
||||
|
||||
/// Allows to reserve transfer assets to `AssetHubRococo`.
|
||||
pub type AllowedReserveTransferAssets = LocationWithAssetFilters<
|
||||
Equals<AssetHubRococo>,
|
||||
AllowedReserveTransferAssetsToAssetHubRococo,
|
||||
>;
|
||||
|
||||
impl Contains<RuntimeCall> for ToRococoXcmRouter {
|
||||
fn contains(call: &RuntimeCall) -> bool {
|
||||
matches!(
|
||||
call,
|
||||
RuntimeCall::ToRococoXcmRouter(
|
||||
pallet_xcm_bridge_hub_router::Call::report_bridge_status { .. }
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Benchmarks helper for bridging configuration.
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
pub struct BridgingBenchmarksHelper;
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
impl BridgingBenchmarksHelper {
|
||||
pub fn prepare_universal_alias() -> Option<(MultiLocation, Junction)> {
|
||||
let alias =
|
||||
to_wococo::UniversalAliases::get().into_iter().find_map(|(location, junction)| {
|
||||
match to_wococo::SiblingBridgeHubWithBridgeHubWococoInstance::get()
|
||||
.eq(&location)
|
||||
{
|
||||
true => Some((location, junction)),
|
||||
false => None,
|
||||
}
|
||||
});
|
||||
assert!(alias.is_some(), "we expect here BridgeHubRococo to Polkadot mapping at least");
|
||||
Some(alias.unwrap())
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -454,7 +454,7 @@ pub type Barrier = TrailingSetTopicAsId<
|
||||
// Allow XCMs with some computed origins to pass through.
|
||||
WithComputedOrigin<
|
||||
(
|
||||
// If the message is one that immediately attemps to pay for execution, then
|
||||
// If the message is one that immediately attempts to pay for execution, then
|
||||
// allow it.
|
||||
AllowTopLevelPaidExecutionFrom<Everything>,
|
||||
// Parent, its pluralities (i.e. governance bodies) and treasury pallet get
|
||||
|
||||
@@ -19,6 +19,7 @@ use xcm::{
|
||||
latest::prelude::{MultiAsset, MultiLocation},
|
||||
prelude::*,
|
||||
};
|
||||
use xcm_builder::ensure_is_remote;
|
||||
|
||||
frame_support::parameter_types! {
|
||||
pub LocalMultiLocationPattern: MultiLocation = MultiLocation::new(0, Here);
|
||||
@@ -56,3 +57,41 @@ impl<SelfParaId: Get<ParaId>> ContainsPair<MultiLocation, MultiLocation>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Adapter verifies if it is allowed to receive `MultiAsset` from `MultiLocation`.
|
||||
///
|
||||
/// Note: `MultiLocation` has to be from a different global consensus.
|
||||
pub struct IsTrustedBridgedReserveLocationForConcreteAsset<UniversalLocation, Reserves>(
|
||||
sp_std::marker::PhantomData<(UniversalLocation, Reserves)>,
|
||||
);
|
||||
impl<
|
||||
UniversalLocation: Get<InteriorMultiLocation>,
|
||||
Reserves: ContainsPair<MultiAsset, MultiLocation>,
|
||||
> ContainsPair<MultiAsset, MultiLocation>
|
||||
for IsTrustedBridgedReserveLocationForConcreteAsset<UniversalLocation, Reserves>
|
||||
{
|
||||
fn contains(asset: &MultiAsset, origin: &MultiLocation) -> bool {
|
||||
let universal_source = UniversalLocation::get();
|
||||
log::trace!(
|
||||
target: "xcm::contains",
|
||||
"IsTrustedBridgedReserveLocationForConcreteAsset asset: {:?}, origin: {:?}, universal_source: {:?}",
|
||||
asset, origin, universal_source
|
||||
);
|
||||
|
||||
// check remote origin
|
||||
let _ = match ensure_is_remote(universal_source, *origin) {
|
||||
Ok(devolved) => devolved,
|
||||
Err(_) => {
|
||||
log::trace!(
|
||||
target: "xcm::contains",
|
||||
"IsTrustedBridgedReserveLocationForConcreteAsset origin: {:?} is not remote to the universal_source: {:?}",
|
||||
origin, universal_source
|
||||
);
|
||||
return false
|
||||
},
|
||||
};
|
||||
|
||||
// check asset according to the configured reserve locations
|
||||
Reserves::contains(asset, origin)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,10 +35,14 @@ parachains-runtimes-test-utils = { path = "../../test-utils", default-features =
|
||||
|
||||
# Polkadot
|
||||
xcm = { package = "staging-xcm", path = "../../../../../polkadot/xcm", default-features = false}
|
||||
xcm-builder = { package = "staging-xcm-builder", path = "../../../../../polkadot/xcm/xcm-builder", default-features = false}
|
||||
xcm-executor = { package = "staging-xcm-executor", path = "../../../../../polkadot/xcm/xcm-executor", default-features = false}
|
||||
pallet-xcm = { path = "../../../../../polkadot/xcm/pallet-xcm", default-features = false}
|
||||
polkadot-parachain-primitives = { path = "../../../../../polkadot/parachain", default-features = false}
|
||||
|
||||
# Bridges
|
||||
pallet-xcm-bridge-hub-router = { path = "../../../../../bridges/modules/xcm-bridge-hub-router", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
hex-literal = "0.4.1"
|
||||
|
||||
@@ -61,6 +65,7 @@ std = [
|
||||
"pallet-balances/std",
|
||||
"pallet-collator-selection/std",
|
||||
"pallet-session/std",
|
||||
"pallet-xcm-bridge-hub-router/std",
|
||||
"pallet-xcm/std",
|
||||
"parachain-info/std",
|
||||
"parachains-common/std",
|
||||
@@ -71,6 +76,7 @@ std = [
|
||||
"sp-io/std",
|
||||
"sp-runtime/std",
|
||||
"sp-std/std",
|
||||
"xcm-builder/std",
|
||||
"xcm-executor/std",
|
||||
"xcm/std",
|
||||
]
|
||||
|
||||
@@ -17,4 +17,5 @@
|
||||
//! Module contains predefined test-case scenarios for `Runtime` with various assets.
|
||||
|
||||
pub mod test_cases;
|
||||
pub mod test_cases_over_bridge;
|
||||
pub use parachains_runtimes_test_utils::*;
|
||||
|
||||
@@ -78,6 +78,7 @@ pub fn teleports_for_native_asset_works<
|
||||
Into<<<Runtime as frame_system::Config>::RuntimeOrigin as OriginTrait>::AccountId>,
|
||||
<<Runtime as frame_system::Config>::Lookup as StaticLookup>::Source:
|
||||
From<<Runtime as frame_system::Config>::AccountId>,
|
||||
<Runtime as frame_system::Config>::AccountId: From<AccountId>,
|
||||
XcmConfig: xcm_executor::Config,
|
||||
CheckingAccount: Get<AccountIdOf<Runtime>>,
|
||||
HrmpChannelOpener: frame_support::inherent::ProvideInherent<
|
||||
@@ -96,7 +97,7 @@ pub fn teleports_for_native_asset_works<
|
||||
|
||||
let included_head = RuntimeHelper::<Runtime, AllPalletsWithoutSystem>::run_to_block(
|
||||
2,
|
||||
AccountId::from(alice),
|
||||
AccountId::from(alice).into(),
|
||||
);
|
||||
// check Balances before
|
||||
assert_eq!(<pallet_balances::Pallet<Runtime>>::free_balance(&target_account), 0.into());
|
||||
@@ -346,6 +347,7 @@ pub fn teleports_for_foreign_assets_works<
|
||||
Into<<<Runtime as frame_system::Config>::RuntimeOrigin as OriginTrait>::AccountId>,
|
||||
<<Runtime as frame_system::Config>::Lookup as StaticLookup>::Source:
|
||||
From<<Runtime as frame_system::Config>::AccountId>,
|
||||
<Runtime as frame_system::Config>::AccountId: From<AccountId>,
|
||||
ForeignAssetsPalletInstance: 'static,
|
||||
{
|
||||
// foreign parachain with the same consenus currency as asset
|
||||
@@ -391,7 +393,7 @@ pub fn teleports_for_foreign_assets_works<
|
||||
|
||||
let included_head = RuntimeHelper::<Runtime, AllPalletsWithoutSystem>::run_to_block(
|
||||
2,
|
||||
AccountId::from(alice),
|
||||
AccountId::from(alice).into(),
|
||||
);
|
||||
// checks target_account before
|
||||
assert_eq!(
|
||||
@@ -1005,6 +1007,7 @@ macro_rules! include_asset_transactor_transfer_with_pallet_assets_instance_works
|
||||
}
|
||||
);
|
||||
|
||||
/// Test-case makes sure that `Runtime` can create and manage `ForeignAssets`
|
||||
pub fn create_and_manage_foreign_assets_for_local_consensus_parachain_assets_works<
|
||||
Runtime,
|
||||
XcmConfig,
|
||||
|
||||
@@ -0,0 +1,621 @@
|
||||
// Copyright (C) 2023 Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//! Module contains predefined test-case scenarios for `Runtime` with various assets transferred
|
||||
//! over a bridge.
|
||||
|
||||
use codec::Encode;
|
||||
use cumulus_primitives_core::XcmpMessageSource;
|
||||
use frame_support::{
|
||||
assert_ok,
|
||||
traits::{Currency, OnFinalize, OnInitialize, OriginTrait, ProcessMessageError},
|
||||
};
|
||||
use frame_system::pallet_prelude::BlockNumberFor;
|
||||
use parachains_common::{AccountId, Balance};
|
||||
use parachains_runtimes_test_utils::{
|
||||
mock_open_hrmp_channel, AccountIdOf, BalanceOf, CollatorSessionKeys, ExtBuilder, RuntimeHelper,
|
||||
ValidatorIdOf, XcmReceivedFrom,
|
||||
};
|
||||
use sp_runtime::traits::StaticLookup;
|
||||
use xcm::{latest::prelude::*, VersionedMultiAssets};
|
||||
use xcm_builder::{CreateMatcher, MatchXcm};
|
||||
use xcm_executor::{traits::ConvertLocation, XcmExecutor};
|
||||
|
||||
pub struct TestBridgingConfig {
|
||||
pub bridged_network: NetworkId,
|
||||
pub local_bridge_hub_para_id: u32,
|
||||
pub local_bridge_hub_location: MultiLocation,
|
||||
pub bridged_target_location: MultiLocation,
|
||||
}
|
||||
|
||||
/// Test-case makes sure that `Runtime` can initiate **reserve transfer assets** over bridge.
|
||||
pub fn limited_reserve_transfer_assets_for_native_asset_works<
|
||||
Runtime,
|
||||
AllPalletsWithoutSystem,
|
||||
XcmConfig,
|
||||
HrmpChannelOpener,
|
||||
HrmpChannelSource,
|
||||
LocationToAccountId,
|
||||
>(
|
||||
collator_session_keys: CollatorSessionKeys<Runtime>,
|
||||
existential_deposit: BalanceOf<Runtime>,
|
||||
alice_account: AccountIdOf<Runtime>,
|
||||
unwrap_pallet_xcm_event: Box<dyn Fn(Vec<u8>) -> Option<pallet_xcm::Event<Runtime>>>,
|
||||
unwrap_xcmp_queue_event: Box<
|
||||
dyn Fn(Vec<u8>) -> Option<cumulus_pallet_xcmp_queue::Event<Runtime>>,
|
||||
>,
|
||||
prepare_configuration: fn() -> TestBridgingConfig,
|
||||
weight_limit: WeightLimit,
|
||||
maybe_paid_export_message: Option<AssetId>,
|
||||
) where
|
||||
Runtime: frame_system::Config
|
||||
+ pallet_balances::Config
|
||||
+ pallet_session::Config
|
||||
+ pallet_xcm::Config
|
||||
+ parachain_info::Config
|
||||
+ pallet_collator_selection::Config
|
||||
+ cumulus_pallet_parachain_system::Config
|
||||
+ cumulus_pallet_xcmp_queue::Config,
|
||||
AllPalletsWithoutSystem:
|
||||
OnInitialize<BlockNumberFor<Runtime>> + OnFinalize<BlockNumberFor<Runtime>>,
|
||||
AccountIdOf<Runtime>: Into<[u8; 32]>,
|
||||
ValidatorIdOf<Runtime>: From<AccountIdOf<Runtime>>,
|
||||
BalanceOf<Runtime>: From<Balance>,
|
||||
<Runtime as pallet_balances::Config>::Balance: From<Balance> + Into<u128>,
|
||||
XcmConfig: xcm_executor::Config,
|
||||
LocationToAccountId: ConvertLocation<AccountIdOf<Runtime>>,
|
||||
<Runtime as frame_system::Config>::AccountId:
|
||||
Into<<<Runtime as frame_system::Config>::RuntimeOrigin as OriginTrait>::AccountId>,
|
||||
<<Runtime as frame_system::Config>::Lookup as StaticLookup>::Source:
|
||||
From<<Runtime as frame_system::Config>::AccountId>,
|
||||
<Runtime as frame_system::Config>::AccountId: From<AccountId>,
|
||||
HrmpChannelOpener: frame_support::inherent::ProvideInherent<
|
||||
Call = cumulus_pallet_parachain_system::Call<Runtime>,
|
||||
>,
|
||||
HrmpChannelSource: XcmpMessageSource,
|
||||
{
|
||||
let runtime_para_id = 1000;
|
||||
ExtBuilder::<Runtime>::default()
|
||||
.with_collators(collator_session_keys.collators())
|
||||
.with_session_keys(collator_session_keys.session_keys())
|
||||
.with_tracing()
|
||||
.with_safe_xcm_version(3)
|
||||
.with_para_id(runtime_para_id.into())
|
||||
.build()
|
||||
.execute_with(|| {
|
||||
let mut alice = [0u8; 32];
|
||||
alice[0] = 1;
|
||||
let included_head = RuntimeHelper::<Runtime, AllPalletsWithoutSystem>::run_to_block(
|
||||
2,
|
||||
AccountId::from(alice).into(),
|
||||
);
|
||||
|
||||
// prepare bridge config
|
||||
let TestBridgingConfig {
|
||||
bridged_network,
|
||||
local_bridge_hub_para_id,
|
||||
bridged_target_location: target_location_from_different_consensus,
|
||||
..
|
||||
} = prepare_configuration();
|
||||
|
||||
let reserve_account =
|
||||
LocationToAccountId::convert_location(&target_location_from_different_consensus)
|
||||
.expect("Sovereign account for reserves");
|
||||
let balance_to_transfer = 1_000_000_000_000_u128;
|
||||
let native_asset = MultiLocation::parent();
|
||||
|
||||
// open HRMP to bridge hub
|
||||
mock_open_hrmp_channel::<Runtime, HrmpChannelOpener>(
|
||||
runtime_para_id.into(),
|
||||
local_bridge_hub_para_id.into(),
|
||||
included_head,
|
||||
&alice,
|
||||
);
|
||||
|
||||
// drip ED to account
|
||||
let alice_account_init_balance = existential_deposit + balance_to_transfer.into();
|
||||
let _ = <pallet_balances::Pallet<Runtime>>::deposit_creating(
|
||||
&alice_account,
|
||||
alice_account_init_balance,
|
||||
);
|
||||
// SA of target location needs to have at least ED, otherwise making reserve fails
|
||||
let _ = <pallet_balances::Pallet<Runtime>>::deposit_creating(
|
||||
&reserve_account,
|
||||
existential_deposit,
|
||||
);
|
||||
|
||||
// we just check here, that user retains enough balance after withdrawal
|
||||
// and also we check if `balance_to_transfer` is more than `existential_deposit`,
|
||||
assert!(
|
||||
(<pallet_balances::Pallet<Runtime>>::free_balance(&alice_account) -
|
||||
balance_to_transfer.into()) >=
|
||||
existential_deposit
|
||||
);
|
||||
// SA has just ED
|
||||
assert_eq!(
|
||||
<pallet_balances::Pallet<Runtime>>::free_balance(&reserve_account),
|
||||
existential_deposit
|
||||
);
|
||||
|
||||
// local native asset (pallet_balances)
|
||||
let asset_to_transfer = MultiAsset {
|
||||
fun: Fungible(balance_to_transfer.into()),
|
||||
id: Concrete(native_asset),
|
||||
};
|
||||
|
||||
// destination is (some) account relative to the destination different consensus
|
||||
let target_destination_account = MultiLocation {
|
||||
parents: 0,
|
||||
interior: X1(AccountId32 {
|
||||
network: Some(bridged_network),
|
||||
id: sp_runtime::AccountId32::new([3; 32]).into(),
|
||||
}),
|
||||
};
|
||||
|
||||
// do pallet_xcm call reserve transfer
|
||||
assert_ok!(<pallet_xcm::Pallet<Runtime>>::limited_reserve_transfer_assets(
|
||||
RuntimeHelper::<Runtime, AllPalletsWithoutSystem>::origin_of(alice_account.clone()),
|
||||
Box::new(target_location_from_different_consensus.into_versioned()),
|
||||
Box::new(target_destination_account.into_versioned()),
|
||||
Box::new(VersionedMultiAssets::from(MultiAssets::from(asset_to_transfer))),
|
||||
0,
|
||||
weight_limit,
|
||||
));
|
||||
|
||||
// check alice account decreased by balance_to_transfer
|
||||
// TODO:check-parameter: change and assert in tests when (https://github.com/paritytech/polkadot-sdk/pull/1234) merged
|
||||
assert_eq!(
|
||||
<pallet_balances::Pallet<Runtime>>::free_balance(&alice_account),
|
||||
alice_account_init_balance - balance_to_transfer.into()
|
||||
);
|
||||
|
||||
// check reserve account
|
||||
// check reserve account increased by balance_to_transfer
|
||||
assert_eq!(
|
||||
<pallet_balances::Pallet<Runtime>>::free_balance(&reserve_account),
|
||||
existential_deposit + balance_to_transfer.into()
|
||||
);
|
||||
|
||||
// check events
|
||||
// check pallet_xcm attempted
|
||||
RuntimeHelper::<Runtime, AllPalletsWithoutSystem>::assert_pallet_xcm_event_outcome(
|
||||
&unwrap_pallet_xcm_event,
|
||||
|outcome| {
|
||||
assert_ok!(outcome.ensure_complete());
|
||||
},
|
||||
);
|
||||
|
||||
// check that xcm was sent
|
||||
let xcm_sent_message_hash = <frame_system::Pallet<Runtime>>::events()
|
||||
.into_iter()
|
||||
.filter_map(|e| unwrap_xcmp_queue_event(e.event.encode()))
|
||||
.find_map(|e| match e {
|
||||
cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { message_hash } =>
|
||||
Some(message_hash),
|
||||
_ => None,
|
||||
});
|
||||
|
||||
// read xcm
|
||||
let xcm_sent = RuntimeHelper::<HrmpChannelSource, AllPalletsWithoutSystem>::take_xcm(
|
||||
local_bridge_hub_para_id.into(),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(
|
||||
xcm_sent_message_hash,
|
||||
Some(xcm_sent.using_encoded(sp_io::hashing::blake2_256))
|
||||
);
|
||||
let mut xcm_sent: Xcm<()> = xcm_sent.try_into().expect("versioned xcm");
|
||||
|
||||
// check sent XCM ExportMessage to BridgeHub
|
||||
|
||||
// 1. check paid or unpaid
|
||||
if let Some(expected_fee_asset_id) = maybe_paid_export_message {
|
||||
xcm_sent
|
||||
.0
|
||||
.matcher()
|
||||
.match_next_inst(|instr| match instr {
|
||||
WithdrawAsset(_) => Ok(()),
|
||||
_ => Err(ProcessMessageError::BadFormat),
|
||||
})
|
||||
.expect("contains WithdrawAsset")
|
||||
.match_next_inst(|instr| match instr {
|
||||
BuyExecution { fees, .. } if fees.id.eq(&expected_fee_asset_id) => Ok(()),
|
||||
_ => Err(ProcessMessageError::BadFormat),
|
||||
})
|
||||
.expect("contains BuyExecution")
|
||||
} else {
|
||||
xcm_sent
|
||||
.0
|
||||
.matcher()
|
||||
.match_next_inst(|instr| match instr {
|
||||
// first instruction could be UnpaidExecution (because we could have
|
||||
// explicit unpaid execution on BridgeHub)
|
||||
UnpaidExecution { weight_limit, check_origin }
|
||||
if weight_limit == &Unlimited && check_origin.is_none() =>
|
||||
Ok(()),
|
||||
_ => Err(ProcessMessageError::BadFormat),
|
||||
})
|
||||
.expect("contains UnpaidExecution")
|
||||
}
|
||||
// 2. check ExportMessage
|
||||
.match_next_inst(|instr| match instr {
|
||||
// next instruction is ExportMessage
|
||||
ExportMessage { network, destination, xcm: inner_xcm } => {
|
||||
assert_eq!(network, &bridged_network);
|
||||
let (_, target_location_junctions_without_global_consensus) =
|
||||
target_location_from_different_consensus
|
||||
.interior
|
||||
.split_global()
|
||||
.expect("split works");
|
||||
assert_eq!(destination, &target_location_junctions_without_global_consensus);
|
||||
assert_matches_pallet_xcm_reserve_transfer_assets_instructions(inner_xcm);
|
||||
Ok(())
|
||||
},
|
||||
_ => Err(ProcessMessageError::BadFormat),
|
||||
})
|
||||
.expect("contains ExportMessage");
|
||||
})
|
||||
}
|
||||
|
||||
pub fn receive_reserve_asset_deposited_from_different_consensus_works<
|
||||
Runtime,
|
||||
AllPalletsWithoutSystem,
|
||||
XcmConfig,
|
||||
LocationToAccountId,
|
||||
ForeignAssetsPalletInstance,
|
||||
>(
|
||||
collator_session_keys: CollatorSessionKeys<Runtime>,
|
||||
existential_deposit: BalanceOf<Runtime>,
|
||||
target_account: AccountIdOf<Runtime>,
|
||||
block_author_account: AccountIdOf<Runtime>,
|
||||
(
|
||||
foreign_asset_id_multilocation,
|
||||
transfered_foreign_asset_id_amount,
|
||||
foreign_asset_id_minimum_balance,
|
||||
): (MultiLocation, u128, u128),
|
||||
prepare_configuration: fn() -> TestBridgingConfig,
|
||||
(bridge_instance, universal_origin, descend_origin): (Junctions, Junction, Junctions), /* bridge adds origin manipulation on the way */
|
||||
) where
|
||||
Runtime: frame_system::Config
|
||||
+ pallet_balances::Config
|
||||
+ pallet_session::Config
|
||||
+ pallet_xcm::Config
|
||||
+ parachain_info::Config
|
||||
+ pallet_collator_selection::Config
|
||||
+ cumulus_pallet_parachain_system::Config
|
||||
+ cumulus_pallet_xcmp_queue::Config
|
||||
+ pallet_assets::Config<ForeignAssetsPalletInstance>,
|
||||
AllPalletsWithoutSystem:
|
||||
OnInitialize<BlockNumberFor<Runtime>> + OnFinalize<BlockNumberFor<Runtime>>,
|
||||
AccountIdOf<Runtime>: Into<[u8; 32]>,
|
||||
ValidatorIdOf<Runtime>: From<AccountIdOf<Runtime>>,
|
||||
BalanceOf<Runtime>: From<Balance>,
|
||||
XcmConfig: xcm_executor::Config,
|
||||
LocationToAccountId: ConvertLocation<AccountIdOf<Runtime>>,
|
||||
<Runtime as pallet_assets::Config<ForeignAssetsPalletInstance>>::AssetId:
|
||||
From<MultiLocation> + Into<MultiLocation>,
|
||||
<Runtime as pallet_assets::Config<ForeignAssetsPalletInstance>>::AssetIdParameter:
|
||||
From<MultiLocation> + Into<MultiLocation>,
|
||||
<Runtime as pallet_assets::Config<ForeignAssetsPalletInstance>>::Balance:
|
||||
From<Balance> + Into<u128> + From<u128>,
|
||||
<Runtime as frame_system::Config>::AccountId: Into<<<Runtime as frame_system::Config>::RuntimeOrigin as OriginTrait>::AccountId>
|
||||
+ Into<AccountId>,
|
||||
<<Runtime as frame_system::Config>::Lookup as StaticLookup>::Source:
|
||||
From<<Runtime as frame_system::Config>::AccountId>,
|
||||
ForeignAssetsPalletInstance: 'static,
|
||||
{
|
||||
ExtBuilder::<Runtime>::default()
|
||||
.with_collators(collator_session_keys.collators())
|
||||
.with_session_keys(collator_session_keys.session_keys())
|
||||
.with_tracing()
|
||||
.build()
|
||||
.execute_with(|| {
|
||||
// Set account as block author, who will receive fees
|
||||
RuntimeHelper::<Runtime, AllPalletsWithoutSystem>::run_to_block(
|
||||
2,
|
||||
block_author_account.clone().into(),
|
||||
);
|
||||
|
||||
// prepare bridge config
|
||||
let TestBridgingConfig { local_bridge_hub_location, .. } = prepare_configuration();
|
||||
|
||||
// drip 'ED' user target account
|
||||
let _ = <pallet_balances::Pallet<Runtime>>::deposit_creating(
|
||||
&target_account,
|
||||
existential_deposit,
|
||||
);
|
||||
|
||||
// sovereign account as foreign asset owner (can be whoever for this scenario, doesnt
|
||||
// matter)
|
||||
let sovereign_account_as_owner_of_foreign_asset =
|
||||
LocationToAccountId::convert_location(&MultiLocation::parent()).unwrap();
|
||||
|
||||
// staking pot account for collecting local native fees from `BuyExecution`
|
||||
let staking_pot = <pallet_collator_selection::Pallet<Runtime>>::account_id();
|
||||
let _ = <pallet_balances::Pallet<Runtime>>::deposit_creating(
|
||||
&staking_pot,
|
||||
existential_deposit,
|
||||
);
|
||||
|
||||
// create foreign asset for wrapped/derivated representation
|
||||
assert_ok!(
|
||||
<pallet_assets::Pallet<Runtime, ForeignAssetsPalletInstance>>::force_create(
|
||||
RuntimeHelper::<Runtime, AllPalletsWithoutSystem>::root_origin(),
|
||||
foreign_asset_id_multilocation.into(),
|
||||
sovereign_account_as_owner_of_foreign_asset.clone().into(),
|
||||
true, // is_sufficient=true
|
||||
foreign_asset_id_minimum_balance.into()
|
||||
)
|
||||
);
|
||||
|
||||
// Balances before
|
||||
assert_eq!(
|
||||
<pallet_balances::Pallet<Runtime>>::free_balance(&target_account),
|
||||
existential_deposit.clone()
|
||||
);
|
||||
assert_eq!(
|
||||
<pallet_balances::Pallet<Runtime>>::free_balance(&block_author_account),
|
||||
0.into()
|
||||
);
|
||||
assert_eq!(
|
||||
<pallet_balances::Pallet<Runtime>>::free_balance(&staking_pot),
|
||||
existential_deposit.clone()
|
||||
);
|
||||
|
||||
// ForeignAssets balances before
|
||||
assert_eq!(
|
||||
<pallet_assets::Pallet<Runtime, ForeignAssetsPalletInstance>>::balance(
|
||||
foreign_asset_id_multilocation.into(),
|
||||
&target_account
|
||||
),
|
||||
0.into()
|
||||
);
|
||||
assert_eq!(
|
||||
<pallet_assets::Pallet<Runtime, ForeignAssetsPalletInstance>>::balance(
|
||||
foreign_asset_id_multilocation.into(),
|
||||
&block_author_account
|
||||
),
|
||||
0.into()
|
||||
);
|
||||
assert_eq!(
|
||||
<pallet_assets::Pallet<Runtime, ForeignAssetsPalletInstance>>::balance(
|
||||
foreign_asset_id_multilocation.into(),
|
||||
&staking_pot
|
||||
),
|
||||
0.into()
|
||||
);
|
||||
|
||||
// Call received XCM execution
|
||||
let xcm = Xcm(vec![
|
||||
DescendOrigin(bridge_instance),
|
||||
UniversalOrigin(universal_origin),
|
||||
DescendOrigin(descend_origin),
|
||||
ReserveAssetDeposited(MultiAssets::from(vec![MultiAsset {
|
||||
id: Concrete(foreign_asset_id_multilocation),
|
||||
fun: Fungible(transfered_foreign_asset_id_amount),
|
||||
}])),
|
||||
ClearOrigin,
|
||||
BuyExecution {
|
||||
fees: MultiAsset {
|
||||
id: Concrete(foreign_asset_id_multilocation),
|
||||
fun: Fungible(transfered_foreign_asset_id_amount),
|
||||
},
|
||||
weight_limit: Unlimited,
|
||||
},
|
||||
DepositAsset {
|
||||
assets: Wild(AllCounted(1)),
|
||||
beneficiary: MultiLocation {
|
||||
parents: 0,
|
||||
interior: X1(AccountId32 {
|
||||
network: None,
|
||||
id: target_account.clone().into(),
|
||||
}),
|
||||
},
|
||||
},
|
||||
SetTopic([
|
||||
220, 188, 144, 32, 213, 83, 111, 175, 44, 210, 111, 19, 90, 165, 191, 112, 140,
|
||||
247, 192, 124, 42, 17, 153, 141, 114, 34, 189, 20, 83, 69, 237, 173,
|
||||
]),
|
||||
]);
|
||||
assert_matches_pallet_xcm_reserve_transfer_assets_instructions(&mut xcm.clone());
|
||||
|
||||
let hash = xcm.using_encoded(sp_io::hashing::blake2_256);
|
||||
|
||||
// execute xcm as XcmpQueue would do
|
||||
let outcome = XcmExecutor::<XcmConfig>::execute_xcm(
|
||||
local_bridge_hub_location,
|
||||
xcm,
|
||||
hash,
|
||||
RuntimeHelper::<Runtime, AllPalletsWithoutSystem>::xcm_max_weight(
|
||||
XcmReceivedFrom::Sibling,
|
||||
),
|
||||
);
|
||||
assert_eq!(outcome.ensure_complete(), Ok(()));
|
||||
|
||||
// author actual balance after (received fees from Trader for ForeignAssets)
|
||||
let author_received_fees =
|
||||
<pallet_assets::Pallet<Runtime, ForeignAssetsPalletInstance>>::balance(
|
||||
foreign_asset_id_multilocation.into(),
|
||||
&block_author_account,
|
||||
);
|
||||
|
||||
// Balances after (untouched)
|
||||
assert_eq!(
|
||||
<pallet_balances::Pallet<Runtime>>::free_balance(&target_account),
|
||||
existential_deposit.clone()
|
||||
);
|
||||
assert_eq!(
|
||||
<pallet_balances::Pallet<Runtime>>::free_balance(&block_author_account),
|
||||
0.into()
|
||||
);
|
||||
assert_eq!(
|
||||
<pallet_balances::Pallet<Runtime>>::free_balance(&staking_pot),
|
||||
existential_deposit.clone()
|
||||
);
|
||||
|
||||
// ForeignAssets balances after
|
||||
assert_eq!(
|
||||
<pallet_assets::Pallet<Runtime, ForeignAssetsPalletInstance>>::balance(
|
||||
foreign_asset_id_multilocation.into(),
|
||||
&target_account
|
||||
),
|
||||
(transfered_foreign_asset_id_amount - author_received_fees.into()).into()
|
||||
);
|
||||
assert_eq!(
|
||||
<pallet_assets::Pallet<Runtime, ForeignAssetsPalletInstance>>::balance(
|
||||
foreign_asset_id_multilocation.into(),
|
||||
&block_author_account
|
||||
),
|
||||
author_received_fees
|
||||
);
|
||||
assert_eq!(
|
||||
<pallet_assets::Pallet<Runtime, ForeignAssetsPalletInstance>>::balance(
|
||||
foreign_asset_id_multilocation.into(),
|
||||
&staking_pot
|
||||
),
|
||||
0.into()
|
||||
);
|
||||
})
|
||||
}
|
||||
|
||||
fn assert_matches_pallet_xcm_reserve_transfer_assets_instructions<RuntimeCall>(
|
||||
xcm: &mut Xcm<RuntimeCall>,
|
||||
) {
|
||||
let _ = xcm
|
||||
.0
|
||||
.matcher()
|
||||
.skip_inst_while(|inst| !matches!(inst, ReserveAssetDeposited(..)))
|
||||
.expect("no instruction ReserveAssetDeposited?")
|
||||
.match_next_inst(|instr| match instr {
|
||||
ReserveAssetDeposited(..) => Ok(()),
|
||||
_ => Err(ProcessMessageError::BadFormat),
|
||||
})
|
||||
.expect("expected instruction ReserveAssetDeposited")
|
||||
.match_next_inst(|instr| match instr {
|
||||
ClearOrigin => Ok(()),
|
||||
_ => Err(ProcessMessageError::BadFormat),
|
||||
})
|
||||
.expect("expected instruction ClearOrigin")
|
||||
.match_next_inst(|instr| match instr {
|
||||
BuyExecution { .. } => Ok(()),
|
||||
_ => Err(ProcessMessageError::BadFormat),
|
||||
})
|
||||
.expect("expected instruction BuyExecution")
|
||||
.match_next_inst(|instr| match instr {
|
||||
DepositAsset { .. } => Ok(()),
|
||||
_ => Err(ProcessMessageError::BadFormat),
|
||||
})
|
||||
.expect("expected instruction DepositAsset");
|
||||
}
|
||||
|
||||
pub fn report_bridge_status_from_xcm_bridge_router_works<
|
||||
Runtime,
|
||||
AllPalletsWithoutSystem,
|
||||
XcmConfig,
|
||||
HrmpChannelOpener,
|
||||
HrmpChannelSource,
|
||||
LocationToAccountId,
|
||||
XcmBridgeHubRouterInstance,
|
||||
>(
|
||||
collator_session_keys: CollatorSessionKeys<Runtime>,
|
||||
existential_deposit: BalanceOf<Runtime>,
|
||||
alice_account: AccountIdOf<Runtime>,
|
||||
unwrap_pallet_xcm_event: Box<dyn Fn(Vec<u8>) -> Option<pallet_xcm::Event<Runtime>>>,
|
||||
unwrap_xcmp_queue_event: Box<
|
||||
dyn Fn(Vec<u8>) -> Option<cumulus_pallet_xcmp_queue::Event<Runtime>>,
|
||||
>,
|
||||
prepare_configuration: fn() -> TestBridgingConfig,
|
||||
weight_limit: WeightLimit,
|
||||
maybe_paid_export_message: Option<AssetId>,
|
||||
congested_message: fn() -> Xcm<XcmConfig::RuntimeCall>,
|
||||
uncongested_message: fn() -> Xcm<XcmConfig::RuntimeCall>,
|
||||
) where
|
||||
Runtime: frame_system::Config
|
||||
+ pallet_balances::Config
|
||||
+ pallet_session::Config
|
||||
+ pallet_xcm::Config
|
||||
+ parachain_info::Config
|
||||
+ pallet_collator_selection::Config
|
||||
+ cumulus_pallet_parachain_system::Config
|
||||
+ cumulus_pallet_xcmp_queue::Config
|
||||
+ pallet_xcm_bridge_hub_router::Config<XcmBridgeHubRouterInstance>,
|
||||
AllPalletsWithoutSystem:
|
||||
OnInitialize<BlockNumberFor<Runtime>> + OnFinalize<BlockNumberFor<Runtime>>,
|
||||
AccountIdOf<Runtime>: Into<[u8; 32]>,
|
||||
ValidatorIdOf<Runtime>: From<AccountIdOf<Runtime>>,
|
||||
BalanceOf<Runtime>: From<Balance>,
|
||||
<Runtime as pallet_balances::Config>::Balance: From<Balance> + Into<u128>,
|
||||
XcmConfig: xcm_executor::Config,
|
||||
LocationToAccountId: ConvertLocation<AccountIdOf<Runtime>>,
|
||||
<Runtime as frame_system::Config>::AccountId:
|
||||
Into<<<Runtime as frame_system::Config>::RuntimeOrigin as OriginTrait>::AccountId>,
|
||||
<<Runtime as frame_system::Config>::Lookup as StaticLookup>::Source:
|
||||
From<<Runtime as frame_system::Config>::AccountId>,
|
||||
<Runtime as frame_system::Config>::AccountId: From<AccountId>,
|
||||
HrmpChannelOpener: frame_support::inherent::ProvideInherent<
|
||||
Call = cumulus_pallet_parachain_system::Call<Runtime>,
|
||||
>,
|
||||
HrmpChannelSource: XcmpMessageSource,
|
||||
XcmBridgeHubRouterInstance: 'static,
|
||||
{
|
||||
ExtBuilder::<Runtime>::default()
|
||||
.with_collators(collator_session_keys.collators())
|
||||
.with_session_keys(collator_session_keys.session_keys())
|
||||
.with_tracing()
|
||||
.build()
|
||||
.execute_with(|| {
|
||||
// check transfer works
|
||||
limited_reserve_transfer_assets_for_native_asset_works::<
|
||||
Runtime,
|
||||
AllPalletsWithoutSystem,
|
||||
XcmConfig,
|
||||
HrmpChannelOpener,
|
||||
HrmpChannelSource,
|
||||
LocationToAccountId,
|
||||
>(
|
||||
collator_session_keys,
|
||||
existential_deposit,
|
||||
alice_account,
|
||||
unwrap_pallet_xcm_event,
|
||||
unwrap_xcmp_queue_event,
|
||||
prepare_configuration,
|
||||
weight_limit,
|
||||
maybe_paid_export_message,
|
||||
);
|
||||
|
||||
let report_bridge_status = |is_congested: bool| {
|
||||
// prepare bridge config
|
||||
let TestBridgingConfig { local_bridge_hub_location, .. } = prepare_configuration();
|
||||
|
||||
// Call received XCM execution
|
||||
let xcm = if is_congested { congested_message() } else { uncongested_message() };
|
||||
let hash = xcm.using_encoded(sp_io::hashing::blake2_256);
|
||||
|
||||
// execute xcm as XcmpQueue would do
|
||||
let outcome = XcmExecutor::<XcmConfig>::execute_xcm(
|
||||
local_bridge_hub_location,
|
||||
xcm,
|
||||
hash,
|
||||
RuntimeHelper::<Runtime, AllPalletsWithoutSystem>::xcm_max_weight(XcmReceivedFrom::Sibling),
|
||||
);
|
||||
assert_eq!(outcome.ensure_complete(), Ok(()));
|
||||
assert_eq!(is_congested, pallet_xcm_bridge_hub_router::Pallet::<Runtime, XcmBridgeHubRouterInstance>::bridge().is_congested);
|
||||
};
|
||||
|
||||
report_bridge_status(true);
|
||||
report_bridge_status(false);
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user