From b797660504ba47222575ac865012b5b9688dc1a0 Mon Sep 17 00:00:00 2001
From: Juan Girini <juangirini@gmail.com>
Date: Fri, 25 Aug 2023 15:08:34 +0200
Subject: [PATCH 1/6] restructure dispatch macro related exports

---
 .gitignore                                    |  3 ++
 Cargo.lock                                    |  1 -
 .../src/messages_xcm_extension.rs             |  2 +-
 .../runtime-common/src/priority_calculator.rs |  4 +--
 .../src/refund_relayer_extension.rs           |  4 +--
 .../xcm-bridge-hub-router/src/benchmarking.rs |  5 +--
 cumulus/pallets/parachain-system/src/lib.rs   |  4 +--
 cumulus/pallets/parachain-system/src/tests.rs |  3 +-
 cumulus/pallets/xcm/src/lib.rs                |  2 +-
 .../common/src/local_and_foreign_assets.rs    |  3 +-
 .../collectives-polkadot/src/impls.rs         |  3 +-
 .../parachains/runtimes/test-utils/src/lib.rs |  4 +--
 cumulus/primitives/utility/src/lib.rs         |  2 +-
 cumulus/xcm/xcm-emulator/src/lib.rs           |  3 +-
 .../common/src/assigned_slots/migration.rs    |  5 +--
 polkadot/runtime/common/src/claims.rs         |  2 +-
 .../runtime/common/src/crowdloan/migration.rs |  3 +-
 .../pallet-xcm-benchmarks/src/generic/mod.rs  |  6 ++--
 polkadot/xcm/pallet-xcm/src/lib.rs            | 11 +++----
 polkadot/xcm/xcm-executor/src/config.rs       |  3 +-
 .../xcm-executor/src/traits/on_response.rs    |  6 ++--
 substrate/frame/alliance/src/lib.rs           |  9 ++----
 substrate/frame/assets/src/benchmarking.rs    |  5 +--
 substrate/frame/assets/src/lib.rs             |  4 +--
 substrate/frame/benchmarking/src/utils.rs     |  8 ++---
 substrate/frame/collective/src/lib.rs         |  8 +++--
 substrate/frame/contracts/src/exec.rs         | 11 ++++---
 substrate/frame/contracts/src/gas.rs          |  6 ++--
 substrate/frame/contracts/src/lib.rs          |  9 ++----
 .../frame/contracts/src/migration/v15.rs      |  4 ++-
 substrate/frame/contracts/src/storage.rs      |  3 +-
 .../frame/contracts/src/storage/meter.rs      |  5 ++-
 substrate/frame/contracts/src/tests.rs        |  4 +--
 substrate/frame/contracts/src/wasm/mod.rs     |  4 +--
 substrate/frame/contracts/src/wasm/runtime.rs |  4 +--
 substrate/frame/conviction-voting/src/lib.rs  | 13 ++++++--
 .../src/unsigned.rs                           |  4 +--
 .../test-staking-e2e/src/mock.rs              |  3 +-
 substrate/frame/lottery/src/lib.rs            |  4 +--
 substrate/frame/multisig/src/migrations.rs    |  3 +-
 substrate/frame/nfts/runtime-api/Cargo.toml   |  3 +-
 substrate/frame/nfts/runtime-api/src/lib.rs   |  2 +-
 substrate/frame/nfts/src/benchmarking.rs      |  3 +-
 substrate/frame/nfts/src/tests.rs             |  6 ++--
 substrate/frame/offences/src/migration.rs     |  3 +-
 substrate/frame/proxy/src/lib.rs              |  4 +--
 substrate/frame/proxy/src/tests.rs            |  3 +-
 .../ranked-collective/src/benchmarking.rs     |  2 +-
 substrate/frame/ranked-collective/src/lib.rs  |  4 +--
 substrate/frame/referenda/src/benchmarking.rs |  3 +-
 substrate/frame/referenda/src/tests.rs        |  7 ++--
 substrate/frame/scheduler/src/lib.rs          |  8 ++---
 substrate/frame/session/src/lib.rs            |  4 +--
 substrate/frame/staking/src/benchmarking.rs   |  3 +-
 substrate/frame/staking/src/migrations.rs     |  5 +--
 substrate/frame/staking/src/pallet/mod.rs     |  2 +-
 .../frame/state-trie-migration/src/lib.rs     |  1 -
 .../src/construct_runtime/expand/call.rs      | 12 +++----
 .../procedural/src/pallet/expand/call.rs      |  4 +--
 substrate/frame/support/src/dispatch.rs       | 32 ++++++++-----------
 .../frame/support/src/dispatch_context.rs     |  8 ++---
 substrate/frame/support/src/lib.rs            |  7 ++--
 .../support/src/traits/tokens/currency.rs     |  7 ++--
 .../src/traits/tokens/currency/reservable.rs  |  3 +-
 .../src/traits/tokens/fungible/regular.rs     |  3 +-
 .../src/traits/tokens/fungibles/regular.rs    |  3 +-
 .../support/src/traits/tokens/nonfungibles.rs |  4 +--
 .../src/traits/tokens/nonfungibles_v2.rs      |  4 +--
 substrate/frame/support/src/traits/voting.rs  |  4 +--
 .../support/test/tests/construct_runtime.rs   |  8 ++---
 .../frame/transaction-storage/src/lib.rs      |  4 +--
 substrate/frame/treasury/src/benchmarking.rs  |  3 +-
 substrate/frame/uniques/src/benchmarking.rs   |  3 +-
 substrate/frame/uniques/src/tests.rs          |  3 +-
 substrate/frame/utility/src/tests.rs          |  6 ++--
 substrate/frame/vesting/src/lib.rs            |  4 +--
 substrate/frame/vesting/src/tests.rs          |  3 +-
 77 files changed, 171 insertions(+), 207 deletions(-)

