Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixes
  • Loading branch information
KiChjang committed Jan 18, 2022
commit e731fdf1cc4bcef05e3bedd1ed874796d4a08885
10 changes: 8 additions & 2 deletions runtime/westend/src/weights/xcm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,16 @@ impl<Call> XcmWeightInfo<Call> for WestendXcmWeight<Call> {
fn expect_error(_error: &Option<(u32, XcmError)>) -> Weight {
XcmGeneric::<Runtime>::expect_error()
}
fn query_pallet() -> Weight {
fn query_pallet(_module_name: &Vec<u8>, _response_info: QueryResponseInfo) -> Weight {
XcmGeneric::<Runtime>::query_pallet()
}
fn expect_pallet(_pallet_index: &u32) -> Weight {
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 {
Expand Down
16 changes: 8 additions & 8 deletions xcm/src/v3/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,11 @@ pub use multiasset::{
AssetId, AssetInstance, Fungibility, MultiAsset, MultiAssetFilter, MultiAssets,
WildFungibility, WildMultiAsset,
};
pub use traits::{
Error, ExecuteXcm, Outcome, Result, SendError, SendResult, SendXcm, Weight, XcmWeightInfo,
};
pub use traits::{Error, ExecuteXcm, Outcome, Result, SendError, SendResult, SendXcm};
// These parts of XCM v2 are unchanged in XCM v3, and are re-imported here.
pub use super::v2::{
Ancestor, AncestorThen, BodyId, BodyPart, InteriorMultiLocation, Junction, Junctions,
MultiLocation, NetworkId, OriginKind, Parent, ParentThen, WeightLimit,
MultiLocation, NetworkId, OriginKind, Parent, ParentThen, Weight, WeightLimit,
};

/// This module's XCM version.
Expand Down Expand Up @@ -218,7 +216,7 @@ pub struct QueryResponseInfo {
///
/// This is the inner XCM format and is version-sensitive. Messages are typically passed using the outer
/// XCM format, known as `VersionedXcm`.
#[derive(Derivative, Encode, Decode, TypeInfo)]
#[derive(Derivative, Encode, Decode, TypeInfo, xcm_procedural::XcmWeightInfoTrait)]
#[derivative(Clone(bound = ""), Eq(bound = ""), PartialEq(bound = ""), Debug(bound = ""))]
#[codec(encode_bound())]
#[codec(decode_bound())]
Expand Down Expand Up @@ -771,7 +769,7 @@ impl<Call> Instruction<Call> {
QueryPallet { module_name, response_info },
ExpectPallet { index, name, module_name, crate_major, min_crate_minor } =>
ExpectPallet { index, name, module_name, crate_major, min_crate_minor },
ReportTransactStatus(repsonse_info) => ReportTransactStatus(repsonse_info),
ReportTransactStatus(response_info) => ReportTransactStatus(response_info),
ClearTransactStatus => ClearTransactStatus,
}
}
Expand Down Expand Up @@ -822,8 +820,10 @@ impl<Call, W: XcmWeightInfo<Call>> GetWeight<W> for Instruction<Call> {
ExpectAsset(assets) => W::expect_asset(assets),
ExpectOrigin(origin) => W::expect_origin(origin),
ExpectError(error) => W::expect_error(error),
QueryPallet { .. } => W::query_pallet(),
ExpectPallet { index, .. } => W::expect_pallet(index),
QueryPallet { module_name, response_info } =>
W::query_pallet(module_name, response_info),
ExpectPallet { index, name, module_name, crate_major, min_crate_minor } =>
W::expect_pallet(index, name, module_name, crate_major, min_crate_minor),
ReportTransactStatus(response_info) => W::report_transact_status(response_info),
ClearTransactStatus => W::clear_transact_status(),
}
Expand Down