Skip to content

Commit

Permalink
Uncoupling pallet-xcm from frame-system's RuntimeCall (#1684)
Browse files Browse the repository at this point in the history
  • Loading branch information
arrudagates committed Sep 25, 2023
1 parent e67a879 commit fa4c672
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions polkadot/xcm/pallet-xcm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,10 @@ pub mod pallet {
>;

/// Our XCM filter which messages to be executed using `XcmExecutor` must pass.
type XcmExecuteFilter: Contains<(MultiLocation, Xcm<<Self as SysConfig>::RuntimeCall>)>;
type XcmExecuteFilter: Contains<(MultiLocation, Xcm<<Self as Config>::RuntimeCall>)>;

/// Something to execute an XCM message.
type XcmExecutor: ExecuteXcm<<Self as SysConfig>::RuntimeCall>;
type XcmExecutor: ExecuteXcm<<Self as Config>::RuntimeCall>;

/// Our XCM filter which messages to be teleported using the dedicated extrinsic must pass.
type XcmTeleportFilter: Contains<(MultiLocation, Vec<MultiAsset>)>;
Expand All @@ -216,7 +216,7 @@ pub mod pallet {
type XcmReserveTransferFilter: Contains<(MultiLocation, Vec<MultiAsset>)>;

/// Means of measuring the weight consumed by an XCM message locally.
type Weigher: WeightBounds<<Self as SysConfig>::RuntimeCall>;
type Weigher: WeightBounds<<Self as Config>::RuntimeCall>;

/// This chain's Universal Location.
type UniversalLocation: Get<InteriorMultiLocation>;
Expand All @@ -227,7 +227,6 @@ pub mod pallet {
/// The runtime `Call` type.
type RuntimeCall: Parameter
+ GetDispatchInfo
+ IsType<<Self as frame_system::Config>::RuntimeCall>
+ Dispatchable<
RuntimeOrigin = <Self as Config>::RuntimeOrigin,
PostInfo = PostDispatchInfo,
Expand Down Expand Up @@ -902,7 +901,7 @@ pub mod pallet {
#[pallet::weight(max_weight.saturating_add(T::WeightInfo::execute()))]
pub fn execute(
origin: OriginFor<T>,
message: Box<VersionedXcm<<T as SysConfig>::RuntimeCall>>,
message: Box<VersionedXcm<<T as Config>::RuntimeCall>>,
max_weight: Weight,
) -> DispatchResultWithPostInfo {
let origin_location = T::ExecuteXcmOrigin::ensure_origin(origin)?;
Expand Down

0 comments on commit fa4c672

Please sign in to comment.