The Framework for Runtime Aggregation of Modularized Entities (FRAME) is a set of modules (called pallets) and support libraries that simplify runtime development. Pallets are individual modules within FRAME that host domain-specific logic.
FRAME provides some helper modules to interact with Substrate Primitives, which provide the interface to the core client.
The following diagram shows the architectural overview of FRAME and its support libraries:
When building with FRAME, the Substrate runtime is composed of several smaller components called pallets. A pallet contains a set of types, storage items, and functions that define a set of features and functionality for a runtime.
The System library provides low-level types, storage, and functions for your blockchain. All other pallets depend on the System library as the basis of your Substrate runtime.
The System library defines all the core types for the Substrate runtime, such as:
- Block Number
- Account Id
It also has a number of system-critical storage items, such as:
- Account Nonce
- Block Hash
- Block Number
Finally, it defines a number of low level functions which can access your blockchain storage, verify the origin of an extrinsic, and more.
The Executive pallet acts as the orchestration layer for the runtime. It dispatches incoming extrinsic calls to the respective pallets in the runtime.
The FRAME support library is a collection of Rust macros, types, traits, and functions that simplify the development of Substrate pallets.
The support macros expand at compile time to generate code that is used by the runtime and reduce boilerplate code for the most common components of a pallet.
The runtime library brings together all these components and pallets. It defines which pallets are included with your runtime and configures them to work together to compose your final runtime. When calls are made to your runtime, it uses the Executive pallet to dispatch those calls to the individual pallets.
Some pallets will be sufficiently general-purpose to be reused in many blockchains. Anyone is free to write and share useful pallets. There is a collection of popular pallets provided with Substrate. Let's explore them.
The Assets pallet is a simple, secure module for dealing with fungible assets.
The Aura pallet extends Aura consensus by managing offline reporting.
The Authority Discovery pallet is used by
core/authority-discovery to retrieve the current set of
authorities, learn its own authority ID, as well as to sign and verify messages to and from other
The Authorship pallet tracks the current author of the block and recent uncles.
The BABE pallet extends BABE consensus by collecting on-chain randomness from VRF outputs and managing epoch transitions.
The Balances pallet provides functionality for handling accounts and balances.
The Collective pallet allows a set of account IDs to make their collective feelings known through dispatched calls from specialized origins.
The Contracts pallet provides functionality for the runtime to deploy and execute WebAssembly smart-contracts.
The Democracy pallet provides a democratic system that handles administration of general stakeholder voting.
The Phragmen Elections pallet is an election module based on sequential phragmen.
The Elections pallet is an election module for stake-weighted membership selection of a collective.
The EVM pallet is an Ethereum virtual machine (EVM) execution module for Substrate.
The Example pallet is a simple example of a pallet demonstrating concepts, APIs, and structures common to most pallets.
The Finality Tracker pallet tracks the last finalized block, as perceived by block authors.
The Generic Asset pallet provides functionality for handling accounts and asset balances.
The GRANDPA pallet extends GRANDPA consensus by managing the GRANDPA authority set ready for the native code.
The I'm Online pallet allows validators to gossip a heartbeat transaction with each new session to signal that the node is online.
The Indices pallet allocates indices for newly created accounts. An index is a short form of an address.
The Membership pallet allows control of membership of a set of
AccountIds, useful for managing
membership of a collective.
The Offences pallet tracks reported offences.
Randomness Collective Flip
The Randomness Collective Flip pallet provides a
random function that generates low-influence
random values based on the block hashes from the previous
The Scored Pool pallet maintains a scored membership pool where the highest scoring entities are made members.
The Session pallet allows validators to manage their session keys, provides a function for changing the session length, and handles session rotation.
The Staking pallet is used to manage funds at stake by network maintainers.
The Sudo pallet allows for a single account (called the "sudo key") to execute dispatchable
functions that require a
Root origin or designate a new account to replace them as the sudo key.
The Timestamp pallet provides functionality to get and set the on-chain time.
The Transaction Payment pallet provides the basic logic to compute pre-dispatch transaction fees.
The Treasury pallet provides a "pot" of funds that can be managed by stakeholders in the system and a structure for making spending proposals from this pot.
- Learn how to develop custom Substrate pallets.