Crate frame_support

source ·
Expand description

Support code for the runtime.

§Note on Tuple Traits

Many of the traits defined in traits have auto-implementations on tuples as well. Usually, the tuple is a function of number of pallets in the runtime. By default, the traits are implemented for tuples of up to 64 items.



  • Utilities for dealing with crypto primitives. Sometimes we need to use these from inside WASM contracts, where crypto calculations have weak performance.
  • Dispatch system. Contains a macro for defining runtime modules and generating values representing lazy module function calls.
  • Provides functions to interact with the dispatch context.
  • Experimental macros for defining dynamic params that can be used in pallet configs.
  • errorDeprecated
  • Helper functions for implementing sp_genesis_builder::GenesisBuilder for runtimes.
  • Some instance placeholder to be used in frame_support::pallet attribute macro.
  • Contains macro stubs for all of the pallet:: macros
  • Prelude to be used alongside pallet macro, for ease of use.
  • Stuff to do with the runtime’s storage.
  • Prelude to be used for pallet testing, for ease of use.
  • Traits and associated utilities for use in the FRAME environment.
  • Re-exports sp-weights public API, and contains benchmarked weight constants specific to FRAME.




  • A type that cannot be instantiated.




  • Print out the debuggable type.
  • Print something that implements Printable from the runtime.

Type Aliases§

Attribute Macros§

  • This attribute can be used to derive a full implementation of a trait based on a local partial impl and an external impl containing defaults that can be overridden in the local impl.
  • The pallet macro has 2 purposes:
  • Attach this attribute to an impl statement that you want to use with #[derive_impl(..)].
  • Assert the annotated function is executed within a storage transaction.
  • Construct a runtime, with the given name and the given pallets.
  • Generate a #[pallet::storage] alias outside of a pallet.
  • Execute the annotated function in a new storage transaction.

Derive Macros§