referrerpolicy=no-referrer-when-downgrade

polkadot_sdk_frame/
lib.rs

1// This file is part of Substrate.
2
3// Copyright (C) Parity Technologies (UK) Ltd.
4// SPDX-License-Identifier: Apache-2.0
5
6// Licensed under the Apache License, Version 2.0 (the "License");
7// you may not use this file except in compliance with the License.
8// You may obtain a copy of the License at
9//
10// 	http://www.apache.org/licenses/LICENSE-2.0
11//
12// Unless required by applicable law or agreed to in writing, software
13// distributed under the License is distributed on an "AS IS" BASIS,
14// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15// See the License for the specific language governing permissions and
16// limitations under the License.
17
18//! # FRAME
19//!
20//! ```no_compile
21//!   ______   ______    ________   ___ __ __   ______
22//!  /_____/\ /_____/\  /_______/\ /__//_//_/\ /_____/\
23//!  \::::_\/_\:::_ \ \ \::: _  \ \\::\| \| \ \\::::_\/_
24//!   \:\/___/\\:(_) ) )_\::(_)  \ \\:.      \ \\:\/___/\
25//!    \:::._\/ \: __ `\ \\:: __  \ \\:.\-/\  \ \\::___\/_
26//!     \:\ \    \ \ `\ \ \\:.\ \  \ \\. \  \  \ \\:\____/\
27//!      \_\/     \_\/ \_\/ \__\/\__\/ \__\/ \__\/ \_____\/
28//! ```
29//!
30//! > **F**ramework for **R**untime **A**ggregation of **M**odularized **E**ntities: Substrate's
31//! > State Transition Function (Runtime) Framework.
32//!
33//! ## Usage
34//!
35//! This crate is organized into 3 stages:
36//!
37//! 1. preludes: `prelude`, `testing_prelude`, `runtime::prelude`, `benchmarking::prelude`, and
38//!    `weights_prelude`.
39//! 2. domain-specific modules, like `traits`, `hashing`, `arithmetic` and `derive`.
40//! 3. Accessing frame/substrate dependencies directly: `deps`.
41//!
42//! The main intended use of this crate is through preludes, which re-export most of the components
43//! needed for pallet development. Domain-specific modules serve as a backup for organization, and
44//! `deps` provides direct access to all dependencies if needed.
45//!
46//!
47//! ### Example Usage
48//!
49//! ```
50//! use polkadot_sdk_frame as frame;
51//!
52//! #[frame::pallet]
53//! pub mod pallet {
54//! 	# use polkadot_sdk_frame as frame;
55//! 	use frame::prelude::*;
56//! 	// ^^ using the prelude!
57//!
58//! 	#[pallet::config]
59//! 	pub trait Config: frame_system::Config {}
60//!
61//! 	#[pallet::pallet]
62//! 	pub struct Pallet<T>(_);
63//! }
64//!
65//! #[cfg(test)]
66//! pub mod tests {
67//! 	# use polkadot_sdk_frame as frame;
68//! 	use frame::testing_prelude::*;
69//! }
70//!
71//! #[cfg(feature = "runtime-benchmarks")]
72//! pub mod benchmarking {
73//! 	# use polkadot_sdk_frame as frame;
74//! 	use frame::benchmarking::prelude::*;
75//! }
76//!
77//! pub mod runtime {
78//! 	# use polkadot_sdk_frame as frame;
79//! 	use frame::runtime::prelude::*;
80//! }
81//! ```
82//!
83//! ### Features
84//!
85//! This crate uses a `runtime` feature to include all types and tools needed to build FRAME-based
86//! runtimes. For runtime development, import it as:
87//!
88//! ```text
89//! polkadot-sdk-frame = { version = "foo", features = ["runtime"] }
90//! ```
91//!
92//! If you just want to build a pallet instead, import it as
93//!
94//! ```text
95//! polkadot-sdk-frame = { version = "foo" }
96//! ```
97//!
98//! ### Prelude Relationships
99//!
100//! The preludes have overlapping imports for convenience:
101//! - `testing_prelude` includes `prelude` and `runtime::prelude`
102//! - `runtime::prelude` includes `prelude`
103//! - `benchmarking::prelude` includes `prelude`
104//!
105//! ## Naming
106//!
107//! Please note that this crate can only be imported as `polkadot-sdk-frame` or `frame`. This is due
108//! to compatibility matters with `frame-support`.
109//!
110//! A typical pallet's `Cargo.toml` using this crate looks like:
111//!
112//! ```ignore
113//! [dependencies]
114//! codec = { features = ["max-encoded-len"], workspace = true }
115//! scale-info = { features = ["derive"], workspace = true }
116//! frame = { workspace = true, features = ["runtime"] }
117//!
118//! [features]
119//! default = ["std"]
120//! std = [
121//! 	"codec/std",
122//! 	"scale-info/std",
123//! 	"frame/std",
124//! ]
125//! runtime-benchmarks = [
126//! 	"frame/runtime-benchmarks",
127//! ]
128//! try-runtime = [
129//! 	"frame/try-runtime",
130//! ]
131//! ```
132//!
133//! ## Documentation
134//!
135//! For more detailed documentation and examples, see [`polkadot_sdk_frame`](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_frame/index.html).
136
137#![cfg_attr(not(feature = "std"), no_std)]
138
139#[doc(no_inline)]
140pub use frame_support::pallet;
141
142#[doc(no_inline)]
143pub use frame_support::pallet_macros::{import_section, pallet_section};
144
145/// The logging library of the runtime. Can normally be the classic `log` crate.
146pub use log;
147
148#[doc(inline)]
149pub use frame_support::storage_alias;
150
151/// Macros used within the main [`pallet`] macro.
152///
153/// Note: All of these macros are "stubs" and not really usable outside `#[pallet] mod pallet { ..
154/// }`. They are mainly provided for documentation and IDE support.
155///
156/// To view a list of all the macros and their documentation, follow the links in the 'Re-exports'
157/// section below:
158pub mod pallet_macros {
159	#[doc(no_inline)]
160	pub use frame_support::{derive_impl, pallet, pallet_macros::*};
161}
162
163/// The main prelude of FRAME.
164///
165/// This prelude should almost always be the first line of code in any pallet or runtime.
166///
167/// ```
168/// use polkadot_sdk_frame::prelude::*;
169///
170/// // rest of your pallet..
171/// mod pallet {}
172/// ```
173pub mod prelude {
174	/// `frame_system`'s parent crate, which is mandatory in all pallets build with this crate.
175	///
176	/// Conveniently, the keyword `frame_system` is in scope as one uses `use
177	/// polkadot_sdk_frame::prelude::*`.
178	#[doc(inline)]
179	pub use frame_system;
180
181	/// Pallet prelude of `frame-support`.
182	///
183	/// Note: this needs to revised once `frame-support` evolves.
184	#[doc(no_inline)]
185	pub use frame_support::pallet_prelude::*;
186
187	/// Dispatch types from `frame-support`, other fundamental traits.
188	#[doc(no_inline)]
189	pub use frame_support::dispatch::{GetDispatchInfo, PostDispatchInfo};
190	pub use frame_support::{
191		defensive, defensive_assert,
192		traits::{
193			Contains, Defensive, DefensiveSaturating, EitherOf, EstimateNextSessionRotation,
194			Everything, InsideBoth, InstanceFilter, IsSubType, MapSuccess, NoOpPoll,
195			OnRuntimeUpgrade, OneSessionHandler, PalletInfoAccess, RankedMembers,
196			RankedMembersSwapHandler, VariantCount, VariantCountOf,
197		},
198		PalletId,
199	};
200
201	/// Pallet prelude of `frame-system`.
202	#[doc(no_inline)]
203	pub use frame_system::pallet_prelude::*;
204
205	/// Transaction related helpers to submit transactions.
206	#[doc(no_inline)]
207	pub use frame_system::offchain::*;
208
209	/// All FRAME-relevant derive macros.
210	#[doc(no_inline)]
211	pub use super::derive::*;
212
213	/// All hashing related components.
214	pub use super::hashing::*;
215
216	/// All transaction related components.
217	pub use crate::transaction::*;
218
219	/// All account related components.
220	pub use super::account::*;
221
222	/// All arithmetic types and traits used for safe math.
223	pub use super::arithmetic::*;
224
225	/// All token related types and traits.
226	pub use super::token::*;
227
228	/// Runtime traits
229	#[doc(no_inline)]
230	pub use sp_runtime::traits::{
231		AccountIdConversion, BlockNumberProvider, Bounded, Convert, ConvertBack, DispatchInfoOf,
232		Dispatchable, ReduceBy, ReplaceWithDefault, SaturatedConversion, Saturating, StaticLookup,
233		TrailingZeroInput,
234	};
235
236	/// Bounded storage related types.
237	pub use sp_runtime::{BoundedSlice, BoundedVec};
238
239	/// Other error/result types for runtime
240	#[doc(no_inline)]
241	pub use sp_runtime::{
242		BoundToRuntimeAppPublic, DispatchErrorWithPostInfo, DispatchResultWithInfo, TokenError,
243	};
244}
245
246#[cfg(any(feature = "try-runtime", test))]
247pub mod try_runtime {
248	pub use sp_runtime::TryRuntimeError;
249}
250
251/// Prelude to be included in the `benchmarking.rs` of a pallet.
252///
253/// It supports both the `benchmarking::v1::benchmarks` and `benchmarking::v2::benchmark` syntax.
254///
255/// ```
256/// use polkadot_sdk_frame::benchmarking::prelude::*;
257/// // rest of your code.
258/// ```
259///
260/// It already includes `polkadot_sdk_frame::prelude::*` and `polkadot_sdk_frame::testing_prelude`.
261#[cfg(feature = "runtime-benchmarks")]
262pub mod benchmarking {
263	mod shared {
264		pub use frame_benchmarking::{add_benchmark, v1::account, whitelist, whitelisted_caller};
265		// all benchmarking functions.
266		pub use frame_benchmarking::benchmarking::*;
267		// The system origin, which is very often needed in benchmarking code. Might be tricky only
268		// if the pallet defines its own `#[pallet::origin]` and call it `RawOrigin`.
269		pub use frame_system::{Pallet as System, RawOrigin};
270	}
271
272	#[deprecated(
273		note = "'The V1 benchmarking syntax is deprecated. Please use the V2 syntax. This warning may become a hard error any time after April 2025. For more info, see: https://github.com/paritytech/polkadot-sdk/pull/5995"
274	)]
275	pub mod v1 {
276		pub use super::shared::*;
277		pub use frame_benchmarking::benchmarks;
278	}
279
280	pub mod prelude {
281		pub use crate::prelude::*;
282		pub use frame_benchmarking::{
283			add_benchmark, benchmarking::add_to_whitelist, v1::account, v2::*, whitelist,
284			whitelisted_caller,
285		};
286		pub use frame_support::traits::UnfilteredDispatchable;
287		pub use frame_system::{Pallet as System, RawOrigin};
288	}
289}
290
291/// Prelude to be included in the `weight.rs` of each pallet.
292///
293/// ```
294/// pub use polkadot_sdk_frame::weights_prelude::*;
295/// ```
296pub mod weights_prelude {
297	pub use core::marker::PhantomData;
298	pub use frame_support::{
299		traits::Get,
300		weights::{
301			constants::{ParityDbWeight, RocksDbWeight},
302			Weight,
303		},
304	};
305	pub use frame_system;
306}
307
308/// The main testing prelude of FRAME.
309///
310/// A test setup typically starts with:
311///
312/// ```
313/// use polkadot_sdk_frame::testing_prelude::*;
314/// // rest of your test setup.
315/// ```
316///
317/// This automatically brings in `polkadot_sdk_frame::prelude::*` and
318/// `polkadot_sdk_frame::runtime::prelude::*`.
319#[cfg(feature = "std")]
320pub mod testing_prelude {
321	pub use crate::{prelude::*, runtime::prelude::*};
322
323	/// Testing includes building a runtime, so we bring in all preludes related to runtimes as
324	/// well.
325	pub use super::runtime::testing_prelude::*;
326
327	/// Other helper macros from `frame_support` that help with asserting in tests.
328	pub use frame_support::{
329		assert_err, assert_err_ignore_postinfo, assert_error_encoded_size, assert_noop, assert_ok,
330		assert_storage_noop, defensive, ensure, hypothetically, hypothetically_ok, storage_alias,
331		StorageNoopGuard,
332	};
333
334	pub use frame_support::traits::Everything;
335	pub use frame_system::{self, mocking::*, RunToBlockHooks};
336
337	#[deprecated(note = "Use `frame::testing_prelude::TestState` instead.")]
338	pub use sp_io::TestExternalities;
339
340	pub use sp_io::TestExternalities as TestState;
341
342	/// Commonly used runtime traits for testing.
343	pub use sp_runtime::{traits::BadOrigin, StateVersion};
344}
345
346/// All of the types and tools needed to build FRAME-based runtimes.
347#[cfg(any(feature = "runtime", feature = "std"))]
348pub mod runtime {
349	/// The main prelude of `FRAME` for building runtimes.
350	///
351	/// A runtime typically starts with:
352	///
353	/// ```
354	/// use polkadot_sdk_frame::runtime::prelude::*;
355	/// ```
356	///
357	/// This automatically brings in `polkadot_sdk_frame::prelude::*`.
358	pub mod prelude {
359		pub use crate::prelude::*;
360
361		/// All of the types related to the FRAME runtime executive.
362		pub use frame_executive::*;
363
364		/// Macro to amalgamate the runtime into `struct Runtime`.
365		///
366		/// Consider using the new version of this [`frame_construct_runtime`].
367		pub use frame_support::construct_runtime;
368
369		/// Macro to amalgamate the runtime into `struct Runtime`.
370		///
371		/// This is the newer version of [`construct_runtime`].
372		pub use frame_support::runtime as frame_construct_runtime;
373
374		/// Macro to easily derive the `Config` trait of various pallet for `Runtime`.
375		pub use frame_support::derive_impl;
376
377		/// Macros to easily impl traits such as `Get` for types.
378		// TODO: using linking in the Get in the line above triggers an ICE :/
379		pub use frame_support::{ord_parameter_types, parameter_types};
380
381		/// For building genesis config.
382		pub use frame_support::genesis_builder_helper::{build_state, get_preset};
383
384		/// Const types that can easily be used in conjuncture with `Get`.
385		pub use frame_support::traits::{
386			ConstBool, ConstI128, ConstI16, ConstI32, ConstI64, ConstI8, ConstU128, ConstU16,
387			ConstU32, ConstU64, ConstU8,
388		};
389
390		/// Used for simple fee calculation.
391		pub use frame_support::weights::{self, FixedFee, NoFee};
392
393		/// Primary types used to parameterize `EnsureOrigin` and `EnsureRootWithArg`.
394		pub use frame_system::{
395			EnsureNever, EnsureNone, EnsureRoot, EnsureRootWithSuccess, EnsureSigned,
396			EnsureSignedBy,
397		};
398
399		/// Types to define your runtime version.
400		// TODO: Remove deprecation suppression once
401		#[allow(deprecated)]
402		pub use sp_version::create_runtime_str;
403		pub use sp_version::{runtime_version, RuntimeVersion};
404
405		#[cfg(feature = "std")]
406		pub use sp_version::NativeVersion;
407
408		/// Macro to implement runtime APIs.
409		pub use sp_api::impl_runtime_apis;
410
411		// Types often used in the runtime APIs.
412		pub use sp_core::OpaqueMetadata;
413		pub use sp_genesis_builder::{
414			PresetId, Result as GenesisBuilderResult, DEV_RUNTIME_PRESET,
415			LOCAL_TESTNET_RUNTIME_PRESET,
416		};
417		pub use sp_inherents::{CheckInherentsResult, InherentData};
418		pub use sp_keyring::Sr25519Keyring;
419		pub use sp_runtime::{ApplyExtrinsicResult, ExtrinsicInclusionMode};
420	}
421
422	/// Types and traits for runtimes that implement runtime APIs.
423	///
424	/// A testing runtime should not need this.
425	///
426	/// A non-testing runtime should have this enabled, as such:
427	///
428	/// ```
429	/// use polkadot_sdk_frame::runtime::{prelude::*, apis::{*,}};
430	/// ```
431	// TODO: This is because of wildcard imports, and it should be not needed once we can avoid
432	// that. Imports like that are needed because we seem to need some unknown types in the macro
433	// expansion. See `sp_session::runtime_api::*;` as one example. All runtime api decls should be
434	// moved to file similarly.
435	#[allow(ambiguous_glob_reexports)]
436	pub mod apis {
437		pub use frame_system_rpc_runtime_api::*;
438		pub use sp_api::{self, *};
439		pub use sp_block_builder::*;
440		pub use sp_consensus_aura::*;
441		pub use sp_consensus_grandpa::*;
442		pub use sp_genesis_builder::*;
443		pub use sp_offchain::*;
444		pub use sp_session::runtime_api::*;
445		pub use sp_transaction_pool::runtime_api::*;
446	}
447
448	/// A set of opinionated types aliases commonly used in runtimes.
449	///
450	/// This is one set of opinionated types. They are compatible with one another, but are not
451	/// guaranteed to work if you start tweaking a portion.
452	///
453	/// Some note-worthy opinions in this prelude:
454	///
455	/// - `u32` block number.
456	/// - [`sp_runtime::MultiAddress`] and [`sp_runtime::MultiSignature`] are used as the account id
457	///   and signature types. This implies that this prelude can possibly used with an
458	///   "account-index" system (eg `pallet-indices`). And, in any case, it should be paired with
459	///   `AccountIdLookup` in [`frame_system::Config::Lookup`].
460	pub mod types_common {
461		use frame_system::Config as SysConfig;
462		use sp_runtime::{generic, traits, OpaqueExtrinsic};
463
464		/// A signature type compatible capably of handling multiple crypto-schemes.
465		pub type Signature = sp_runtime::MultiSignature;
466
467		/// The corresponding account-id type of [`Signature`].
468		pub type AccountId =
469			<<Signature as traits::Verify>::Signer as traits::IdentifyAccount>::AccountId;
470
471		/// The block-number type, which should be fed into [`frame_system::Config`].
472		pub type BlockNumber = u32;
473
474		/// TODO: Ideally we want the hashing type to be equal to SysConfig::Hashing?
475		type HeaderInner = generic::Header<BlockNumber, traits::BlakeTwo256>;
476
477		// NOTE: `AccountIndex` is provided for future compatibility, if you want to introduce
478		// something like `pallet-indices`.
479		type ExtrinsicInner<T, Extra, AccountIndex = ()> = generic::UncheckedExtrinsic<
480			sp_runtime::MultiAddress<AccountId, AccountIndex>,
481			<T as SysConfig>::RuntimeCall,
482			Signature,
483			Extra,
484		>;
485
486		/// The block type, which should be fed into [`frame_system::Config`].
487		///
488		/// Should be parameterized with `T: frame_system::Config` and a tuple of
489		/// `TransactionExtension`. When in doubt, use [`SystemTransactionExtensionsOf`].
490		// Note that this cannot be dependent on `T` for block-number because it would lead to a
491		// circular dependency (self-referential generics).
492		pub type BlockOf<T, Extra = ()> = generic::Block<HeaderInner, ExtrinsicInner<T, Extra>>;
493
494		/// The opaque block type. This is the same [`BlockOf`], but it has
495		/// [`sp_runtime::OpaqueExtrinsic`] as its final extrinsic type.
496		///
497		/// This should be provided to the client side as the extrinsic type.
498		pub type OpaqueBlock = generic::Block<HeaderInner, OpaqueExtrinsic>;
499
500		/// Default set of signed extensions exposed from the `frame_system`.
501		///
502		/// crucially, this does NOT contain any tx-payment extension.
503		pub type SystemTransactionExtensionsOf<T> = (
504			frame_system::AuthorizeCall<T>,
505			frame_system::CheckNonZeroSender<T>,
506			frame_system::CheckSpecVersion<T>,
507			frame_system::CheckTxVersion<T>,
508			frame_system::CheckGenesis<T>,
509			frame_system::CheckEra<T>,
510			frame_system::CheckNonce<T>,
511			frame_system::CheckWeight<T>,
512			frame_system::WeightReclaim<T>,
513		);
514	}
515
516	/// The main prelude of FRAME for building runtimes, and in the context of testing.
517	///
518	/// counter part of `runtime::prelude`.
519	#[cfg(feature = "std")]
520	pub mod testing_prelude {
521		pub use sp_core::storage::Storage;
522		pub use sp_runtime::{BuildStorage, DispatchError};
523	}
524}
525
526/// All traits often used in FRAME pallets.
527///
528/// Note that types implementing these traits can also be found in this module.
529// TODO: `Hash` and `Bounded` are defined multiple times; should be fixed once these two crates are
530// cleaned up.
531#[allow(ambiguous_glob_reexports)]
532pub mod traits {
533	pub use frame_support::traits::*;
534	pub use sp_runtime::traits::*;
535}
536
537/// The arithmetic types used for safe math.
538///
539/// This is already part of the main [`prelude`].
540pub mod arithmetic {
541	pub use sp_arithmetic::{traits::*, *};
542}
543
544/// All token related types and traits.
545pub mod token {
546	pub use frame_support::traits::{
547		tokens,
548		tokens::{
549			currency, fungible, fungibles, imbalance, nonfungible, nonfungible_v2, nonfungibles,
550			nonfungibles_v2, pay, AssetId, BalanceStatus, DepositConsequence, ExistenceRequirement,
551			Fortitude, Pay, Precision, Preservation, Provenance, WithdrawConsequence,
552			WithdrawReasons,
553		},
554		OnUnbalanced,
555	};
556}
557
558/// All derive macros used in frame.
559///
560/// This is already part of the main [`prelude`].
561pub mod derive {
562	pub use codec::{Decode, Encode};
563	pub use core::fmt::Debug;
564	pub use frame_support::{
565		CloneNoBound, DebugNoBound, DefaultNoBound, EqNoBound, OrdNoBound, PartialEqNoBound,
566		PartialOrdNoBound, RuntimeDebugNoBound,
567	};
568	pub use scale_info::TypeInfo;
569	pub use serde;
570	/// The `serde` `Serialize`/`Deserialize` derive macros and traits.
571	///
572	/// You will either need to add `serde` as a dependency in your crate's `Cargo.toml`
573	/// or specify the `#[serde(crate = "PATH_TO_THIS_CRATE::serde")]` attribute that points
574	/// to the path where serde can be found.
575	pub use serde::{Deserialize, Serialize};
576	pub use sp_runtime::RuntimeDebug;
577}
578
579/// All hashing related components.
580///
581/// This is already part of the main [`prelude`].
582pub mod hashing {
583	pub use sp_core::{hashing::*, H160, H256, H512, U256, U512};
584	pub use sp_runtime::traits::{BlakeTwo256, Hash, Keccak256};
585}
586
587// Systems involved in transaction execution in the runtime.
588///
589/// This is already part of the [`prelude`].
590pub mod transaction {
591	pub use frame_support::traits::{CallMetadata, GetCallMetadata};
592	pub use sp_runtime::{
593		generic::ExtensionVersion,
594		impl_tx_ext_default,
595		traits::{
596			AsTransactionAuthorizedOrigin, DispatchTransaction, TransactionExtension,
597			ValidateResult,
598		},
599		transaction_validity::{InvalidTransaction, ValidTransaction},
600	};
601}
602
603/// All account management related traits.
604///
605/// This is already part of the [`prelude`].
606pub mod account {
607	pub use frame_support::traits::{
608		AsEnsureOriginWithArg, ChangeMembers, EitherOfDiverse, InitializeMembers,
609	};
610	pub use sp_runtime::traits::{IdentifyAccount, IdentityLookup};
611}
612
613/// Access to all of the dependencies of this crate. In case the prelude re-exports are not enough,
614/// this module can be used.
615///
616/// Note: Before using these direct dependencies, please check if the item you need is available
617/// through the preludes or domain-specific modules, as they provide a more organized and
618/// maintainable way to access these dependencies.
619pub mod deps {
620	// Notes for maintainers: Any time one uses this module to access a dependency, you can have a
621	// moment to think about whether this item could have been placed in any of the other modules
622	// and preludes in this crate. In most cases, hopefully the answer is yes.
623
624	pub use frame_support;
625	pub use frame_system;
626
627	pub use sp_arithmetic;
628	pub use sp_core;
629	pub use sp_io;
630	pub use sp_runtime;
631
632	pub use codec;
633	pub use scale_info;
634
635	#[cfg(feature = "runtime")]
636	pub use frame_executive;
637	#[cfg(feature = "runtime")]
638	pub use sp_api;
639	#[cfg(feature = "runtime")]
640	pub use sp_block_builder;
641	#[cfg(feature = "runtime")]
642	pub use sp_consensus_aura;
643	#[cfg(feature = "runtime")]
644	pub use sp_consensus_grandpa;
645	#[cfg(feature = "runtime")]
646	pub use sp_genesis_builder;
647	#[cfg(feature = "runtime")]
648	pub use sp_inherents;
649	#[cfg(feature = "runtime")]
650	pub use sp_keyring;
651	#[cfg(feature = "runtime")]
652	pub use sp_offchain;
653	#[cfg(feature = "runtime")]
654	pub use sp_storage;
655	#[cfg(feature = "runtime")]
656	pub use sp_version;
657
658	#[cfg(feature = "runtime-benchmarks")]
659	pub use frame_benchmarking;
660	#[cfg(feature = "runtime-benchmarks")]
661	pub use frame_system_benchmarking;
662
663	#[cfg(feature = "frame-try-runtime")]
664	pub use frame_try_runtime;
665}