diff --git a/polkadot/runtime/westend/src/lib.rs b/polkadot/runtime/westend/src/lib.rs index b5b72f992ca9ae377a2e537dad21ea7d8b2d0130..cf373c95a9c8f0b46d7ee8be0219b7449f91d764 100644 --- a/polkadot/runtime/westend/src/lib.rs +++ b/polkadot/runtime/westend/src/lib.rs @@ -1597,9 +1597,7 @@ pub type MetaTxExtension = ( impl pallet_meta_tx::Config for Runtime { type WeightInfo = weights::pallet_meta_tx::WeightInfo<Runtime>; - type RuntimeOrigin = RuntimeOrigin; type RuntimeEvent = RuntimeEvent; - type RuntimeCall = RuntimeCall; #[cfg(not(feature = "runtime-benchmarks"))] type Extension = MetaTxExtension; #[cfg(feature = "runtime-benchmarks")] diff --git a/substrate/bin/node/runtime/src/lib.rs b/substrate/bin/node/runtime/src/lib.rs index 2cd328dfee24e94a72563889068077bca4145f31..91452f3570cf683c129e877e08603ed9dd20b923 100644 --- a/substrate/bin/node/runtime/src/lib.rs +++ b/substrate/bin/node/runtime/src/lib.rs @@ -2365,9 +2365,7 @@ pub type MetaTxExtension = ( impl pallet_meta_tx::Config for Runtime { type WeightInfo = (); - type RuntimeOrigin = RuntimeOrigin; type RuntimeEvent = RuntimeEvent; - type RuntimeCall = RuntimeCall; #[cfg(not(feature = "runtime-benchmarks"))] type Extension = MetaTxExtension; #[cfg(feature = "runtime-benchmarks")] diff --git a/substrate/frame/meta-tx/src/benchmarking.rs b/substrate/frame/meta-tx/src/benchmarking.rs index 1250dce5efbd1e1d1ccbf834f2cd9175e6bf18a0..8e1ac058a85a37f4faab3b6ebbdb9695cc860814 100644 --- a/substrate/frame/meta-tx/src/benchmarking.rs +++ b/substrate/frame/meta-tx/src/benchmarking.rs @@ -80,7 +80,6 @@ fn assert_last_event<T: Config>(generic_event: <T as Config>::RuntimeEvent) { where T: Config, <T as Config>::Extension: Default, - <T as Config>::RuntimeCall: From<frame_system::Call<T>>, )] mod benchmarks { use super::*; diff --git a/substrate/frame/meta-tx/src/lib.rs b/substrate/frame/meta-tx/src/lib.rs index 335eea7d1cd63b670eb5fb327b419e423314abf1..ef012e2d9cc2d2620866e9c5fc317d4907a9a9cc 100644 --- a/substrate/frame/meta-tx/src/lib.rs +++ b/substrate/frame/meta-tx/src/lib.rs @@ -98,31 +98,27 @@ impl<Call, Extension> MetaTx<Call, Extension> { } /// The [`MetaTx`] for the given config. -pub type MetaTxFor<T> = MetaTx<<T as Config>::RuntimeCall, <T as Config>::Extension>; +pub type MetaTxFor<T> = MetaTx<<T as frame_system::Config>::RuntimeCall, <T as Config>::Extension>; #[frame_support::pallet] pub mod pallet { use super::*; #[pallet::config] - pub trait Config: frame_system::Config { + pub trait Config: + frame_system::Config< + RuntimeCall: Dispatchable< + Info = DispatchInfo, + PostInfo = PostDispatchInfo, + RuntimeOrigin = <Self as frame_system::Config>::RuntimeOrigin, + >, + RuntimeOrigin: AsTransactionAuthorizedOrigin + From<SystemOrigin<Self::AccountId>>, + > + { /// Weight information for calls in this pallet. type WeightInfo: WeightInfo; - /// The overarching origin type. - // We need extra `AsTransactionAuthorizedOrigin` bound to use `DispatchTransaction` impl. - type RuntimeOrigin: AsTransactionAuthorizedOrigin - + From<SystemOrigin<Self::AccountId>> - + IsType<<Self as frame_system::Config>::RuntimeOrigin>; /// The overarching event type. type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>; - /// The overarching call type. - type RuntimeCall: Parameter - + GetDispatchInfo - + Dispatchable< - Info = DispatchInfo, - PostInfo = PostDispatchInfo, - RuntimeOrigin = <Self as Config>::RuntimeOrigin, - > + IsType<<Self as frame_system::Config>::RuntimeCall>; /// Transaction extension/s for meta transactions. /// /// The extensions that must be present in every meta transaction. This generally includes @@ -138,7 +134,7 @@ pub mod pallet { /// The extension must provide an origin and the extension's weight must be zero. Use /// `pallet_meta_tx::WeightlessExtension` type when the `runtime-benchmarks` feature /// enabled. - type Extension: TransactionExtension<<Self as Config>::RuntimeCall>; + type Extension: TransactionExtension<<Self as frame_system::Config>::RuntimeCall>; } #[pallet::error] diff --git a/substrate/frame/meta-tx/src/mock.rs b/substrate/frame/meta-tx/src/mock.rs index 13b7fc4091945ae11f0578359d99bbc23d9b66ce..b3d66c7eeb10436d2500334a810bfbaa1dc0e495 100644 --- a/substrate/frame/meta-tx/src/mock.rs +++ b/substrate/frame/meta-tx/src/mock.rs @@ -87,9 +87,7 @@ mod tx_ext { impl Config for Runtime { type WeightInfo = (); - type RuntimeOrigin = RuntimeOrigin; type RuntimeEvent = RuntimeEvent; - type RuntimeCall = RuntimeCall; type Extension = MetaTxExtension; }