Skip to content

Commit 2b48d97

Browse files
authored
feat(xcm): implement XcmEventEmitter (#535)
1 parent a4ef82c commit 2b48d97

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

runtime/devnet/src/config/xcm.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ impl xcm_executor::Config for XcmConfig {
174174
// Teleporting is disabled.
175175
type UniversalLocation = UniversalLocation;
176176
type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
177+
type XcmEventEmitter = PolkadotXcm;
177178
type XcmRecorder = PolkadotXcm;
178179
type XcmSender = XcmRouter;
179180
}

runtime/mainnet/src/config/xcm.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ impl xcm_executor::Config for XcmConfig {
208208
type UniversalLocation = UniversalLocation;
209209
type Weigher =
210210
WeightInfoBounds<xcm_weights::PopXcmWeight<RuntimeCall>, RuntimeCall, MaxInstructions>;
211+
type XcmEventEmitter = PolkadotXcm;
211212
type XcmRecorder = PolkadotXcm;
212213
type XcmSender = XcmRouter;
213214
}
@@ -864,6 +865,14 @@ mod tests {
864865
);
865866
}
866867

868+
#[test]
869+
fn uses_pallet_xcm_to_emit_events() {
870+
assert_eq!(
871+
TypeId::of::<<XcmConfig as xcm_executor::Config>::XcmEventEmitter>(),
872+
TypeId::of::<PolkadotXcm>(),
873+
);
874+
}
875+
867876
#[test]
868877
fn uses_xcm_as_recorder_for_dry_runs() {
869878
assert_eq!(

runtime/testnet/src/config/xcm.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ impl xcm_executor::Config for XcmConfig {
212212
// Teleporting is disabled.
213213
type UniversalLocation = UniversalLocation;
214214
type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
215+
type XcmEventEmitter = PolkadotXcm;
215216
type XcmRecorder = PolkadotXcm;
216217
type XcmSender = XcmRouter;
217218
}

0 commit comments

Comments
 (0)