diff --git a/.gitignore b/.gitignore
index e69de29bb2d1..c520c25ed85f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,3 @@
+**/target/
+.vscode
+.DS_Store
\ No newline at end of file
diff --git a/Cargo.lock b/Cargo.lock
index 4b0028a64513..2172b2e8e1f6 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -10086,7 +10086,6 @@ dependencies = [
 name = "pallet-nfts-runtime-api"
 version = "4.0.0-dev"
 dependencies = [
- "frame-support",
  "pallet-nfts",
  "parity-scale-codec",
  "sp-api",
diff --git a/cumulus/bridges/bin/runtime-common/src/messages_xcm_extension.rs b/cumulus/bridges/bin/runtime-common/src/messages_xcm_extension.rs
index 44e554ecb24f..eeb71e97c980 100644
--- a/cumulus/bridges/bin/runtime-common/src/messages_xcm_extension.rs
+++ b/cumulus/bridges/bin/runtime-common/src/messages_xcm_extension.rs
@@ -29,7 +29,7 @@ use bp_messages::{
 use bp_runtime::messages::MessageDispatchResult;
 use bp_xcm_bridge_hub_router::XcmChannelStatusProvider;
 use codec::{Decode, Encode};
-use frame_support::{dispatch::Weight, traits::Get, CloneNoBound, EqNoBound, PartialEqNoBound};
+use frame_support::{traits::Get, weights::Weight, CloneNoBound, EqNoBound, PartialEqNoBound};
 use pallet_bridge_messages::{
 	Config as MessagesConfig, OutboundLanesCongestedSignals, Pallet as MessagesPallet,
 	WeightInfoExt as MessagesPalletWeights,
diff --git a/cumulus/bridges/bin/runtime-common/src/priority_calculator.rs b/cumulus/bridges/bin/runtime-common/src/priority_calculator.rs
index 590de05fb1c6..691ce26af782 100644
--- a/cumulus/bridges/bin/runtime-common/src/priority_calculator.rs
+++ b/cumulus/bridges/bin/runtime-common/src/priority_calculator.rs
@@ -51,13 +51,13 @@ mod integrity_tests {
 	use bp_messages::MessageNonce;
 	use bp_runtime::PreComputedSize;
 	use frame_support::{
-		dispatch::{DispatchClass, DispatchInfo, Dispatchable, Pays, PostDispatchInfo},
+		dispatch::{DispatchClass, DispatchInfo, Pays, PostDispatchInfo},
 		traits::Get,
 	};
 	use pallet_bridge_messages::WeightInfoExt;
 	use pallet_transaction_payment::OnChargeTransaction;
 	use sp_runtime::{
-		traits::{UniqueSaturatedInto, Zero},
+		traits::{Dispatchable, UniqueSaturatedInto, Zero},
 		transaction_validity::TransactionPriority,
 		FixedPointOperand, SaturatedConversion, Saturating,
 	};
diff --git a/cumulus/bridges/bin/runtime-common/src/refund_relayer_extension.rs b/cumulus/bridges/bin/runtime-common/src/refund_relayer_extension.rs
index 4e577e88a411..d7a17dd5afef 100644
--- a/cumulus/bridges/bin/runtime-common/src/refund_relayer_extension.rs
+++ b/cumulus/bridges/bin/runtime-common/src/refund_relayer_extension.rs
@@ -27,7 +27,7 @@ use bp_relayers::{RewardsAccountOwner, RewardsAccountParams};
 use bp_runtime::{Parachain, ParachainIdOf, RangeInclusiveExt, StaticStrProvider};
 use codec::{Decode, Encode};
 use frame_support::{
-	dispatch::{CallableCallFor, DispatchInfo, Dispatchable, PostDispatchInfo},
+	dispatch::{CallableCallFor, DispatchInfo, PostDispatchInfo},
 	traits::IsSubType,
 	weights::Weight,
 	CloneNoBound, DefaultNoBound, EqNoBound, PartialEqNoBound, RuntimeDebugNoBound,
@@ -47,7 +47,7 @@ use pallet_transaction_payment::{Config as TransactionPaymentConfig, OnChargeTra
 use pallet_utility::{Call as UtilityCall, Config as UtilityConfig, Pallet as UtilityPallet};
 use scale_info::TypeInfo;
 use sp_runtime::{
-	traits::{DispatchInfoOf, Get, PostDispatchInfoOf, SignedExtension, Zero},
+	traits::{DispatchInfoOf, Dispatchable, Get, PostDispatchInfoOf, SignedExtension, Zero},
 	transaction_validity::{
 		TransactionPriority, TransactionValidity, TransactionValidityError, ValidTransactionBuilder,
 	},
diff --git a/cumulus/bridges/modules/xcm-bridge-hub-router/src/benchmarking.rs b/cumulus/bridges/modules/xcm-bridge-hub-router/src/benchmarking.rs
index b32b983daf72..e41e05c51f13 100644
--- a/cumulus/bridges/modules/xcm-bridge-hub-router/src/benchmarking.rs
+++ b/cumulus/bridges/modules/xcm-bridge-hub-router/src/benchmarking.rs
@@ -22,10 +22,7 @@ use crate::{Bridge, Call};
 
 use bp_xcm_bridge_hub_router::{BridgeState, MINIMAL_DELIVERY_FEE_FACTOR};
 use frame_benchmarking::benchmarks_instance_pallet;
-use frame_support::{
-	dispatch::UnfilteredDispatchable,
-	traits::{EnsureOrigin, Get, Hooks},
-};
+use frame_support::traits::{EnsureOrigin, Get, Hooks, UnfilteredDispatchable};
 use sp_runtime::traits::Zero;
 use xcm::prelude::*;
 
diff --git a/cumulus/pallets/parachain-system/src/lib.rs b/cumulus/pallets/parachain-system/src/lib.rs
index ded869bf6f79..453e721d1e6a 100644
--- a/cumulus/pallets/parachain-system/src/lib.rs
+++ b/cumulus/pallets/parachain-system/src/lib.rs
@@ -36,7 +36,7 @@ use cumulus_primitives_core::{
 };
 use cumulus_primitives_parachain_inherent::{MessageQueueChain, ParachainInherentData};
 use frame_support::{
-	dispatch::{DispatchError, DispatchResult, Pays, PostDispatchInfo},
+	dispatch::{DispatchResult, Pays, PostDispatchInfo},
 	ensure,
 	inherent::{InherentData, InherentIdentifier, ProvideInherent},
 	storage,
@@ -52,7 +52,7 @@ use sp_runtime::{
 		InvalidTransaction, TransactionLongevity, TransactionSource, TransactionValidity,
 		ValidTransaction,
 	},
-	RuntimeDebug,
+	DispatchError, RuntimeDebug,
 };
 use sp_std::{cmp, collections::btree_map::BTreeMap, prelude::*};
 use xcm::latest::XcmHash;
diff --git a/cumulus/pallets/parachain-system/src/tests.rs b/cumulus/pallets/parachain-system/src/tests.rs
index 41e8dc63808d..cc87dbf2bb61 100755
--- a/cumulus/pallets/parachain-system/src/tests.rs
+++ b/cumulus/pallets/parachain-system/src/tests.rs
@@ -23,10 +23,9 @@ use cumulus_primitives_core::{
 use cumulus_test_relay_sproof_builder::RelayStateSproofBuilder;
 use frame_support::{
 	assert_ok,
-	dispatch::UnfilteredDispatchable,
 	inherent::{InherentData, ProvideInherent},
 	parameter_types,
-	traits::{OnFinalize, OnInitialize},
+	traits::{OnFinalize, OnInitialize, UnfilteredDispatchable},
 	weights::Weight,
 };
 use frame_system::{
diff --git a/cumulus/pallets/xcm/src/lib.rs b/cumulus/pallets/xcm/src/lib.rs
index f230ced5dc55..87aad5700a5a 100644
--- a/cumulus/pallets/xcm/src/lib.rs
+++ b/cumulus/pallets/xcm/src/lib.rs
@@ -24,7 +24,7 @@ use codec::{Decode, DecodeLimit, Encode};
 use cumulus_primitives_core::{
 	relay_chain::BlockNumber as RelayBlockNumber, DmpMessageHandler, ParaId,
 };
-use frame_support::dispatch::Weight;
+use frame_support::weights::Weight;
 pub use pallet::*;
 use scale_info::TypeInfo;
 use sp_runtime::{traits::BadOrigin, RuntimeDebug};
diff --git a/cumulus/parachains/runtimes/assets/common/src/local_and_foreign_assets.rs b/cumulus/parachains/runtimes/assets/common/src/local_and_foreign_assets.rs
index 72fd9e7a9165..3659848d6104 100644
--- a/cumulus/parachains/runtimes/assets/common/src/local_and_foreign_assets.rs
+++ b/cumulus/parachains/runtimes/assets/common/src/local_and_foreign_assets.rs
@@ -14,7 +14,6 @@
 // limitations under the License.
 
 use frame_support::{
-	pallet_prelude::DispatchError,
 	traits::{
 		fungibles::{Balanced, Create, HandleImbalanceDrop, Inspect, Mutate, Unbalanced},
 		tokens::{
@@ -25,7 +24,7 @@ use frame_support::{
 };
 use pallet_asset_conversion::{MultiAssetIdConversionResult, MultiAssetIdConverter};
 use parachains_common::AccountId;
-use sp_runtime::{traits::MaybeEquivalence, DispatchResult};
+use sp_runtime::{traits::MaybeEquivalence, DispatchError, DispatchResult};
 use sp_std::{boxed::Box, marker::PhantomData};
 use xcm::latest::MultiLocation;
 
diff --git a/cumulus/parachains/runtimes/collectives/collectives-polkadot/src/impls.rs b/cumulus/parachains/runtimes/collectives/collectives-polkadot/src/impls.rs
index c28b4e2dc1e6..a4f0f7921e35 100644
--- a/cumulus/parachains/runtimes/collectives/collectives-polkadot/src/impls.rs
+++ b/cumulus/parachains/runtimes/collectives/collectives-polkadot/src/impls.rs
@@ -15,13 +15,14 @@
 
 use crate::OriginCaller;
 use frame_support::{
-	dispatch::{DispatchError, DispatchResultWithPostInfo},
+	dispatch::DispatchResultWithPostInfo,
 	traits::{Currency, Get, Imbalance, OnUnbalanced, OriginTrait, PrivilegeCmp},
 	weights::Weight,
 };
 use log;
 use pallet_alliance::{ProposalIndex, ProposalProvider};
 use parachains_common::impls::NegativeImbalance;
+use sp_runtime::DispatchError;
 use sp_std::{cmp::Ordering, marker::PhantomData, prelude::*};
 use xcm::latest::{Fungibility, Junction, Parent};
 
diff --git a/cumulus/parachains/runtimes/test-utils/src/lib.rs b/cumulus/parachains/runtimes/test-utils/src/lib.rs
index 93183a73c22e..89bc7c4906ea 100644
--- a/cumulus/parachains/runtimes/test-utils/src/lib.rs
+++ b/cumulus/parachains/runtimes/test-utils/src/lib.rs
@@ -22,9 +22,9 @@ use cumulus_primitives_core::{
 use cumulus_primitives_parachain_inherent::ParachainInherentData;
 use cumulus_test_relay_sproof_builder::RelayStateSproofBuilder;
 use frame_support::{
-	dispatch::{DispatchResult, RawOrigin, UnfilteredDispatchable},
+	dispatch::{DispatchResult, RawOrigin},
 	inherent::{InherentData, ProvideInherent},
-	traits::{OnFinalize, OnInitialize, OriginTrait},
+	traits::{OnFinalize, OnInitialize, OriginTrait, UnfilteredDispatchable},
 	weights::Weight,
 };
 use frame_system::pallet_prelude::{BlockNumberFor, HeaderFor};
diff --git a/cumulus/primitives/utility/src/lib.rs b/cumulus/primitives/utility/src/lib.rs
index 87be029163d6..79c826d633ae 100644
--- a/cumulus/primitives/utility/src/lib.rs
+++ b/cumulus/primitives/utility/src/lib.rs
@@ -315,11 +315,11 @@ mod tests {
 	use cumulus_primitives_core::UpwardMessage;
 	use frame_support::{
 		assert_ok,
-		dispatch::DispatchError,
 		traits::tokens::{
 			DepositConsequence, Fortitude, Preservation, Provenance, WithdrawConsequence,
 		},
 	};
+	use sp_runtime::DispatchError;
 	use xcm_executor::{traits::Error, Assets};
 
 	/// Validates [`validate`] for required Some(destination) and Some(message)
diff --git a/cumulus/xcm/xcm-emulator/src/lib.rs b/cumulus/xcm/xcm-emulator/src/lib.rs
index 72f88ee7fa97..54e1e430b15e 100644
--- a/cumulus/xcm/xcm-emulator/src/lib.rs
+++ b/cumulus/xcm/xcm-emulator/src/lib.rs
@@ -14,7 +14,7 @@
 // You should have received a copy of the GNU General Public License
 // along with Polkadot.  If not, see <http://www.gnu.org/licenses/>.
 
-pub use codec::{Decode, Encode};
+pub use codec::{Decode, Encode, EncodeLike};
 pub use lazy_static::lazy_static;
 pub use log;
 pub use paste;
@@ -32,7 +32,6 @@ pub use std::{
 // Substrate
 pub use frame_support::{
 	assert_ok,
-	dispatch::EncodeLike,
 	sp_runtime::{AccountId32, DispatchResult},
 	traits::{
 		tokens::currency::Currency, EnqueueMessage, Get, Hooks, OriginTrait, ProcessMessage,
diff --git a/polkadot/runtime/common/src/assigned_slots/migration.rs b/polkadot/runtime/common/src/assigned_slots/migration.rs
index 884d67222d28..b82053ffb439 100644
--- a/polkadot/runtime/common/src/assigned_slots/migration.rs
+++ b/polkadot/runtime/common/src/assigned_slots/migration.rs
@@ -15,10 +15,7 @@
 // along with Polkadot.  If not, see <http://www.gnu.org/licenses/>.
 
 use super::{Config, MaxPermanentSlots, MaxTemporarySlots, Pallet, LOG_TARGET};
-use frame_support::{
-	dispatch::GetStorageVersion,
-	traits::{Get, OnRuntimeUpgrade},
-};
+use frame_support::traits::{Get, GetStorageVersion, OnRuntimeUpgrade};
 
 #[cfg(feature = "try-runtime")]
 use frame_support::ensure;
diff --git a/polkadot/runtime/common/src/claims.rs b/polkadot/runtime/common/src/claims.rs
index 9cc06b2bede2..82a9ef28c0f6 100644
--- a/polkadot/runtime/common/src/claims.rs
+++ b/polkadot/runtime/common/src/claims.rs
@@ -1470,7 +1470,7 @@ mod benchmarking {
 	use super::*;
 	use crate::claims::Call;
 	use frame_benchmarking::{account, benchmarks};
-	use frame_support::dispatch::UnfilteredDispatchable;
+	use frame_support::traits::UnfilteredDispatchable;
 	use frame_system::RawOrigin;
 	use secp_utils::*;
 	use sp_runtime::{traits::ValidateUnsigned, DispatchResult};
diff --git a/polkadot/runtime/common/src/crowdloan/migration.rs b/polkadot/runtime/common/src/crowdloan/migration.rs
index 03c4ab6c3119..5133c14ada92 100644
--- a/polkadot/runtime/common/src/crowdloan/migration.rs
+++ b/polkadot/runtime/common/src/crowdloan/migration.rs
@@ -16,9 +16,8 @@
 
 use super::*;
 use frame_support::{
-	dispatch::GetStorageVersion,
 	storage_alias,
-	traits::{OnRuntimeUpgrade, StorageVersion},
+	traits::{GetStorageVersion, OnRuntimeUpgrade, StorageVersion},
 	Twox64Concat,
 };
 
diff --git a/polkadot/xcm/pallet-xcm-benchmarks/src/generic/mod.rs b/polkadot/xcm/pallet-xcm-benchmarks/src/generic/mod.rs
index 195066ee5b48..f207c238a39f 100644
--- a/polkadot/xcm/pallet-xcm-benchmarks/src/generic/mod.rs
+++ b/polkadot/xcm/pallet-xcm-benchmarks/src/generic/mod.rs
@@ -24,10 +24,8 @@ mod mock;
 #[frame_support::pallet]
 pub mod pallet {
 	use frame_benchmarking::BenchmarkError;
-	use frame_support::{
-		dispatch::{Dispatchable, GetDispatchInfo},
-		pallet_prelude::Encode,
-	};
+	use frame_support::{dispatch::GetDispatchInfo, pallet_prelude::Encode};
+	use sp_runtime::traits::Dispatchable;
 	use xcm::latest::{
 		InteriorMultiLocation, Junction, MultiAsset, MultiAssets, MultiLocation, NetworkId,
 		Response,
diff --git a/polkadot/xcm/pallet-xcm/src/lib.rs b/polkadot/xcm/pallet-xcm/src/lib.rs
index aefcf30910ed..9dfb63c2c9c6 100644
--- a/polkadot/xcm/pallet-xcm/src/lib.rs
+++ b/polkadot/xcm/pallet-xcm/src/lib.rs
@@ -34,7 +34,8 @@ use frame_support::traits::{
 use scale_info::TypeInfo;
 use sp_runtime::{
 	traits::{
-		AccountIdConversion, BadOrigin, BlakeTwo256, BlockNumberProvider, Hash, Saturating, Zero,
+		AccountIdConversion, BadOrigin, BlakeTwo256, BlockNumberProvider, Dispatchable, Hash,
+		Saturating, Zero,
 	},
 	RuntimeDebug,
 };
@@ -43,10 +44,7 @@ use xcm::{latest::QueryResponseInfo, prelude::*};
 use xcm_executor::traits::{ConvertOrigin, Properties};
 
 use frame_support::{
-	dispatch::{Dispatchable, GetDispatchInfo},
-	pallet_prelude::*,
-	traits::WithdrawReasons,
-	PalletId,
+	dispatch::GetDispatchInfo, pallet_prelude::*, traits::WithdrawReasons, PalletId,
 };
 use frame_system::pallet_prelude::*;
 pub use pallet::*;
@@ -149,11 +147,12 @@ impl WeightInfo for TestWeightInfo {
 pub mod pallet {
 	use super::*;
 	use frame_support::{
-		dispatch::{Dispatchable, GetDispatchInfo, PostDispatchInfo},
+		dispatch::{GetDispatchInfo, PostDispatchInfo},
 		parameter_types,
 	};
 	use frame_system::Config as SysConfig;
 	use sp_core::H256;
+	use sp_runtime::traits::Dispatchable;
 	use xcm_executor::traits::{MatchesFungible, WeightBounds};
 
 	parameter_types! {
diff --git a/polkadot/xcm/xcm-executor/src/config.rs b/polkadot/xcm/xcm-executor/src/config.rs
index 1fc5cef39215..2ff12cd7a539 100644
--- a/polkadot/xcm/xcm-executor/src/config.rs
+++ b/polkadot/xcm/xcm-executor/src/config.rs
@@ -20,9 +20,10 @@ use crate::traits::{
 	WeightTrader,
 };
 use frame_support::{
-	dispatch::{Dispatchable, GetDispatchInfo, Parameter, PostDispatchInfo},
+	dispatch::{GetDispatchInfo, Parameter, PostDispatchInfo},
 	traits::{Contains, ContainsPair, Get, PalletsInfoAccess},
 };
+use sp_runtime::traits::Dispatchable;
 use xcm::prelude::*;
 
 /// The trait to parameterize the `XcmExecutor`.
diff --git a/polkadot/xcm/xcm-executor/src/traits/on_response.rs b/polkadot/xcm/xcm-executor/src/traits/on_response.rs
index b0f8b35bb98f..3558160dc87d 100644
--- a/polkadot/xcm/xcm-executor/src/traits/on_response.rs
+++ b/polkadot/xcm/xcm-executor/src/traits/on_response.rs
@@ -16,12 +16,10 @@
 
 use crate::Xcm;
 use core::result;
-use frame_support::{
-	dispatch::fmt::Debug,
-	pallet_prelude::{Get, TypeInfo},
-};
+use frame_support::pallet_prelude::{Get, TypeInfo};
 use parity_scale_codec::{FullCodec, MaxEncodedLen};
 use sp_arithmetic::traits::Zero;
+use sp_std::fmt::Debug;
 use xcm::latest::{
 	Error as XcmError, InteriorMultiLocation, MultiLocation, QueryId, Response,
 	Result as XcmResult, Weight, XcmContext,
diff --git a/substrate/frame/alliance/src/lib.rs b/substrate/frame/alliance/src/lib.rs
index 1986354a0941..627399f805b3 100644
--- a/substrate/frame/alliance/src/lib.rs
+++ b/substrate/frame/alliance/src/lib.rs
@@ -98,16 +98,13 @@ use codec::{Decode, Encode, MaxEncodedLen};
 use frame_support::pallet_prelude::*;
 use frame_system::pallet_prelude::*;
 use sp_runtime::{
-	traits::{Saturating, StaticLookup, Zero},
-	RuntimeDebug,
+	traits::{Dispatchable, Saturating, StaticLookup, Zero},
+	DispatchError, RuntimeDebug,
 };
 use sp_std::{convert::TryInto, prelude::*};
 
 use frame_support::{
-	dispatch::{
-		DispatchError, DispatchResult, DispatchResultWithPostInfo, Dispatchable, GetDispatchInfo,
-		PostDispatchInfo,
-	},
+	dispatch::{DispatchResult, DispatchResultWithPostInfo, GetDispatchInfo, PostDispatchInfo},
 	ensure,
 	traits::{
 		ChangeMembers, Currency, Get, InitializeMembers, IsSubType, OnUnbalanced,
diff --git a/substrate/frame/assets/src/benchmarking.rs b/substrate/frame/assets/src/benchmarking.rs
index 376f19139ab9..c9b0825542de 100644
--- a/substrate/frame/assets/src/benchmarking.rs
+++ b/substrate/frame/assets/src/benchmarking.rs
@@ -23,10 +23,7 @@ use super::*;
 use frame_benchmarking::v1::{
 	account, benchmarks_instance_pallet, whitelist_account, whitelisted_caller, BenchmarkError,
 };
-use frame_support::{
-	dispatch::UnfilteredDispatchable,
-	traits::{EnsureOrigin, Get},
-};
+use frame_support::traits::{EnsureOrigin, Get, UnfilteredDispatchable};
 use frame_system::RawOrigin as SystemOrigin;
 use sp_runtime::traits::Bounded;
 use sp_std::prelude::*;
diff --git a/substrate/frame/assets/src/lib.rs b/substrate/frame/assets/src/lib.rs
index 363a99701b56..79e4fe300187 100644
--- a/substrate/frame/assets/src/lib.rs
+++ b/substrate/frame/assets/src/lib.rs
@@ -160,12 +160,12 @@ pub use types::*;
 use scale_info::TypeInfo;
 use sp_runtime::{
 	traits::{AtLeast32BitUnsigned, CheckedAdd, CheckedSub, Saturating, StaticLookup, Zero},
-	ArithmeticError, TokenError,
+	ArithmeticError, DispatchError, TokenError,
 };
 use sp_std::prelude::*;
 
 use frame_support::{
-	dispatch::{DispatchError, DispatchResult},
+	dispatch::DispatchResult,
 	ensure,
 	pallet_prelude::DispatchResultWithPostInfo,
 	storage::KeyPrefixIterator,
diff --git a/substrate/frame/benchmarking/src/utils.rs b/substrate/frame/benchmarking/src/utils.rs
index 59e5192b427b..b9b3f91e2dd7 100644
--- a/substrate/frame/benchmarking/src/utils.rs
+++ b/substrate/frame/benchmarking/src/utils.rs
@@ -17,16 +17,12 @@
 
 //! Interfaces, types and utils for benchmarking a FRAME runtime.
 use codec::{Decode, Encode};
-use frame_support::{
-	dispatch::{DispatchError, DispatchErrorWithPostInfo},
-	pallet_prelude::*,
-	traits::StorageInfo,
-};
+use frame_support::{dispatch::DispatchErrorWithPostInfo, pallet_prelude::*, traits::StorageInfo};
 use scale_info::TypeInfo;
 #[cfg(feature = "std")]
 use serde::{Deserialize, Serialize};
 use sp_io::hashing::blake2_256;
-use sp_runtime::traits::TrailingZeroInput;
+use sp_runtime::{traits::TrailingZeroInput, DispatchError};
 use sp_std::{prelude::Box, vec::Vec};
 use sp_storage::TrackedStorageKey;
 
diff --git a/substrate/frame/collective/src/lib.rs b/substrate/frame/collective/src/lib.rs
index ac6ad39eac5a..10f989e5c4cc 100644
--- a/substrate/frame/collective/src/lib.rs
+++ b/substrate/frame/collective/src/lib.rs
@@ -45,13 +45,15 @@
 use codec::{Decode, Encode, MaxEncodedLen};
 use scale_info::TypeInfo;
 use sp_io::storage;
-use sp_runtime::{traits::Hash, RuntimeDebug};
+use sp_runtime::{
+	traits::{Dispatchable, Hash},
+	DispatchError, RuntimeDebug,
+};
 use sp_std::{marker::PhantomData, prelude::*, result};
 
 use frame_support::{
 	dispatch::{
-		DispatchError, DispatchResult, DispatchResultWithPostInfo, Dispatchable, GetDispatchInfo,
-		Pays, PostDispatchInfo,
+		DispatchResult, DispatchResultWithPostInfo, GetDispatchInfo, Pays, PostDispatchInfo,
 	},
 	ensure, impl_ensure_origin_with_arg_ignoring_arg,
 	traits::{
diff --git a/substrate/frame/contracts/src/exec.rs b/substrate/frame/contracts/src/exec.rs
index 1ba44220ff8d..38c15a807c5d 100644
--- a/substrate/frame/contracts/src/exec.rs
+++ b/substrate/frame/contracts/src/exec.rs
@@ -25,9 +25,7 @@ use crate::{
 };
 use frame_support::{
 	crypto::ecdsa::ECDSAExt,
-	dispatch::{
-		fmt::Debug, DispatchError, DispatchResult, DispatchResultWithPostInfo, Dispatchable,
-	},
+	dispatch::{DispatchResult, DispatchResultWithPostInfo},
 	ensure,
 	storage::{with_transaction, TransactionOutcome},
 	traits::{
@@ -47,8 +45,11 @@ use sp_core::{
 	Get,
 };
 use sp_io::{crypto::secp256k1_ecdsa_recover_compressed, hashing::blake2_256};
-use sp_runtime::traits::{Convert, Hash, Zero};
-use sp_std::{marker::PhantomData, mem, prelude::*, vec::Vec};
+use sp_runtime::{
+	traits::{Convert, Dispatchable, Hash, Zero},
+	DispatchError,
+};
+use sp_std::{fmt::Debug, marker::PhantomData, mem, prelude::*, vec::Vec};
 
 pub type AccountIdOf<T> = <T as frame_system::Config>::AccountId;
 pub type MomentOf<T> = <<T as Config>::Time as Time>::Moment;
diff --git a/substrate/frame/contracts/src/gas.rs b/substrate/frame/contracts/src/gas.rs
index 7d17642d92e5..363ddfad975b 100644
--- a/substrate/frame/contracts/src/gas.rs
+++ b/substrate/frame/contracts/src/gas.rs
@@ -17,14 +17,12 @@
 
 use crate::{exec::ExecError, Config, Error};
 use frame_support::{
-	dispatch::{
-		DispatchError, DispatchErrorWithPostInfo, DispatchResultWithPostInfo, PostDispatchInfo,
-	},
+	dispatch::{DispatchErrorWithPostInfo, DispatchResultWithPostInfo, PostDispatchInfo},
 	weights::Weight,
 	DefaultNoBound,
 };
 use sp_core::Get;
-use sp_runtime::traits::Zero;
+use sp_runtime::{traits::Zero, DispatchError};
 use sp_std::marker::PhantomData;
 
 #[cfg(test)]
diff --git a/substrate/frame/contracts/src/lib.rs b/substrate/frame/contracts/src/lib.rs
index 2b9dd07b3f6f..e22e4a3f9ff8 100644
--- a/substrate/frame/contracts/src/lib.rs
+++ b/substrate/frame/contracts/src/lib.rs
@@ -111,10 +111,7 @@ use crate::{
 use codec::{Codec, Decode, Encode, HasCompact, MaxEncodedLen};
 use environmental::*;
 use frame_support::{
-	dispatch::{
-		DispatchError, Dispatchable, GetDispatchInfo, Pays, PostDispatchInfo, RawOrigin,
-		WithPostDispatchInfo,
-	},
+	dispatch::{GetDispatchInfo, Pays, PostDispatchInfo, RawOrigin, WithPostDispatchInfo},
 	ensure,
 	error::BadOrigin,
 	traits::{
@@ -137,8 +134,8 @@ use pallet_contracts_primitives::{
 use scale_info::TypeInfo;
 use smallvec::Array;
 use sp_runtime::{
-	traits::{Convert, Hash, Saturating, StaticLookup, Zero},
-	RuntimeDebug,
+	traits::{Convert, Dispatchable, Hash, Saturating, StaticLookup, Zero},
+	DispatchError, RuntimeDebug,
 };
 use sp_std::{fmt::Debug, prelude::*};
 
diff --git a/substrate/frame/contracts/src/migration/v15.rs b/substrate/frame/contracts/src/migration/v15.rs
index efece62905ff..180fe855ca66 100644
--- a/substrate/frame/contracts/src/migration/v15.rs
+++ b/substrate/frame/contracts/src/migration/v15.rs
@@ -28,7 +28,7 @@ use crate::{
 	AccountIdOf, BalanceOf, CodeHash, Config, HoldReason, Pallet, TrieId, Weight, LOG_TARGET,
 };
 #[cfg(feature = "try-runtime")]
-use frame_support::{dispatch::Vec, traits::fungible::InspectHold};
+use frame_support::traits::fungible::InspectHold;
 use frame_support::{
 	pallet_prelude::*,
 	storage_alias,
@@ -43,6 +43,8 @@ use sp_core::hexdisplay::HexDisplay;
 #[cfg(feature = "try-runtime")]
 use sp_runtime::TryRuntimeError;
 use sp_runtime::{traits::Zero, Saturating};
+#[cfg(feature = "try-runtime")]
+use sp_std::vec::Vec;
 
 mod old {
 	use super::*;
diff --git a/substrate/frame/contracts/src/storage.rs b/substrate/frame/contracts/src/storage.rs
index d58fd0fe9dbd..d4d261f4ec1f 100644
--- a/substrate/frame/contracts/src/storage.rs
+++ b/substrate/frame/contracts/src/storage.rs
@@ -27,7 +27,6 @@ use crate::{
 };
 use codec::{Decode, Encode, MaxEncodedLen};
 use frame_support::{
-	dispatch::DispatchError,
 	storage::child::{self, ChildInfo},
 	weights::Weight,
 	CloneNoBound, DefaultNoBound,
@@ -37,7 +36,7 @@ use sp_core::Get;
 use sp_io::KillStorageResult;
 use sp_runtime::{
 	traits::{Hash, Saturating, Zero},
-	BoundedBTreeMap, DispatchResult, RuntimeDebug,
+	BoundedBTreeMap, DispatchError, DispatchResult, RuntimeDebug,
 };
 use sp_std::{marker::PhantomData, prelude::*};
 
diff --git a/substrate/frame/contracts/src/storage/meter.rs b/substrate/frame/contracts/src/storage/meter.rs
index 2a9a083412b0..9f098090bc8b 100644
--- a/substrate/frame/contracts/src/storage/meter.rs
+++ b/substrate/frame/contracts/src/storage/meter.rs
@@ -23,7 +23,6 @@ use crate::{
 };
 
 use frame_support::{
-	dispatch::{fmt::Debug, DispatchError},
 	ensure,
 	traits::{
 		fungible::{Mutate, MutateHold},
@@ -37,9 +36,9 @@ use frame_support::{
 use sp_api::HashT;
 use sp_runtime::{
 	traits::{Saturating, Zero},
-	FixedPointNumber, FixedU128,
+	DispatchError, FixedPointNumber, FixedU128,
 };
-use sp_std::{marker::PhantomData, vec, vec::Vec};
+use sp_std::{fmt::Debug, marker::PhantomData, vec, vec::Vec};
 
 /// Deposit that uses the native fungible's balance type.
 pub type DepositOf<T> = Deposit<BalanceOf<T>>;
diff --git a/substrate/frame/contracts/src/tests.rs b/substrate/frame/contracts/src/tests.rs
index 8cc6d00b3d45..9d03a29b038c 100644
--- a/substrate/frame/contracts/src/tests.rs
+++ b/substrate/frame/contracts/src/tests.rs
@@ -42,7 +42,7 @@ use assert_matches::assert_matches;
 use codec::Encode;
 use frame_support::{
 	assert_err, assert_err_ignore_postinfo, assert_err_with_weight, assert_noop, assert_ok,
-	dispatch::{DispatchError, DispatchErrorWithPostInfo, PostDispatchInfo},
+	dispatch::{DispatchErrorWithPostInfo, PostDispatchInfo},
 	parameter_types,
 	storage::child,
 	traits::{
@@ -61,7 +61,7 @@ use sp_keystore::{testing::MemoryKeystore, KeystoreExt};
 use sp_runtime::{
 	testing::H256,
 	traits::{BlakeTwo256, Convert, Hash, IdentityLookup},
-	AccountId32, BuildStorage, Perbill, TokenError,
+	AccountId32, BuildStorage, DispatchError, Perbill, TokenError,
 };
 
 type Block = frame_system::mocking::MockBlock<Test>;
diff --git a/substrate/frame/contracts/src/wasm/mod.rs b/substrate/frame/contracts/src/wasm/mod.rs
index 291f39f7fa79..5fc65e314ad9 100644
--- a/substrate/frame/contracts/src/wasm/mod.rs
+++ b/substrate/frame/contracts/src/wasm/mod.rs
@@ -42,12 +42,12 @@ use crate::{
 };
 use codec::{Decode, Encode, MaxEncodedLen};
 use frame_support::{
-	dispatch::{DispatchError, DispatchResult},
+	dispatch::DispatchResult,
 	ensure,
 	traits::{fungible::MutateHold, tokens::Precision::BestEffort},
 };
 use sp_core::Get;
-use sp_runtime::RuntimeDebug;
+use sp_runtime::{DispatchError, RuntimeDebug};
 use sp_std::prelude::*;
 use wasmi::{Instance, Linker, Memory, MemoryType, StackLimits, Store};
 
diff --git a/substrate/frame/contracts/src/wasm/runtime.rs b/substrate/frame/contracts/src/wasm/runtime.rs
index ca23ab9fe5dd..4bc00388f726 100644
--- a/substrate/frame/contracts/src/wasm/runtime.rs
+++ b/substrate/frame/contracts/src/wasm/runtime.rs
@@ -26,13 +26,13 @@ use crate::{
 
 use bitflags::bitflags;
 use codec::{Decode, DecodeLimit, Encode, MaxEncodedLen};
-use frame_support::{dispatch::DispatchError, ensure, traits::Get, weights::Weight};
+use frame_support::{ensure, traits::Get, weights::Weight};
 use pallet_contracts_primitives::{ExecReturnValue, ReturnFlags};
 use pallet_contracts_proc_macro::define_env;
 use sp_io::hashing::{blake2_128, blake2_256, keccak_256, sha2_256};
 use sp_runtime::{
 	traits::{Bounded, Zero},
-	RuntimeDebug,
+	DispatchError, RuntimeDebug,
 };
 use sp_std::{fmt, prelude::*};
 use wasmi::{core::HostError, errors::LinkerError, Linker, Memory, Store};
diff --git a/substrate/frame/conviction-voting/src/lib.rs b/substrate/frame/conviction-voting/src/lib.rs
index 9c2993fc5cae..1d6fbaa38694 100644
--- a/substrate/frame/conviction-voting/src/lib.rs
+++ b/substrate/frame/conviction-voting/src/lib.rs
@@ -28,7 +28,7 @@
 #![cfg_attr(not(feature = "std"), no_std)]
 
 use frame_support::{
-	dispatch::{DispatchError, DispatchResult},
+	dispatch::DispatchResult,
 	ensure,
 	traits::{
 		fungible, Currency, Get, LockIdentifier, LockableCurrency, PollStatus, Polling,
@@ -38,7 +38,7 @@ use frame_support::{
 use frame_system::pallet_prelude::BlockNumberFor;
 use sp_runtime::{
 	traits::{AtLeast32BitUnsigned, Saturating, StaticLookup, Zero},
-	ArithmeticError, Perbill,
+	ArithmeticError, DispatchError, Perbill,
 };
 use sp_std::prelude::*;
 
@@ -86,8 +86,15 @@ type ClassOf<T, I = ()> = <<T as Config<I>>::Polls as Polling<TallyOf<T, I>>>::C
 #[frame_support::pallet]
 pub mod pallet {
 	use super::*;
-	use frame_support::{pallet_prelude::*, traits::ClassCountOf};
+	use frame_support::{
+		pallet_prelude::{
+			DispatchResultWithPostInfo, IsType, StorageDoubleMap, StorageMap, ValueQuery,
+		},
+		traits::ClassCountOf,
+		Twox64Concat,
+	};
 	use frame_system::pallet_prelude::*;
+	use sp_runtime::BoundedVec;
 
 	#[pallet::pallet]
 	pub struct Pallet<T, I = ()>(_);
diff --git a/substrate/frame/election-provider-multi-phase/src/unsigned.rs b/substrate/frame/election-provider-multi-phase/src/unsigned.rs
index af8f632f8a9e..f1c9e92a704e 100644
--- a/substrate/frame/election-provider-multi-phase/src/unsigned.rs
+++ b/substrate/frame/election-provider-multi-phase/src/unsigned.rs
@@ -984,12 +984,12 @@ mod tests {
 	};
 	use codec::Decode;
 	use frame_election_provider_support::IndexAssignment;
-	use frame_support::{assert_noop, assert_ok, dispatch::Dispatchable, traits::OffchainWorker};
+	use frame_support::{assert_noop, assert_ok, traits::OffchainWorker};
 	use sp_npos_elections::ElectionScore;
 	use sp_runtime::{
 		bounded_vec,
 		offchain::storage_lock::{BlockAndTime, StorageLock},
-		traits::{ValidateUnsigned, Zero},
+		traits::{Dispatchable, ValidateUnsigned, Zero},
 		ModuleError, PerU16, Perbill,
 	};
 
diff --git a/substrate/frame/election-provider-multi-phase/test-staking-e2e/src/mock.rs b/substrate/frame/election-provider-multi-phase/test-staking-e2e/src/mock.rs
index 9c3511ae3575..8e37d55c0dee 100644
--- a/substrate/frame/election-provider-multi-phase/test-staking-e2e/src/mock.rs
+++ b/substrate/frame/election-provider-multi-phase/test-staking-e2e/src/mock.rs
@@ -18,7 +18,8 @@
 #![allow(dead_code)]
 
 use frame_support::{
-	assert_ok, dispatch::UnfilteredDispatchable, parameter_types, traits, traits::Hooks,
+	assert_ok, parameter_types, traits,
+	traits::{Hooks, UnfilteredDispatchable},
 	weights::constants,
 };
 use frame_system::EnsureRoot;
diff --git a/substrate/frame/lottery/src/lib.rs b/substrate/frame/lottery/src/lib.rs
index c9c025404242..c54f6d76803f 100644
--- a/substrate/frame/lottery/src/lib.rs
+++ b/substrate/frame/lottery/src/lib.rs
@@ -56,7 +56,7 @@ pub mod weights;
 
 use codec::{Decode, Encode};
 use frame_support::{
-	dispatch::{DispatchResult, Dispatchable, GetDispatchInfo},
+	dispatch::{DispatchResult, GetDispatchInfo},
 	ensure,
 	pallet_prelude::MaxEncodedLen,
 	storage::bounded_vec::BoundedVec,
@@ -65,7 +65,7 @@ use frame_support::{
 };
 pub use pallet::*;
 use sp_runtime::{
-	traits::{AccountIdConversion, Saturating, Zero},
+	traits::{AccountIdConversion, Dispatchable, Saturating, Zero},
 	ArithmeticError, DispatchError, RuntimeDebug,
 };
 use sp_std::prelude::*;
diff --git a/substrate/frame/multisig/src/migrations.rs b/substrate/frame/multisig/src/migrations.rs
index 298e73c5d757..3be55080b240 100644
--- a/substrate/frame/multisig/src/migrations.rs
+++ b/substrate/frame/multisig/src/migrations.rs
@@ -19,8 +19,7 @@
 
 use super::*;
 use frame_support::{
-	dispatch::GetStorageVersion,
-	traits::{OnRuntimeUpgrade, WrapperKeepOpaque},
+	traits::{GetStorageVersion, OnRuntimeUpgrade, WrapperKeepOpaque},
 	Identity,
 };
 
diff --git a/substrate/frame/nfts/runtime-api/Cargo.toml b/substrate/frame/nfts/runtime-api/Cargo.toml
index b4485f6c127a..529916036e64 100644
--- a/substrate/frame/nfts/runtime-api/Cargo.toml
+++ b/substrate/frame/nfts/runtime-api/Cargo.toml
@@ -14,10 +14,9 @@ targets = ["x86_64-unknown-linux-gnu"]
 
 [dependencies]
 codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false, features = ["derive"] }
-frame-support = { path = "../../support", default-features = false}
 pallet-nfts = { path = "..", default-features = false}
 sp-api = { path = "../../../primitives/api", default-features = false}
 
 [features]
 default = [ "std" ]
-std = [ "codec/std", "frame-support/std", "pallet-nfts/std", "sp-api/std" ]
+std = [ "codec/std", "pallet-nfts/std", "sp-api/std" ]
diff --git a/substrate/frame/nfts/runtime-api/src/lib.rs b/substrate/frame/nfts/runtime-api/src/lib.rs
index 0c23d178107e..deec6bff8d27 100644
--- a/substrate/frame/nfts/runtime-api/src/lib.rs
+++ b/substrate/frame/nfts/runtime-api/src/lib.rs
@@ -20,7 +20,7 @@
 #![cfg_attr(not(feature = "std"), no_std)]
 
 use codec::{Decode, Encode};
-use frame_support::dispatch::Vec;
+use sp_api::vec::Vec;
 
 sp_api::decl_runtime_apis! {
 	pub trait NftsApi<AccountId, CollectionId, ItemId>
diff --git a/substrate/frame/nfts/src/benchmarking.rs b/substrate/frame/nfts/src/benchmarking.rs
index 995c84203674..8792af675fc1 100644
--- a/substrate/frame/nfts/src/benchmarking.rs
+++ b/substrate/frame/nfts/src/benchmarking.rs
@@ -26,8 +26,7 @@ use frame_benchmarking::v1::{
 };
 use frame_support::{
 	assert_ok,
-	dispatch::UnfilteredDispatchable,
-	traits::{EnsureOrigin, Get},
+	traits::{EnsureOrigin, Get, UnfilteredDispatchable},
 	BoundedVec,
 };
 use frame_system::{pallet_prelude::BlockNumberFor, RawOrigin as SystemOrigin};
diff --git a/substrate/frame/nfts/src/tests.rs b/substrate/frame/nfts/src/tests.rs
index f7879570a4cb..6e264048f11a 100644
--- a/substrate/frame/nfts/src/tests.rs
+++ b/substrate/frame/nfts/src/tests.rs
@@ -21,7 +21,6 @@ use crate::{mock::*, Event, *};
 use enumflags2::BitFlags;
 use frame_support::{
 	assert_noop, assert_ok,
-	dispatch::Dispatchable,
 	traits::{
 		tokens::nonfungibles_v2::{Create, Destroy, Mutate},
 		Currency, Get,
@@ -29,7 +28,10 @@ use frame_support::{
 };
 use pallet_balances::Error as BalancesError;
 use sp_core::{bounded::BoundedVec, Pair};
-use sp_runtime::{traits::IdentifyAccount, MultiSignature, MultiSigner};
+use sp_runtime::{
+	traits::{Dispatchable, IdentifyAccount},
+	MultiSignature, MultiSigner,
+};
 use sp_std::prelude::*;
 
 type AccountIdOf<Test> = <Test as frame_system::Config>::AccountId;
diff --git a/substrate/frame/offences/src/migration.rs b/substrate/frame/offences/src/migration.rs
index 3c0d243a55d9..3b5cf3ce9269 100644
--- a/substrate/frame/offences/src/migration.rs
+++ b/substrate/frame/offences/src/migration.rs
@@ -17,10 +17,9 @@
 
 use super::{Config, Kind, OffenceDetails, Pallet, Perbill, SessionIndex, LOG_TARGET};
 use frame_support::{
-	dispatch::GetStorageVersion,
 	pallet_prelude::ValueQuery,
 	storage_alias,
-	traits::{Get, OnRuntimeUpgrade},
+	traits::{Get, GetStorageVersion, OnRuntimeUpgrade},
 	weights::Weight,
 	Twox64Concat,
 };
diff --git a/substrate/frame/proxy/src/lib.rs b/substrate/frame/proxy/src/lib.rs
index 586d52fb62bd..4d4da0433afa 100644
--- a/substrate/frame/proxy/src/lib.rs
+++ b/substrate/frame/proxy/src/lib.rs
@@ -35,7 +35,7 @@ pub mod weights;
 
 use codec::{Decode, Encode, MaxEncodedLen};
 use frame_support::{
-	dispatch::{DispatchError, GetDispatchInfo},
+	dispatch::GetDispatchInfo,
 	ensure,
 	traits::{Currency, Get, InstanceFilter, IsSubType, IsType, OriginTrait, ReservableCurrency},
 };
@@ -45,7 +45,7 @@ use scale_info::TypeInfo;
 use sp_io::hashing::blake2_256;
 use sp_runtime::{
 	traits::{Dispatchable, Hash, Saturating, StaticLookup, TrailingZeroInput, Zero},
-	DispatchResult, RuntimeDebug,
+	DispatchError, DispatchResult, RuntimeDebug,
 };
 use sp_std::prelude::*;
 pub use weights::WeightInfo;
diff --git a/substrate/frame/proxy/src/tests.rs b/substrate/frame/proxy/src/tests.rs
index 48a2a4ed0cc3..0667be6e1e52 100644
--- a/substrate/frame/proxy/src/tests.rs
+++ b/substrate/frame/proxy/src/tests.rs
@@ -25,11 +25,10 @@ use crate as proxy;
 use codec::{Decode, Encode};
 use frame_support::{
 	assert_noop, assert_ok, derive_impl,
-	dispatch::DispatchError,
 	traits::{ConstU32, ConstU64, Contains},
 };
 use sp_core::H256;
-use sp_runtime::{traits::BlakeTwo256, BuildStorage, RuntimeDebug};
+use sp_runtime::{traits::BlakeTwo256, BuildStorage, DispatchError, RuntimeDebug};
 
 type Block = frame_system::mocking::MockBlock<Test>;
 
diff --git a/substrate/frame/ranked-collective/src/benchmarking.rs b/substrate/frame/ranked-collective/src/benchmarking.rs
index b610d10009a0..518428880e4d 100644
--- a/substrate/frame/ranked-collective/src/benchmarking.rs
+++ b/substrate/frame/ranked-collective/src/benchmarking.rs
@@ -24,7 +24,7 @@ use crate::Pallet as RankedCollective;
 use frame_benchmarking::v1::{
 	account, benchmarks_instance_pallet, whitelisted_caller, BenchmarkError,
 };
-use frame_support::{assert_ok, dispatch::UnfilteredDispatchable};
+use frame_support::{assert_ok, traits::UnfilteredDispatchable};
 use frame_system::RawOrigin as SystemOrigin;
 
 const SEED: u32 = 0;
diff --git a/substrate/frame/ranked-collective/src/lib.rs b/substrate/frame/ranked-collective/src/lib.rs
index d94932a1dac7..deb1ccf23578 100644
--- a/substrate/frame/ranked-collective/src/lib.rs
+++ b/substrate/frame/ranked-collective/src/lib.rs
@@ -47,12 +47,12 @@ use sp_arithmetic::traits::Saturating;
 use sp_runtime::{
 	traits::{Convert, StaticLookup},
 	ArithmeticError::Overflow,
-	Perbill, RuntimeDebug,
+	DispatchError, Perbill, RuntimeDebug,
 };
 use sp_std::{marker::PhantomData, prelude::*};
 
 use frame_support::{
-	dispatch::{DispatchError, DispatchResultWithPostInfo, PostDispatchInfo},
+	dispatch::{DispatchResultWithPostInfo, PostDispatchInfo},
 	ensure, impl_ensure_origin_with_arg_ignoring_arg,
 	traits::{EnsureOrigin, EnsureOriginWithArg, PollStatus, Polling, RankedMembers, VoteTally},
 	CloneNoBound, EqNoBound, PartialEqNoBound, RuntimeDebugNoBound,
diff --git a/substrate/frame/referenda/src/benchmarking.rs b/substrate/frame/referenda/src/benchmarking.rs
index 78d14bd99d2e..e884a0bb6ec9 100644
--- a/substrate/frame/referenda/src/benchmarking.rs
+++ b/substrate/frame/referenda/src/benchmarking.rs
@@ -25,8 +25,7 @@ use frame_benchmarking::v1::{
 };
 use frame_support::{
 	assert_ok,
-	dispatch::UnfilteredDispatchable,
-	traits::{Bounded, Currency, EnsureOrigin, EnsureOriginWithArg},
+	traits::{Bounded, Currency, EnsureOrigin, EnsureOriginWithArg, UnfilteredDispatchable},
 };
 use frame_system::RawOrigin;
 use sp_runtime::traits::Bounded as ArithBounded;
diff --git a/substrate/frame/referenda/src/tests.rs b/substrate/frame/referenda/src/tests.rs
index c7469946c2da..d748c524605a 100644
--- a/substrate/frame/referenda/src/tests.rs
+++ b/substrate/frame/referenda/src/tests.rs
@@ -21,12 +21,9 @@ use super::*;
 use crate::mock::{RefState::*, *};
 use assert_matches::assert_matches;
 use codec::Decode;
-use frame_support::{
-	assert_noop, assert_ok,
-	dispatch::{DispatchError::BadOrigin, RawOrigin},
-	traits::Contains,
-};
+use frame_support::{assert_noop, assert_ok, dispatch::RawOrigin, traits::Contains};
 use pallet_balances::Error as BalancesError;
+use sp_runtime::DispatchError::BadOrigin;
 
 #[test]
 fn params_should_work() {
diff --git a/substrate/frame/scheduler/src/lib.rs b/substrate/frame/scheduler/src/lib.rs
index 3538331bbd4c..14b51839dec9 100644
--- a/substrate/frame/scheduler/src/lib.rs
+++ b/substrate/frame/scheduler/src/lib.rs
@@ -87,9 +87,7 @@ pub mod weights;
 
 use codec::{Decode, Encode, MaxEncodedLen};
 use frame_support::{
-	dispatch::{
-		DispatchError, DispatchResult, Dispatchable, GetDispatchInfo, Parameter, RawOrigin,
-	},
+	dispatch::{DispatchResult, GetDispatchInfo, Parameter, RawOrigin},
 	ensure,
 	traits::{
 		schedule::{self, DispatchTime, MaybeHashed},
@@ -105,8 +103,8 @@ use frame_system::{
 use scale_info::TypeInfo;
 use sp_io::hashing::blake2_256;
 use sp_runtime::{
-	traits::{BadOrigin, One, Saturating, Zero},
-	BoundedVec, RuntimeDebug,
+	traits::{BadOrigin, Dispatchable, One, Saturating, Zero},
+	BoundedVec, DispatchError, RuntimeDebug,
 };
 use sp_std::{borrow::Borrow, cmp::Ordering, marker::PhantomData, prelude::*};
 
diff --git a/substrate/frame/session/src/lib.rs b/substrate/frame/session/src/lib.rs
index 1c0093c1df64..bf4671a247f0 100644
--- a/substrate/frame/session/src/lib.rs
+++ b/substrate/frame/session/src/lib.rs
@@ -117,7 +117,7 @@ pub mod weights;
 
 use codec::{Decode, MaxEncodedLen};
 use frame_support::{
-	dispatch::{DispatchError, DispatchResult},
+	dispatch::DispatchResult,
 	ensure,
 	traits::{
 		EstimateNextNewSession, EstimateNextSessionRotation, FindAuthor, Get, OneSessionHandler,
@@ -129,7 +129,7 @@ use frame_support::{
 use frame_system::pallet_prelude::BlockNumberFor;
 use sp_runtime::{
 	traits::{AtLeast32BitUnsigned, Convert, Member, One, OpaqueKeys, Zero},
-	ConsensusEngineId, KeyTypeId, Permill, RuntimeAppPublic,
+	ConsensusEngineId, DispatchError, KeyTypeId, Permill, RuntimeAppPublic,
 };
 use sp_staking::SessionIndex;
 use sp_std::{
diff --git a/substrate/frame/staking/src/benchmarking.rs b/substrate/frame/staking/src/benchmarking.rs
index e72a9baf044f..ce5c35524c74 100644
--- a/substrate/frame/staking/src/benchmarking.rs
+++ b/substrate/frame/staking/src/benchmarking.rs
@@ -24,9 +24,8 @@ use testing_utils::*;
 use codec::Decode;
 use frame_election_provider_support::{bounds::DataProviderBounds, SortedListProvider};
 use frame_support::{
-	dispatch::UnfilteredDispatchable,
 	pallet_prelude::*,
-	traits::{Currency, Get, Imbalance},
+	traits::{Currency, Get, Imbalance, UnfilteredDispatchable},
 };
 use sp_runtime::{
 	traits::{Bounded, One, StaticLookup, TrailingZeroInput, Zero},
diff --git a/substrate/frame/staking/src/migrations.rs b/substrate/frame/staking/src/migrations.rs
index 332da506f01e..89520028b901 100644
--- a/substrate/frame/staking/src/migrations.rs
+++ b/substrate/frame/staking/src/migrations.rs
@@ -19,8 +19,9 @@
 use super::*;
 use frame_election_provider_support::SortedListProvider;
 use frame_support::{
-	dispatch::GetStorageVersion, pallet_prelude::ValueQuery, storage_alias,
-	traits::OnRuntimeUpgrade,
+	pallet_prelude::ValueQuery,
+	storage_alias,
+	traits::{GetStorageVersion, OnRuntimeUpgrade},
 };
 
 #[cfg(feature = "try-runtime")]
diff --git a/substrate/frame/staking/src/pallet/mod.rs b/substrate/frame/staking/src/pallet/mod.rs
index 40a2f5cf73eb..c6c75326b80c 100644
--- a/substrate/frame/staking/src/pallet/mod.rs
+++ b/substrate/frame/staking/src/pallet/mod.rs
@@ -17,11 +17,11 @@
 
 //! Staking FRAME Pallet.
 
+use codec::Codec;
 use frame_election_provider_support::{
 	ElectionProvider, ElectionProviderBase, SortedListProvider, VoteWeight,
 };
 use frame_support::{
-	dispatch::Codec,
 	pallet_prelude::*,
 	traits::{
 		Currency, Defensive, DefensiveResult, DefensiveSaturating, EnsureOrigin,
diff --git a/substrate/frame/state-trie-migration/src/lib.rs b/substrate/frame/state-trie-migration/src/lib.rs
index e22a47458b7d..3e69b219bb52 100644
--- a/substrate/frame/state-trie-migration/src/lib.rs
+++ b/substrate/frame/state-trie-migration/src/lib.rs
@@ -1268,7 +1268,6 @@ mod mock {
 #[cfg(test)]
 mod test {
 	use super::{mock::*, *};
-	use frame_support::dispatch::*;
 	use sp_runtime::{bounded_vec, traits::Bounded, StateVersion};
 
 	#[test]
diff --git a/substrate/frame/support/procedural/src/construct_runtime/expand/call.rs b/substrate/frame/support/procedural/src/construct_runtime/expand/call.rs
index cbf2ea907853..b8741034f0fe 100644
--- a/substrate/frame/support/procedural/src/construct_runtime/expand/call.rs
+++ b/substrate/frame/support/procedural/src/construct_runtime/expand/call.rs
@@ -124,16 +124,16 @@ pub fn expand_outer_dispatch(
 			}
 		}
 
-		impl #scrate::dispatch::GetCallMetadata for RuntimeCall {
-			fn get_call_metadata(&self) -> #scrate::dispatch::CallMetadata {
-				use #scrate::dispatch::GetCallName;
+		impl #scrate::traits::GetCallMetadata for RuntimeCall {
+			fn get_call_metadata(&self) -> #scrate::traits::CallMetadata {
+				use #scrate::traits::GetCallName;
 				match self {
 					#(
 						#pallet_attrs
 						#variant_patterns => {
 							let function_name = call.get_call_name();
 							let pallet_name = stringify!(#pallet_names);
-							#scrate::dispatch::CallMetadata { function_name, pallet_name }
+							#scrate::traits::CallMetadata { function_name, pallet_name }
 						}
 					)*
 				}
@@ -147,7 +147,7 @@ pub fn expand_outer_dispatch(
 			}
 
 			fn get_call_names(module: &str) -> &'static [&'static str] {
-				use #scrate::dispatch::{Callable, GetCallName};
+				use #scrate::{dispatch::Callable, traits::GetCallName};
 				match module {
 					#(
 						#pallet_attrs
@@ -159,7 +159,7 @@ pub fn expand_outer_dispatch(
 				}
 			}
 		}
-		impl #scrate::dispatch::Dispatchable for RuntimeCall {
+		impl #scrate::dispatch::__private::Dispatchable for RuntimeCall {
 			type RuntimeOrigin = RuntimeOrigin;
 			type Config = RuntimeCall;
 			type Info = #scrate::dispatch::DispatchInfo;
diff --git a/substrate/frame/support/procedural/src/pallet/expand/call.rs b/substrate/frame/support/procedural/src/pallet/expand/call.rs
index 6489949ed5c3..3ed5509863e9 100644
--- a/substrate/frame/support/procedural/src/pallet/expand/call.rs
+++ b/substrate/frame/support/procedural/src/pallet/expand/call.rs
@@ -351,7 +351,7 @@ pub fn expand_call(def: &mut Def) -> proc_macro2::TokenStream {
 			}
 		}
 
-		impl<#type_impl_gen> #frame_support::dispatch::GetCallName for #call_ident<#type_use_gen>
+		impl<#type_impl_gen> #frame_support::traits::GetCallName for #call_ident<#type_use_gen>
 			#where_clause
 		{
 			fn get_call_name(&self) -> &'static str {
@@ -366,7 +366,7 @@ pub fn expand_call(def: &mut Def) -> proc_macro2::TokenStream {
 			}
 		}
 
-		impl<#type_impl_gen> #frame_support::dispatch::GetCallIndex for #call_ident<#type_use_gen>
+		impl<#type_impl_gen> #frame_support::traits::GetCallIndex for #call_ident<#type_use_gen>
 			#where_clause
 		{
 			fn get_call_index(&self) -> u8 {
diff --git a/substrate/frame/support/src/dispatch.rs b/substrate/frame/support/src/dispatch.rs
index 0388a9adb394..130aa429ea60 100644
--- a/substrate/frame/support/src/dispatch.rs
+++ b/substrate/frame/support/src/dispatch.rs
@@ -18,30 +18,26 @@
 //! Dispatch system. Contains a macro for defining runtime modules and
 //! generating values representing lazy module function calls.
 
-pub use crate::traits::{
-	CallMetadata, GetCallIndex, GetCallMetadata, GetCallName, GetStorageVersion,
-	UnfilteredDispatchable,
-};
-pub use codec::{
-	Codec, Decode, Encode, EncodeAsRef, EncodeLike, HasCompact, Input, MaxEncodedLen, Output,
-};
-pub use scale_info::TypeInfo;
-pub use sp_runtime::{
-	traits::Dispatchable, transaction_validity::TransactionPriority, DispatchError, RuntimeDebug,
-};
-pub use sp_std::{
-	fmt, marker,
-	prelude::{Clone, Eq, PartialEq, Vec},
-	result,
-};
-pub use sp_weights::Weight;
-
+use crate::traits::UnfilteredDispatchable;
+use codec::{Codec, Decode, Encode, EncodeLike, MaxEncodedLen};
+use scale_info::TypeInfo;
 #[cfg(feature = "std")]
 use serde::{Deserialize, Serialize};
 use sp_runtime::{
 	generic::{CheckedExtrinsic, UncheckedExtrinsic},
 	traits::SignedExtension,
+	DispatchError, RuntimeDebug,
 };
+use sp_std::fmt;
+use sp_weights::Weight;
+
+/// Private exports that are being used by macros.
+///
+/// The exports are not stable and should not be relied on.
+#[doc(hidden)]
+pub mod __private {
+	pub use sp_runtime::traits::Dispatchable;
+}
 
 /// The return type of a `Dispatchable` in frame. When returned explicitly from
 /// a dispatchable function it allows overriding the default `PostDispatchInfo`
diff --git a/substrate/frame/support/src/dispatch_context.rs b/substrate/frame/support/src/dispatch_context.rs
index 31278ea9f819..608187b72206 100644
--- a/substrate/frame/support/src/dispatch_context.rs
+++ b/substrate/frame/support/src/dispatch_context.rs
@@ -26,11 +26,11 @@
 //!
 //! # FRAME integration
 //!
-//! The FRAME macros implement [`UnfilteredDispatchable`](crate::traits::UnfilteredDispatchable) for
-//! each pallet `Call` enum. Part of this implementation is the call to [`run_in_context`], so that
-//! each call to
+//! The FRAME macros implement
+//! [`UnfilteredDispatchable`](frame_support::traits::UnfilteredDispatchable) for each pallet `Call`
+//! enum. Part of this implementation is the call to [`run_in_context`], so that each call to
 //! [`UnfilteredDispatchable::dispatch_bypass_filter`](crate::traits::UnfilteredDispatchable::dispatch_bypass_filter)
-//! or [`Dispatchable::dispatch`](crate::dispatch::Dispatchable::dispatch) will run in a dispatch
+//! or [`Dispatchable::dispatch`](sp_runtime::traits::Dispatchable::dispatch) will run in a dispatch
 //! context.
 //!
 //! # Example
diff --git a/substrate/frame/support/src/lib.rs b/substrate/frame/support/src/lib.rs
index a2a7e5ebc485..52d94cebaffb 100644
--- a/substrate/frame/support/src/lib.rs
+++ b/substrate/frame/support/src/lib.rs
@@ -806,10 +806,7 @@ pub mod testing_prelude {
 /// Prelude to be used alongside pallet macro, for ease of use.
 pub mod pallet_prelude {
 	pub use crate::{
-		dispatch::{
-			DispatchClass, DispatchError, DispatchResult, DispatchResultWithPostInfo, Parameter,
-			Pays,
-		},
+		dispatch::{DispatchClass, DispatchResult, DispatchResultWithPostInfo, Parameter, Pays},
 		ensure,
 		inherent::{InherentData, InherentIdentifier, ProvideInherent},
 		storage,
@@ -855,7 +852,7 @@ pub mod pallet_prelude {
 			TransactionTag, TransactionValidity, TransactionValidityError, UnknownTransaction,
 			ValidTransaction,
 		},
-		RuntimeDebug, MAX_MODULE_ERROR_ENCODED_SIZE,
+		DispatchError, RuntimeDebug, MAX_MODULE_ERROR_ENCODED_SIZE,
 	};
 	pub use sp_std::marker::PhantomData;
 	pub use sp_weights::Weight;
diff --git a/substrate/frame/support/src/traits/tokens/currency.rs b/substrate/frame/support/src/traits/tokens/currency.rs
index e6a7284a74b7..0030e1261dac 100644
--- a/substrate/frame/support/src/traits/tokens/currency.rs
+++ b/substrate/frame/support/src/traits/tokens/currency.rs
@@ -21,11 +21,8 @@ use super::{
 	imbalance::{Imbalance, SignedImbalance},
 	misc::{Balance, ExistenceRequirement, WithdrawReasons},
 };
-use crate::{
-	dispatch::{DispatchError, DispatchResult},
-	traits::Get,
-};
-use sp_runtime::traits::MaybeSerializeDeserialize;
+use crate::{dispatch::DispatchResult, traits::Get};
+use sp_runtime::{traits::MaybeSerializeDeserialize, DispatchError};
 
 mod reservable;
 pub use reservable::{NamedReservableCurrency, ReservableCurrency};
diff --git a/substrate/frame/support/src/traits/tokens/currency/reservable.rs b/substrate/frame/support/src/traits/tokens/currency/reservable.rs
index 79129cecdd69..ff8b0c6eea83 100644
--- a/substrate/frame/support/src/traits/tokens/currency/reservable.rs
+++ b/substrate/frame/support/src/traits/tokens/currency/reservable.rs
@@ -22,9 +22,10 @@ use sp_core::Get;
 
 use super::{super::misc::BalanceStatus, Currency};
 use crate::{
-	dispatch::{DispatchError, DispatchResult},
+	dispatch::DispatchResult,
 	traits::{ExistenceRequirement, SignedImbalance, WithdrawReasons},
 };
+use sp_runtime::DispatchError;
 
 /// A currency where funds can be reserved from the user.
 pub trait ReservableCurrency<AccountId>: Currency<AccountId> {
diff --git a/substrate/frame/support/src/traits/tokens/fungible/regular.rs b/substrate/frame/support/src/traits/tokens/fungible/regular.rs
index 2838bed540aa..c3f621b914f8 100644
--- a/substrate/frame/support/src/traits/tokens/fungible/regular.rs
+++ b/substrate/frame/support/src/traits/tokens/fungible/regular.rs
@@ -18,7 +18,6 @@
 //! `Inspect` and `Mutate` traits for working with regular balances.
 
 use crate::{
-	dispatch::DispatchError,
 	ensure,
 	traits::{
 		tokens::{
@@ -36,7 +35,7 @@ use crate::{
 	},
 };
 use sp_arithmetic::traits::{CheckedAdd, CheckedSub, One};
-use sp_runtime::{traits::Saturating, ArithmeticError, TokenError};
+use sp_runtime::{traits::Saturating, ArithmeticError, DispatchError, TokenError};
 use sp_std::marker::PhantomData;
 
 use super::{Credit, Debt, HandleImbalanceDrop, Imbalance};
diff --git a/substrate/frame/support/src/traits/tokens/fungibles/regular.rs b/substrate/frame/support/src/traits/tokens/fungibles/regular.rs
index b6cea15284d3..b027aee2f7d4 100644
--- a/substrate/frame/support/src/traits/tokens/fungibles/regular.rs
+++ b/substrate/frame/support/src/traits/tokens/fungibles/regular.rs
@@ -20,7 +20,6 @@
 use sp_std::marker::PhantomData;
 
 use crate::{
-	dispatch::DispatchError,
 	ensure,
 	traits::{
 		tokens::{
@@ -38,7 +37,7 @@ use crate::{
 	},
 };
 use sp_arithmetic::traits::{CheckedAdd, CheckedSub, One};
-use sp_runtime::{traits::Saturating, ArithmeticError, TokenError};
+use sp_runtime::{traits::Saturating, ArithmeticError, DispatchError, TokenError};
 
 use super::{Credit, Debt, HandleImbalanceDrop, Imbalance};
 
diff --git a/substrate/frame/support/src/traits/tokens/nonfungibles.rs b/substrate/frame/support/src/traits/tokens/nonfungibles.rs
index e9538d14f547..615e79c29c85 100644
--- a/substrate/frame/support/src/traits/tokens/nonfungibles.rs
+++ b/substrate/frame/support/src/traits/tokens/nonfungibles.rs
@@ -27,9 +27,9 @@
 //! Implementations of these traits may be converted to implementations of corresponding
 //! `nonfungible` traits by using the `nonfungible::ItemOf` type adapter.
 
-use crate::dispatch::{DispatchError, DispatchResult};
+use crate::dispatch::DispatchResult;
 use codec::{Decode, Encode};
-use sp_runtime::TokenError;
+use sp_runtime::{DispatchError, TokenError};
 use sp_std::prelude::*;
 
 /// Trait for providing an interface to many read-only NFT-like sets of items.
diff --git a/substrate/frame/support/src/traits/tokens/nonfungibles_v2.rs b/substrate/frame/support/src/traits/tokens/nonfungibles_v2.rs
index 345cce237b67..ec064bdebf62 100644
--- a/substrate/frame/support/src/traits/tokens/nonfungibles_v2.rs
+++ b/substrate/frame/support/src/traits/tokens/nonfungibles_v2.rs
@@ -27,9 +27,9 @@
 //! Implementations of these traits may be converted to implementations of corresponding
 //! `nonfungible` traits by using the `nonfungible::ItemOf` type adapter.
 
-use crate::dispatch::{DispatchError, DispatchResult, Parameter};
+use crate::dispatch::{DispatchResult, Parameter};
 use codec::{Decode, Encode};
-use sp_runtime::TokenError;
+use sp_runtime::{DispatchError, TokenError};
 use sp_std::prelude::*;
 
 /// Trait for providing an interface to many read-only NFT-like sets of items.
diff --git a/substrate/frame/support/src/traits/voting.rs b/substrate/frame/support/src/traits/voting.rs
index 4201b8d48d15..f5c9e285ef3a 100644
--- a/substrate/frame/support/src/traits/voting.rs
+++ b/substrate/frame/support/src/traits/voting.rs
@@ -18,10 +18,10 @@
 //! Traits and associated data structures concerned with voting, and moving between tokens and
 //! votes.
 
-use crate::dispatch::{DispatchError, Parameter};
+use crate::dispatch::Parameter;
 use codec::{HasCompact, MaxEncodedLen};
 use sp_arithmetic::Perbill;
-use sp_runtime::traits::Member;
+use sp_runtime::{traits::Member, DispatchError};
 use sp_std::prelude::*;
 
 pub trait VoteTally<Votes, Class> {
diff --git a/substrate/frame/support/test/tests/construct_runtime.rs b/substrate/frame/support/test/tests/construct_runtime.rs
index a14276fa4d2f..9ad51ad530eb 100644
--- a/substrate/frame/support/test/tests/construct_runtime.rs
+++ b/substrate/frame/support/test/tests/construct_runtime.rs
@@ -578,14 +578,14 @@ fn call_weight_should_attach_to_call_enum() {
 
 #[test]
 fn call_name() {
-	use frame_support::dispatch::GetCallName;
+	use frame_support::traits::GetCallName;
 	let name = module3::Call::<Runtime>::aux_4 {}.get_call_name();
 	assert_eq!("aux_4", name);
 }
 
 #[test]
 fn call_metadata() {
-	use frame_support::dispatch::{CallMetadata, GetCallMetadata};
+	use frame_support::traits::{CallMetadata, GetCallMetadata};
 	let call = RuntimeCall::Module3(module3::Call::<Runtime>::aux_4 {});
 	let metadata = call.get_call_metadata();
 	let expected = CallMetadata { function_name: "aux_4".into(), pallet_name: "Module3".into() };
@@ -594,14 +594,14 @@ fn call_metadata() {
 
 #[test]
 fn get_call_names() {
-	use frame_support::dispatch::GetCallName;
+	use frame_support::traits::GetCallName;
 	let call_names = module3::Call::<Runtime>::get_call_names();
 	assert_eq!(["fail", "aux_1", "aux_2", "aux_3", "aux_4", "operational"], call_names);
 }
 
 #[test]
 fn get_module_names() {
-	use frame_support::dispatch::GetCallMetadata;
+	use frame_support::traits::GetCallMetadata;
 	let module_names = RuntimeCall::get_module_names();
 	assert_eq!(
 		[
diff --git a/substrate/frame/transaction-storage/src/lib.rs b/substrate/frame/transaction-storage/src/lib.rs
index e784d20a0cfd..753f5ca0c7b5 100644
--- a/substrate/frame/transaction-storage/src/lib.rs
+++ b/substrate/frame/transaction-storage/src/lib.rs
@@ -30,10 +30,10 @@ mod tests;
 
 use codec::{Decode, Encode, MaxEncodedLen};
 use frame_support::{
-	dispatch::{Dispatchable, GetDispatchInfo},
+	dispatch::GetDispatchInfo,
 	traits::{Currency, OnUnbalanced, ReservableCurrency},
 };
-use sp_runtime::traits::{BlakeTwo256, Hash, One, Saturating, Zero};
+use sp_runtime::traits::{BlakeTwo256, Dispatchable, Hash, One, Saturating, Zero};
 use sp_std::{prelude::*, result};
 use sp_transaction_storage_proof::{
 	encode_index, random_chunk, InherentError, TransactionStorageProof, CHUNK_SIZE,
diff --git a/substrate/frame/treasury/src/benchmarking.rs b/substrate/frame/treasury/src/benchmarking.rs
index b8a53e06f209..24c290ddb665 100644
--- a/substrate/frame/treasury/src/benchmarking.rs
+++ b/substrate/frame/treasury/src/benchmarking.rs
@@ -23,9 +23,8 @@ use super::{Pallet as Treasury, *};
 
 use frame_benchmarking::v1::{account, benchmarks_instance_pallet, BenchmarkError};
 use frame_support::{
-	dispatch::UnfilteredDispatchable,
 	ensure,
-	traits::{EnsureOrigin, OnInitialize},
+	traits::{EnsureOrigin, OnInitialize, UnfilteredDispatchable},
 };
 use frame_system::RawOrigin;
 
diff --git a/substrate/frame/uniques/src/benchmarking.rs b/substrate/frame/uniques/src/benchmarking.rs
index 4e63f69281e5..821ca1794b86 100644
--- a/substrate/frame/uniques/src/benchmarking.rs
+++ b/substrate/frame/uniques/src/benchmarking.rs
@@ -24,8 +24,7 @@ use frame_benchmarking::v1::{
 	account, benchmarks_instance_pallet, whitelist_account, whitelisted_caller, BenchmarkError,
 };
 use frame_support::{
-	dispatch::UnfilteredDispatchable,
-	traits::{EnsureOrigin, Get},
+	traits::{EnsureOrigin, Get, UnfilteredDispatchable},
 	BoundedVec,
 };
 use frame_system::RawOrigin as SystemOrigin;
diff --git a/substrate/frame/uniques/src/tests.rs b/substrate/frame/uniques/src/tests.rs
index 993552c3a2aa..52f7df3b5efb 100644
--- a/substrate/frame/uniques/src/tests.rs
+++ b/substrate/frame/uniques/src/tests.rs
@@ -18,8 +18,9 @@
 //! Tests for Uniques pallet.
 
 use crate::{mock::*, Event, *};
-use frame_support::{assert_noop, assert_ok, dispatch::Dispatchable, traits::Currency};
+use frame_support::{assert_noop, assert_ok, traits::Currency};
 use pallet_balances::Error as BalancesError;
+use sp_runtime::traits::Dispatchable;
 use sp_std::prelude::*;
 
 fn items() -> Vec<(u64, u32, u32)> {
diff --git a/substrate/frame/utility/src/tests.rs b/substrate/frame/utility/src/tests.rs
index c2fd3a851c31..183853c4e8ac 100644
--- a/substrate/frame/utility/src/tests.rs
+++ b/substrate/frame/utility/src/tests.rs
@@ -24,7 +24,7 @@ use super::*;
 use crate as utility;
 use frame_support::{
 	assert_err_ignore_postinfo, assert_noop, assert_ok,
-	dispatch::{DispatchError, DispatchErrorWithPostInfo, Dispatchable, Pays},
+	dispatch::{DispatchErrorWithPostInfo, Pays},
 	error::BadOrigin,
 	parameter_types, storage,
 	traits::{ConstU32, ConstU64, Contains},
@@ -33,8 +33,8 @@ use frame_support::{
 use pallet_collective::{EnsureProportionAtLeast, Instance1};
 use sp_core::H256;
 use sp_runtime::{
-	traits::{BlakeTwo256, Hash, IdentityLookup},
-	BuildStorage, TokenError,
+	traits::{BlakeTwo256, Dispatchable, Hash, IdentityLookup},
+	BuildStorage, DispatchError, TokenError,
 };
 
 type BlockNumber = u64;
diff --git a/substrate/frame/vesting/src/lib.rs b/substrate/frame/vesting/src/lib.rs
index eb829121e979..ee67a038e4d7 100644
--- a/substrate/frame/vesting/src/lib.rs
+++ b/substrate/frame/vesting/src/lib.rs
@@ -58,7 +58,7 @@ pub mod weights;
 
 use codec::{Decode, Encode, MaxEncodedLen};
 use frame_support::{
-	dispatch::{DispatchError, DispatchResult},
+	dispatch::DispatchResult,
 	ensure,
 	storage::bounded_vec::BoundedVec,
 	traits::{
@@ -74,7 +74,7 @@ use sp_runtime::{
 		AtLeast32BitUnsigned, Bounded, Convert, MaybeSerializeDeserialize, One, Saturating,
 		StaticLookup, Zero,
 	},
-	RuntimeDebug,
+	DispatchError, RuntimeDebug,
 };
 use sp_std::{fmt::Debug, marker::PhantomData, prelude::*};
 
diff --git a/substrate/frame/vesting/src/tests.rs b/substrate/frame/vesting/src/tests.rs
index 46afe895f6fc..c35686bd5146 100644
--- a/substrate/frame/vesting/src/tests.rs
+++ b/substrate/frame/vesting/src/tests.rs
@@ -15,7 +15,8 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-use frame_support::{assert_noop, assert_ok, assert_storage_noop, dispatch::EncodeLike};
+use codec::EncodeLike;
+use frame_support::{assert_noop, assert_ok, assert_storage_noop};
 use frame_system::RawOrigin;
 use sp_runtime::{
 	traits::{BadOrigin, Identity},

From 82673e43be9ac82f76e34c6eff7b94d136e67dce Mon Sep 17 00:00:00 2001
From: Juan Girini <juangirini@gmail.com>
Date: Fri, 25 Aug 2023 15:51:14 +0200
Subject: [PATCH 2/6] moved Dispatchable to lib.rs

---
 .../procedural/src/construct_runtime/expand/call.rs       | 2 +-
 substrate/frame/support/src/dispatch.rs                   | 8 --------
 substrate/frame/support/src/lib.rs                        | 2 +-
 3 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/substrate/frame/support/procedural/src/construct_runtime/expand/call.rs b/substrate/frame/support/procedural/src/construct_runtime/expand/call.rs
index b8741034f0fe..859b9a327e48 100644
--- a/substrate/frame/support/procedural/src/construct_runtime/expand/call.rs
+++ b/substrate/frame/support/procedural/src/construct_runtime/expand/call.rs
@@ -159,7 +159,7 @@ pub fn expand_outer_dispatch(
 				}
 			}
 		}
-		impl #scrate::dispatch::__private::Dispatchable for RuntimeCall {
+		impl #scrate::__private::Dispatchable for RuntimeCall {
 			type RuntimeOrigin = RuntimeOrigin;
 			type Config = RuntimeCall;
 			type Info = #scrate::dispatch::DispatchInfo;
diff --git a/substrate/frame/support/src/dispatch.rs b/substrate/frame/support/src/dispatch.rs
index 130aa429ea60..eb1fc524200b 100644
--- a/substrate/frame/support/src/dispatch.rs
+++ b/substrate/frame/support/src/dispatch.rs
@@ -31,14 +31,6 @@ use sp_runtime::{
 use sp_std::fmt;
 use sp_weights::Weight;
 
-/// Private exports that are being used by macros.
-///
-/// The exports are not stable and should not be relied on.
-#[doc(hidden)]
-pub mod __private {
-	pub use sp_runtime::traits::Dispatchable;
-}
-
 /// The return type of a `Dispatchable` in frame. When returned explicitly from
 /// a dispatchable function it allows overriding the default `PostDispatchInfo`
 /// returned from a dispatch.
diff --git a/substrate/frame/support/src/lib.rs b/substrate/frame/support/src/lib.rs
index 52d94cebaffb..2af45d1200b3 100644
--- a/substrate/frame/support/src/lib.rs
+++ b/substrate/frame/support/src/lib.rs
@@ -49,7 +49,7 @@ pub mod __private {
 	pub use sp_metadata_ir as metadata_ir;
 	#[cfg(feature = "std")]
 	pub use sp_runtime::{bounded_btree_map, bounded_vec};
-	pub use sp_runtime::{RuntimeDebug, StateVersion};
+	pub use sp_runtime::{traits::Dispatchable, RuntimeDebug, StateVersion};
 	#[cfg(feature = "std")]
 	pub use sp_state_machine::BasicExternalities;
 	pub use sp_std;

From d3b4346fc39f04b95922837bd445a15041e4d3c6 Mon Sep 17 00:00:00 2001
From: Liam Aharon <liam.aharon@hotmail.com>
Date: Sun, 27 Aug 2023 03:41:05 +1000
Subject: [PATCH 3/6] fix .gitignore final newline

---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitignore b/.gitignore
index 56fe4bd41e25..b71c270d7368 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,3 +10,4 @@ polkadot_argument_parsing
 *.iml
 .env
 **/._*
+

From 10a40736fcf8b4778b981de554e0a0fbfd02c030 Mon Sep 17 00:00:00 2001
From: command-bot <>
Date: Sat, 26 Aug 2023 18:05:24 +0000
Subject: [PATCH 4/6] ".git/.scripts/commands/fmt/fmt.sh"

---
 .../assets/common/src/local_and_foreign_assets.rs    | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/cumulus/parachains/runtimes/assets/common/src/local_and_foreign_assets.rs b/cumulus/parachains/runtimes/assets/common/src/local_and_foreign_assets.rs
index 3659848d6104..939f3c458243 100644
--- a/cumulus/parachains/runtimes/assets/common/src/local_and_foreign_assets.rs
+++ b/cumulus/parachains/runtimes/assets/common/src/local_and_foreign_assets.rs
@@ -13,14 +13,12 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-use frame_support::{
-	traits::{
-		fungibles::{Balanced, Create, HandleImbalanceDrop, Inspect, Mutate, Unbalanced},
-		tokens::{
-			DepositConsequence, Fortitude, Precision, Preservation, Provenance, WithdrawConsequence,
-		},
-		AccountTouch, Contains, ContainsPair, Get, PalletInfoAccess,
+use frame_support::traits::{
+	fungibles::{Balanced, Create, HandleImbalanceDrop, Inspect, Mutate, Unbalanced},
+	tokens::{
+		DepositConsequence, Fortitude, Precision, Preservation, Provenance, WithdrawConsequence,
 	},
+	AccountTouch, Contains, ContainsPair, Get, PalletInfoAccess,
 };
 use pallet_asset_conversion::{MultiAssetIdConversionResult, MultiAssetIdConverter};
 use parachains_common::AccountId;

From 12954551429a3e4ddac1086e3ab0c3710f378f18 Mon Sep 17 00:00:00 2001
From: Juan Girini <juangirini@gmail.com>
Date: Mon, 28 Aug 2023 11:27:07 +0200
Subject: [PATCH 5/6] fix rustdocs

---
 substrate/frame/support/src/lib.rs | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/substrate/frame/support/src/lib.rs b/substrate/frame/support/src/lib.rs
index 2af45d1200b3..a7106780e021 100644
--- a/substrate/frame/support/src/lib.rs
+++ b/substrate/frame/support/src/lib.rs
@@ -1263,8 +1263,9 @@ pub mod pallet_prelude {
 /// Field types in enum variants must also implement [`PalletError`](traits::PalletError),
 /// otherwise the pallet will fail to compile. Rust primitive types have already implemented
 /// the [`PalletError`](traits::PalletError) trait along with some commonly used stdlib types
-/// such as [`Option`] and [`PhantomData`](`frame_support::dispatch::marker::PhantomData`), and
-/// hence in most use cases, a manual implementation is not necessary and is discouraged.
+/// such as [`Option`] and
+/// [`PhantomData`](`frame_support::__private::sp_std::marker::PhantomData`), and hence in most
+/// use cases, a manual implementation is not necessary and is discouraged.
 ///
 /// The generic `T` must not bound anything and a `where` clause is not allowed. That said,
 /// bounds and/or a where clause should not needed for any use-case.

From 1631ae46d64abbd4dd7c5d1a1d582a2e9b43b0be Mon Sep 17 00:00:00 2001
From: Juan Girini <juangirini@gmail.com>
Date: Mon, 28 Aug 2023 13:03:30 +0200
Subject: [PATCH 6/6] wip

---
 polkadot/runtime/common/src/auctions.rs               | 5 ++---
 polkadot/runtime/common/src/claims.rs                 | 6 ++++--
 polkadot/runtime/common/src/mock.rs                   | 7 ++-----
 polkadot/runtime/common/src/purchase.rs               | 8 ++++----
 polkadot/xcm/xcm-builder/src/tests/mock.rs            | 5 ++---
 substrate/frame/safe-mode/src/tests.rs                | 4 ++--
 substrate/frame/support/test/tests/pallet.rs          | 8 +++-----
 substrate/frame/support/test/tests/pallet_instance.rs | 7 +++++--
 substrate/frame/tx-pause/src/tests.rs                 | 3 ++-
 9 files changed, 26 insertions(+), 27 deletions(-)

diff --git a/polkadot/runtime/common/src/auctions.rs b/polkadot/runtime/common/src/auctions.rs
index 9c2bb04b9c8e..e35303912fa1 100644
--- a/polkadot/runtime/common/src/auctions.rs
+++ b/polkadot/runtime/common/src/auctions.rs
@@ -677,9 +677,7 @@ mod tests {
 	use crate::{auctions, mock::TestRegistrar};
 	use ::test_helpers::{dummy_hash, dummy_head_data, dummy_validation_code};
 	use frame_support::{
-		assert_noop, assert_ok, assert_storage_noop,
-		dispatch::DispatchError::BadOrigin,
-		ord_parameter_types, parameter_types,
+		assert_noop, assert_ok, assert_storage_noop, ord_parameter_types, parameter_types,
 		traits::{ConstU32, EitherOfDiverse, OnFinalize, OnInitialize},
 	};
 	use frame_system::{EnsureRoot, EnsureSignedBy};
@@ -689,6 +687,7 @@ mod tests {
 	use sp_runtime::{
 		traits::{BlakeTwo256, IdentityLookup},
 		BuildStorage,
+		DispatchError::BadOrigin,
 	};
 	use std::{cell::RefCell, collections::BTreeMap};
 
diff --git a/polkadot/runtime/common/src/claims.rs b/polkadot/runtime/common/src/claims.rs
index 82a9ef28c0f6..0c736a632842 100644
--- a/polkadot/runtime/common/src/claims.rs
+++ b/polkadot/runtime/common/src/claims.rs
@@ -711,7 +711,7 @@ mod tests {
 	use claims::Call as ClaimsCall;
 	use frame_support::{
 		assert_err, assert_noop, assert_ok,
-		dispatch::{DispatchError::BadOrigin, GetDispatchInfo, Pays},
+		dispatch::{GetDispatchInfo, Pays},
 		ord_parameter_types, parameter_types,
 		traits::{ConstU32, ExistenceRequirement, WithdrawReasons},
 	};
@@ -719,7 +719,9 @@ mod tests {
 	use sp_runtime::{
 		traits::{BlakeTwo256, Identity, IdentityLookup},
 		transaction_validity::TransactionLongevity,
-		BuildStorage, TokenError,
+		BuildStorage,
+		DispatchError::BadOrigin,
+		TokenError,
 	};
 
 	type Block = frame_system::mocking::MockBlock<Test>;
diff --git a/polkadot/runtime/common/src/mock.rs b/polkadot/runtime/common/src/mock.rs
index ed25072e246e..c9e3a8c39f12 100644
--- a/polkadot/runtime/common/src/mock.rs
+++ b/polkadot/runtime/common/src/mock.rs
@@ -17,16 +17,13 @@
 //! Mocking utilities for testing.
 
 use crate::traits::Registrar;
-use frame_support::{
-	dispatch::{DispatchError, DispatchResult},
-	weights::Weight,
-};
+use frame_support::{dispatch::DispatchResult, weights::Weight};
 use frame_system::pallet_prelude::BlockNumberFor;
 use parity_scale_codec::{Decode, Encode};
 use primitives::{HeadData, Id as ParaId, PvfCheckStatement, SessionIndex, ValidationCode};
 use runtime_parachains::paras;
 use sp_keyring::Sr25519Keyring;
-use sp_runtime::{traits::SaturatedConversion, Permill};
+use sp_runtime::{traits::SaturatedConversion, DispatchError, Permill};
 use std::{cell::RefCell, collections::HashMap};
 
 thread_local! {
diff --git a/polkadot/runtime/common/src/purchase.rs b/polkadot/runtime/common/src/purchase.rs
index 72795a733ea9..ebd949ce0c6a 100644
--- a/polkadot/runtime/common/src/purchase.rs
+++ b/polkadot/runtime/common/src/purchase.rs
@@ -484,14 +484,14 @@ mod tests {
 	// or public keys. `u64` is used as the `AccountId` and no `Signature`s are required.
 	use crate::purchase;
 	use frame_support::{
-		assert_noop, assert_ok,
-		dispatch::DispatchError::BadOrigin,
-		ord_parameter_types, parameter_types,
+		assert_noop, assert_ok, ord_parameter_types, parameter_types,
 		traits::{Currency, WithdrawReasons},
 	};
 	use sp_runtime::{
 		traits::{BlakeTwo256, Dispatchable, IdentifyAccount, Identity, IdentityLookup, Verify},
-		ArithmeticError, BuildStorage, MultiSignature,
+		ArithmeticError, BuildStorage,
+		DispatchError::BadOrigin,
+		MultiSignature,
 	};
 
 	type Block = frame_system::mocking::MockBlock<Test>;
diff --git a/polkadot/xcm/xcm-builder/src/tests/mock.rs b/polkadot/xcm/xcm-builder/src/tests/mock.rs
index 0e7b748106ef..e73b62f00731 100644
--- a/polkadot/xcm/xcm-builder/src/tests/mock.rs
+++ b/polkadot/xcm/xcm-builder/src/tests/mock.rs
@@ -28,11 +28,10 @@ pub use crate::{
 use frame_support::traits::{ContainsPair, Everything};
 pub use frame_support::{
 	dispatch::{
-		DispatchError, DispatchInfo, DispatchResultWithPostInfo, Dispatchable, GetDispatchInfo,
-		Parameter, PostDispatchInfo,
+		DispatchInfo, DispatchResultWithPostInfo, GetDispatchInfo, Parameter, PostDispatchInfo,
 	},
 	ensure, match_types, parameter_types,
-	sp_runtime::DispatchErrorWithPostInfo,
+	sp_runtime::{traits::Dispatchable, DispatchError, DispatchErrorWithPostInfo},
 	traits::{ConstU32, Contains, Get, IsInVec},
 };
 pub use parity_scale_codec::{Decode, Encode};
diff --git a/substrate/frame/safe-mode/src/tests.rs b/substrate/frame/safe-mode/src/tests.rs
index 4ce9922d3b65..1e2eb343aa2f 100644
--- a/substrate/frame/safe-mode/src/tests.rs
+++ b/substrate/frame/safe-mode/src/tests.rs
@@ -22,8 +22,8 @@
 use super::*;
 use crate::mock::{RuntimeCall, *};
 
-use frame_support::{assert_err, assert_noop, assert_ok, dispatch::Dispatchable, traits::Currency};
-use sp_runtime::TransactionOutcome;
+use frame_support::{assert_err, assert_noop, assert_ok, traits::Currency};
+use sp_runtime::{traits::Dispatchable, TransactionOutcome};
 
 /// Do something hypothetically by rolling back any changes afterwards.
 ///
diff --git a/substrate/frame/support/test/tests/pallet.rs b/substrate/frame/support/test/tests/pallet.rs
index 8c85cd569595..88aad32225a0 100644
--- a/substrate/frame/support/test/tests/pallet.rs
+++ b/substrate/frame/support/test/tests/pallet.rs
@@ -17,10 +17,7 @@
 
 use frame_support::{
 	assert_ok,
-	dispatch::{
-		DispatchClass, DispatchInfo, Dispatchable, GetDispatchInfo, Parameter, Pays,
-		UnfilteredDispatchable,
-	},
+	dispatch::{DispatchClass, DispatchInfo, GetDispatchInfo, Parameter, Pays},
 	dispatch_context::with_context,
 	pallet_prelude::{StorageInfoTrait, ValueQuery},
 	parameter_types,
@@ -28,6 +25,7 @@ use frame_support::{
 	traits::{
 		ConstU32, GetCallIndex, GetCallName, GetStorageVersion, OnFinalize, OnGenesis,
 		OnInitialize, OnRuntimeUpgrade, PalletError, PalletInfoAccess, StorageVersion,
+		UnfilteredDispatchable,
 	},
 	weights::{RuntimeDbWeight, Weight},
 };
@@ -37,7 +35,7 @@ use sp_io::{
 	TestExternalities,
 };
 use sp_runtime::{
-	traits::{Extrinsic as ExtrinsicT, SignaturePayload as SignaturePayloadT},
+	traits::{Dispatchable, Extrinsic as ExtrinsicT, SignaturePayload as SignaturePayloadT},
 	DispatchError, ModuleError,
 };
 
diff --git a/substrate/frame/support/test/tests/pallet_instance.rs b/substrate/frame/support/test/tests/pallet_instance.rs
index be675a562cec..8d2d52d18852 100644
--- a/substrate/frame/support/test/tests/pallet_instance.rs
+++ b/substrate/frame/support/test/tests/pallet_instance.rs
@@ -16,11 +16,14 @@
 // limitations under the License.
 
 use frame_support::{
-	dispatch::{DispatchClass, DispatchInfo, GetDispatchInfo, Pays, UnfilteredDispatchable},
+	dispatch::{DispatchClass, DispatchInfo, GetDispatchInfo, Pays},
 	pallet_prelude::ValueQuery,
 	parameter_types,
 	storage::unhashed,
-	traits::{ConstU32, GetCallName, OnFinalize, OnGenesis, OnInitialize, OnRuntimeUpgrade},
+	traits::{
+		ConstU32, GetCallName, OnFinalize, OnGenesis, OnInitialize, OnRuntimeUpgrade,
+		UnfilteredDispatchable,
+	},
 	weights::Weight,
 };
 use sp_io::{
diff --git a/substrate/frame/tx-pause/src/tests.rs b/substrate/frame/tx-pause/src/tests.rs
index ca259315726b..0c7065066030 100644
--- a/substrate/frame/tx-pause/src/tests.rs
+++ b/substrate/frame/tx-pause/src/tests.rs
@@ -20,7 +20,8 @@
 use super::*;
 use crate::mock::{RuntimeCall, *};
 
-use frame_support::{assert_err, assert_noop, assert_ok, dispatch::Dispatchable};
+use frame_support::{assert_err, assert_noop, assert_ok};
+use sp_runtime::DispatchError;
 
 // GENERAL SUCCESS/POSITIVE TESTS ---------------------