Skip to content

Commit 51cf4d4

Browse files
dastansambkchr
authored andcommitted
[FRAME] Simplify pallet config definition: remove RuntimeEvent associated type (#7229)
part of #3743 ## Motivation This PR removes the need for defining `RuntimeEvent` in the `Config` trait of a pallet. It uses associated type bound feature under the hood to make sure that `Event` of the pallet is convertible to the aggregated runtime event type `frame_system::RuntimeEvent`. This is an initial PR for `RuntimeEvent` type and will be followed with other types, e.g `RuntimeCall`. As a demo, example pallets' config definition is updated to use this feature. With this change, we can do this (and have support for events): ```rs #[pallet::config] pub trait Config: frame_system::Config { } ``` instead of this: ```rs #[pallet::config] pub trait Config: frame_system::Config { /// Overarching event type. type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>; } ``` The latter will emit deprecation warnings and is redundant. polkadot address: 16FqwPZ8GRC5U5D4Fu7W33nA55ZXzXGWHwmbnE1eT6pxuqcT --------- Co-authored-by: Bastian Köcher <[email protected]>
1 parent 29c7159 commit 51cf4d4

File tree

177 files changed

+366
-291
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

177 files changed

+366
-291
lines changed

bridges/modules/grandpa/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ pub mod pallet {
9898
#[pallet::config]
9999
pub trait Config<I: 'static = ()>: frame_system::Config {
100100
/// The overarching event type.
101+
#[allow(deprecated)]
101102
type RuntimeEvent: From<Event<Self, I>>
102103
+ IsType<<Self as frame_system::Config>::RuntimeEvent>;
103104

bridges/modules/messages/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ pub mod pallet {
107107
// General types
108108

109109
/// The overarching event type.
110+
#[allow(deprecated)]
110111
type RuntimeEvent: From<Event<Self, I>>
111112
+ IsType<<Self as frame_system::Config>::RuntimeEvent>;
112113
/// Benchmarks results from runtime we're plugged into.

bridges/modules/parachains/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ pub mod pallet {
183183
BoundedBridgeGrandpaConfig<Self::BridgesGrandpaPalletInstance>
184184
{
185185
/// The overarching event type.
186+
#[allow(deprecated)]
186187
type RuntimeEvent: From<Event<Self, I>>
187188
+ IsType<<Self as frame_system::Config>::RuntimeEvent>;
188189
/// Benchmarks results from runtime we're plugged into.

bridges/modules/relayers/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ pub mod pallet {
7474
#[pallet::config]
7575
pub trait Config<I: 'static = ()>: frame_system::Config {
7676
/// The overarching event type.
77+
#[allow(deprecated)]
7778
type RuntimeEvent: From<Event<Self, I>>
7879
+ IsType<<Self as frame_system::Config>::RuntimeEvent>;
7980

bridges/modules/xcm-bridge-hub-router/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ pub mod pallet {
7979
#[pallet::config]
8080
pub trait Config<I: 'static = ()>: frame_system::Config {
8181
/// The overarching event type.
82+
#[allow(deprecated)]
8283
type RuntimeEvent: From<Event<Self, I>>
8384
+ IsType<<Self as frame_system::Config>::RuntimeEvent>;
8485
/// Benchmarks results from runtime we're plugged into.

bridges/modules/xcm-bridge-hub/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ pub mod pallet {
194194
BridgeMessagesConfig<Self::BridgeMessagesPalletInstance>
195195
{
196196
/// The overarching event type.
197+
#[allow(deprecated)]
197198
type RuntimeEvent: From<Event<Self, I>>
198199
+ IsType<<Self as frame_system::Config>::RuntimeEvent>;
199200

bridges/snowbridge/pallets/ethereum-client/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ pub mod pallet {
9090

9191
#[pallet::config]
9292
pub trait Config: frame_system::Config {
93+
#[allow(deprecated)]
9394
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
9495
#[pallet::constant]
9596
type ForkVersions: Get<ForkVersions>;

bridges/snowbridge/pallets/inbound-queue-v2/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ pub mod pallet {
7979

8080
#[pallet::config]
8181
pub trait Config: frame_system::Config {
82+
#[allow(deprecated)]
8283
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
8384
/// The verifier for inbound messages from Ethereum.
8485
type Verifier: Verifier;

bridges/snowbridge/pallets/inbound-queue/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ pub mod pallet {
9797

9898
#[pallet::config]
9999
pub trait Config: frame_system::Config {
100+
#[allow(deprecated)]
100101
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
101102

102103
/// The verifier for inbound messages from Ethereum

bridges/snowbridge/pallets/outbound-queue-v2/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ pub mod pallet {
114114

115115
#[pallet::config]
116116
pub trait Config: frame_system::Config {
117+
#[allow(deprecated)]
117118
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
118119

119120
type Hashing: Hash<Output = H256>;

bridges/snowbridge/pallets/outbound-queue/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ pub mod pallet {
139139

140140
#[pallet::config]
141141
pub trait Config: frame_system::Config {
142+
#[allow(deprecated)]
142143
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
143144

144145
type Hashing: Hash<Output = H256>;

bridges/snowbridge/pallets/system-frontend/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ pub mod pallet {
7979

8080
#[pallet::config]
8181
pub trait Config: frame_system::Config {
82+
#[allow(deprecated)]
8283
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
8384

8485
/// Origin check for XCM locations that can register token

bridges/snowbridge/pallets/system-v2/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ pub mod pallet {
6767

6868
#[pallet::config]
6969
pub trait Config: frame_system::Config + snowbridge_pallet_system::Config {
70+
#[allow(deprecated)]
7071
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
7172

7273
/// Send messages to Ethereum

bridges/snowbridge/pallets/system/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ pub mod pallet {
108108

109109
#[pallet::config]
110110
pub trait Config: frame_system::Config {
111+
#[allow(deprecated)]
111112
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
112113

113114
/// Send messages to Ethereum

cumulus/pallets/collator-selection/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ pub mod pallet {
141141
#[pallet::config]
142142
pub trait Config: frame_system::Config {
143143
/// Overarching event type.
144+
#[allow(deprecated)]
144145
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
145146

146147
/// The currency mechanism.

cumulus/pallets/dmp-queue/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ pub mod pallet {
5959
#[pallet::config]
6060
pub trait Config: frame_system::Config {
6161
/// The overarching event type of the runtime.
62+
#[allow(deprecated)]
6263
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
6364

6465
/// The sink for all DMP messages that the lazy migration will use.

cumulus/pallets/parachain-system/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ pub mod pallet {
248248
#[pallet::config]
249249
pub trait Config: frame_system::Config<OnSetCode = ParachainSetCode<Self>> {
250250
/// The overarching event type.
251+
#[allow(deprecated)]
251252
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
252253

253254
/// Something which can be notified when the validation data is set.

cumulus/pallets/solo-to-para/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ pub mod pallet {
3333
pub trait Config:
3434
frame_system::Config + parachain_system::Config + pallet_sudo::Config
3535
{
36+
#[allow(deprecated)]
3637
type RuntimeEvent: From<Event> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
3738
}
3839

cumulus/pallets/xcm/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ pub mod pallet {
3939
#[pallet::config]
4040
pub trait Config: frame_system::Config {
4141
/// The overarching event type.
42+
#[allow(deprecated)]
4243
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
4344

4445
type XcmExecutor: ExecuteXcm<Self::RuntimeCall>;

cumulus/pallets/xcmp-queue/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ pub mod pallet {
115115

116116
#[pallet::config]
117117
pub trait Config: frame_system::Config {
118+
#[allow(deprecated)]
118119
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
119120

120121
/// Information on the available XCMP channels.

cumulus/parachains/pallets/collective-content/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ pub mod pallet {
6969
#[pallet::config]
7070
pub trait Config<I: 'static = ()>: frame_system::Config {
7171
/// The overarching event type.
72+
#[allow(deprecated)]
7273
type RuntimeEvent: From<Event<Self, I>>
7374
+ IsType<<Self as frame_system::Config>::RuntimeEvent>;
7475

cumulus/parachains/pallets/ping/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ pub mod pallet {
4848
#[pallet::config]
4949
pub trait Config: frame_system::Config {
5050
/// The overarching event type.
51+
#[allow(deprecated)]
5152
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
5253

5354
type RuntimeOrigin: From<<Self as SystemConfig>::RuntimeOrigin>

docs/sdk/packages/guides/first-pallet/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,7 @@ pub mod pallet_v2 {
365365
#[pallet::config]
366366
pub trait Config: frame_system::Config {
367367
/// The overarching event type of the runtime.
368+
#[allow(deprecated)]
368369
type RuntimeEvent: From<Event<Self>>
369370
+ IsType<<Self as frame_system::Config>::RuntimeEvent>
370371
+ TryInto<Event<Self>>;

docs/sdk/src/guides/your_first_pallet/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,7 @@ pub mod pallet_v2 {
673673
#[pallet::config]
674674
pub trait Config: frame_system::Config {
675675
/// The overarching event type of the runtime.
676+
#[allow(deprecated)]
676677
type RuntimeEvent: From<Event<Self>>
677678
+ IsType<<Self as frame_system::Config>::RuntimeEvent>
678679
+ TryInto<Event<Self>>;

docs/sdk/src/polkadot_sdk/frame_runtime.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ pub mod pallet {
104104
pub trait Config: frame_system::Config {
105105
/// A type that is not known now, but the runtime that will contain this pallet will
106106
/// know it later, therefore we define it here as an associated type.
107+
#[allow(deprecated)]
107108
type RuntimeEvent: IsType<<Self as frame_system::Config>::RuntimeEvent> + From<Event<Self>>;
108109

109110
/// A parameterize-able value that we receive later via the `Get<_>` trait.

polkadot/runtime/common/src/assigned_slots/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ pub mod pallet {
120120
#[pallet::disable_frame_system_supertrait_check]
121121
pub trait Config: configuration::Config + paras::Config + slots::Config {
122122
/// The overarching event type.
123+
#[allow(deprecated)]
123124
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
124125

125126
/// Origin for assigning slots.

polkadot/runtime/common/src/auctions/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ pub mod pallet {
9090
#[pallet::config]
9191
pub trait Config: frame_system::Config {
9292
/// The overarching event type.
93+
#[allow(deprecated)]
9394
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
9495

9596
/// The type representing the leasing system.

polkadot/runtime/common/src/claims/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ pub mod pallet {
202202
#[pallet::config]
203203
pub trait Config: frame_system::Config {
204204
/// The overarching event type.
205+
#[allow(deprecated)]
205206
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
206207
type VestingSchedule: VestingSchedule<Self::AccountId, Moment = BlockNumberFor<Self>>;
207208
#[pallet::constant]

polkadot/runtime/common/src/crowdloan/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ pub mod pallet {
186186

187187
#[pallet::config]
188188
pub trait Config: frame_system::Config {
189+
#[allow(deprecated)]
189190
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
190191

191192
/// `PalletId` for the crowdloan pallet. An appropriate value could be

polkadot/runtime/common/src/identity_migrator.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ pub mod pallet {
7878
#[pallet::config]
7979
pub trait Config: frame_system::Config + pallet_identity::Config {
8080
/// Overarching event type.
81+
#[allow(deprecated)]
8182
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
8283

8384
/// The origin that can reap identities. Expected to be `EnsureSigned<AccountId>` on the

polkadot/runtime/common/src/paras_registrar/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ pub mod pallet {
121121
#[pallet::disable_frame_system_supertrait_check]
122122
pub trait Config: configuration::Config + paras::Config {
123123
/// The overarching event type.
124+
#[allow(deprecated)]
124125
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
125126

126127
/// The aggregated origin type must support the `parachains` origin. We require that we can

polkadot/runtime/common/src/purchase/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ pub mod pallet {
100100
#[pallet::config]
101101
pub trait Config: frame_system::Config {
102102
/// The overarching event type.
103+
#[allow(deprecated)]
103104
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
104105

105106
/// Balances Pallet

polkadot/runtime/common/src/slots/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ pub mod pallet {
7474
#[pallet::config]
7575
pub trait Config: frame_system::Config {
7676
/// The overarching event type.
77+
#[allow(deprecated)]
7778
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
7879

7980
/// The currency type used for bidding.

polkadot/runtime/parachains/src/coretime/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ pub mod pallet {
118118
pub trait Config: frame_system::Config + assigner_coretime::Config + on_demand::Config {
119119
type RuntimeOrigin: From<<Self as frame_system::Config>::RuntimeOrigin>
120120
+ Into<result::Result<Origin, <Self as Config>::RuntimeOrigin>>;
121+
#[allow(deprecated)]
121122
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
122123
/// The ParaId of the coretime chain.
123124
#[pallet::constant]

polkadot/runtime/parachains/src/disputes.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,7 @@ pub mod pallet {
372372

373373
#[pallet::config]
374374
pub trait Config: frame_system::Config + configuration::Config + session_info::Config {
375+
#[allow(deprecated)]
375376
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
376377
type RewardValidators: RewardValidators;
377378
type SlashingHandler: SlashingHandler<BlockNumberFor<Self>>;

polkadot/runtime/parachains/src/hrmp.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ pub mod pallet {
259259
frame_system::Config + configuration::Config + paras::Config + dmp::Config
260260
{
261261
/// The outer event type.
262+
#[allow(deprecated)]
262263
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
263264

264265
type RuntimeOrigin: From<crate::Origin>

polkadot/runtime/parachains/src/inclusion/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ pub mod pallet {
286286
+ configuration::Config
287287
+ scheduler::Config
288288
{
289+
#[allow(deprecated)]
289290
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
290291
type DisputesHandler: disputes::DisputesHandler<BlockNumberFor<Self>>;
291292
type RewardValidators: RewardValidators;

polkadot/runtime/parachains/src/on_demand/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ pub mod pallet {
117117
#[pallet::config]
118118
pub trait Config: frame_system::Config + configuration::Config + paras::Config {
119119
/// The runtime's definition of an event.
120+
#[allow(deprecated)]
120121
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
121122

122123
/// The runtime's definition of a Currency.

polkadot/runtime/parachains/src/paras/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,7 @@ pub mod pallet {
628628
+ shared::Config
629629
+ frame_system::offchain::CreateInherent<Call<Self>>
630630
{
631+
#[allow(deprecated)]
631632
type RuntimeEvent: From<Event> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
632633

633634
#[pallet::constant]

polkadot/runtime/rococo/src/validator_manager.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ pub mod pallet {
3737
#[pallet::config]
3838
pub trait Config: frame_system::Config + pallet_session::Config {
3939
/// The overreaching event type.
40+
#[allow(deprecated)]
4041
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
4142

4243
/// Privileged origin that can add or remove validators.

polkadot/runtime/test-runtime/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,7 @@ pub mod pallet_test_notifier {
693693

694694
#[pallet::config]
695695
pub trait Config: frame_system::Config + pallet_xcm::Config {
696+
#[allow(deprecated)]
696697
type RuntimeEvent: IsType<<Self as frame_system::Config>::RuntimeEvent> + From<Event<Self>>;
697698
type RuntimeOrigin: IsType<<Self as frame_system::Config>::RuntimeOrigin>
698699
+ Into<Result<pallet_xcm::Origin, <Self as Config>::RuntimeOrigin>>;

polkadot/xcm/pallet-xcm/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ pub mod pallet {
241241
/// The module configuration trait.
242242
pub trait Config: frame_system::Config {
243243
/// The overarching event type.
244+
#[allow(deprecated)]
244245
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
245246

246247
/// A lockable currency.

polkadot/xcm/pallet-xcm/src/mock.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ pub mod pallet_test_notifier {
6767

6868
#[pallet::config]
6969
pub trait Config: frame_system::Config + crate::Config {
70+
#[allow(deprecated)]
7071
type RuntimeEvent: IsType<<Self as frame_system::Config>::RuntimeEvent> + From<Event<Self>>;
7172
type RuntimeOrigin: IsType<<Self as frame_system::Config>::RuntimeOrigin>
7273
+ Into<Result<crate::Origin, <Self as Config>::RuntimeOrigin>>;
@@ -232,10 +233,10 @@ impl SendXcm for TestPaidForPara3000SendXcm {
232233
) -> SendResult<(Location, Xcm<()>)> {
233234
if let Some(dest) = dest.as_ref() {
234235
if !dest.eq(&Para3000Location::get()) {
235-
return Err(SendError::NotApplicable)
236+
return Err(SendError::NotApplicable);
236237
}
237238
} else {
238-
return Err(SendError::NotApplicable)
239+
return Err(SendError::NotApplicable);
239240
}
240241

241242
let pair = (dest.take().unwrap(), msg.take().unwrap());

polkadot/xcm/xcm-simulator/fuzzer/src/parachain.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ pub mod mock_msg_queue {
157157

158158
#[pallet::config]
159159
pub trait Config: frame_system::Config {
160+
#[allow(deprecated)]
160161
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
161162
type XcmExecutor: ExecuteXcm<Self::RuntimeCall>;
162163
}

polkadot/xcm/xcm-simulator/src/mock_message_queue.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ pub mod pallet {
3535

3636
#[pallet::config]
3737
pub trait Config: frame_system::Config {
38+
#[allow(deprecated)]
3839
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
3940
type XcmExecutor: ExecuteXcm<Self::RuntimeCall>;
4041
}

0 commit comments

Comments
 (0)