8 releases (breaking)
0.7.0 | Sep 26, 2024 |
---|---|
0.6.0 | Jul 18, 2024 |
0.5.0 | Jul 12, 2024 |
0.4.0 | Jun 24, 2024 |
0.1.0 | Mar 20, 2024 |
#107 in #pallet
11,026 downloads per month
Used in 8 crates
(via polkadot-sdk)
4MB
50K
SLoC
FRAME
The FRAME development environment provides modules (called "pallets") and support libraries that you can use, modify, and extend to build the runtime logic to suit the needs of your blockchain.
Documentation
https://docs.substrate.io/reference/frame-pallets/
Issues
https://github.com/orgs/paritytech/projects/40
Release
Polkadot SDK stable2409
lib.rs
:
FRAME
______ ______ ________ ___ __ __ ______
/_____/\ /_____/\ /_______/\ /__//_//_/\ /_____/\
\::::_\/_\:::_ \ \ \::: _ \ \\::\| \| \ \\::::_\/_
\:\/___/\\:(_) ) )_\::(_) \ \\:. \ \\:\/___/\
\:::._\/ \: __ `\ \\:: __ \ \\:.\-/\ \ \\::___\/_
\:\ \ \ \ `\ \ \\:.\ \ \ \\. \ \ \ \\:\____/\
\_\/ \_\/ \_\/ \__\/\__\/ \__\/ \__\/ \_____\/
Framework for Runtime Aggregation of Modularized Entities: Substrate's State Transition Function (Runtime) Framework.
Usage
The main intended use of this crate is for it to be imported with its preludes:
#[frame::pallet]
pub mod pallet {
# use polkadot_sdk_frame as frame;
use frame::prelude::*;
// ^^ using the prelude!
#[pallet::config]
pub trait Config: frame_system::Config {}
#[pallet::pallet]
pub struct Pallet<T>(_);
}
pub mod tests {
# use polkadot_sdk_frame as frame;
use frame::testing_prelude::*;
}
pub mod runtime {
# use polkadot_sdk_frame as frame;
use frame::runtime::prelude::*;
}
See: prelude
, testing_prelude
and runtime::prelude
.
Please note that this crate can only be imported as polkadot-sdk-frame
or frame
.
Documentation
See polkadot_sdk::frame
.
Underlying dependencies
This crate is an amalgamation of multiple other crates that are often used together to compose a pallet. It is not necessary to use it, and it may fall short for certain purposes.
In short, this crate only re-exports types and traits from multiple sources. All of these
sources are listed (and re-exported again) in deps
.
WARNING: Experimental
This crate and all of its content is experimental, and should not yet be used in production.
Dependencies
~17–33MB
~521K SLoC