Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit 119a494

Browse files
authored
Allows to customize how calls are dispatched from XCM (#5657)
* CallDispatcher trait * fmt * unused import * fix test-runtime * remove JustDispatch type * fix typo in test-runtime * missing CallDispatcher * more missing CallDispatcher
1 parent 21a59c2 commit 119a494

File tree

19 files changed

+61
-16
lines changed

19 files changed

+61
-16
lines changed

bridges/bin/rialto-parachain/runtime/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,7 @@ impl Config for XcmConfig {
385385
type AssetExchanger = ();
386386
type AssetClaims = PolkadotXcm;
387387
type SubscriptionService = PolkadotXcm;
388+
type CallDispatcher = Call;
388389
}
389390

390391
/// No local origins on this chain are allowed to dispatch XCM sends/executions.

runtime/kusama/src/xcm_config.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ impl xcm_executor::Config for XcmConfig {
161161
// No bridges yet...
162162
type MessageExporter = ();
163163
type UniversalAliases = Nothing;
164+
type CallDispatcher = Call;
164165
}
165166

166167
parameter_types! {

runtime/polkadot/src/xcm_config.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ impl xcm_executor::Config for XcmConfig {
158158
// No bridges yet...
159159
type MessageExporter = ();
160160
type UniversalAliases = Nothing;
161+
type CallDispatcher = Call;
161162
}
162163

163164
parameter_types! {

runtime/rococo/src/xcm_config.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ impl xcm_executor::Config for XcmConfig {
144144
type FeeManager = ();
145145
type MessageExporter = ();
146146
type UniversalAliases = Nothing;
147+
type CallDispatcher = Call;
147148
}
148149

149150
parameter_types! {

runtime/test-runtime/src/xcm_config.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,5 @@ impl xcm_executor::Config for XcmConfig {
103103
type FeeManager = ();
104104
type MessageExporter = ();
105105
type UniversalAliases = Nothing;
106+
type CallDispatcher = super::Call;
106107
}

runtime/westend/src/xcm_config.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ impl xcm_executor::Config for XcmConfig {
123123
type FeeManager = ();
124124
type MessageExporter = ();
125125
type UniversalAliases = Nothing;
126+
type CallDispatcher = Call;
126127
}
127128

128129
/// Type to convert an `Origin` type value into a `MultiLocation` value which represents an interior location

xcm/pallet-xcm-benchmarks/src/fungible/mock.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ impl xcm_executor::Config for XcmConfig {
153153
type FeeManager = ();
154154
type MessageExporter = ();
155155
type UniversalAliases = Nothing;
156+
type CallDispatcher = Call;
156157
}
157158

158159
impl crate::Config for Test {

xcm/pallet-xcm-benchmarks/src/generic/mock.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ impl xcm_executor::Config for XcmConfig {
129129
// No bridges yet...
130130
type MessageExporter = ();
131131
type UniversalAliases = TestUniversalAliases;
132+
type CallDispatcher = Call;
132133
}
133134

134135
impl crate::Config for Test {

xcm/pallet-xcm/src/mock.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ impl xcm_executor::Config for XcmConfig {
300300
type FeeManager = ();
301301
type MessageExporter = ();
302302
type UniversalAliases = Nothing;
303+
type CallDispatcher = Call;
303304
}
304305

305306
pub type LocalOriginToLocation = SignedToAccountId32<Origin, AccountId, AnyNetwork>;

xcm/xcm-builder/src/tests/mock.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,7 @@ impl Config for TestConfig {
608608
type FeeManager = TestFeeManager;
609609
type UniversalAliases = TestUniversalAliases;
610610
type MessageExporter = TestMessageExporter;
611+
type CallDispatcher = TestCall;
611612
}
612613

613614
pub fn fungible_multi_asset(location: MultiLocation, amount: u128) -> MultiAsset {

0 commit comments

Comments
 (0)