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

Download history 49/week @ 2024-07-25 85/week @ 2024-08-01 109/week @ 2024-08-08 102/week @ 2024-08-15 114/week @ 2024-08-22 127/week @ 2024-08-29 121/week @ 2024-09-05 126/week @ 2024-09-12 103/week @ 2024-09-19 267/week @ 2024-09-26 94/week @ 2024-10-03 159/week @ 2024-10-10 205/week @ 2024-10-17 271/week @ 2024-10-24 428/week @ 2024-10-31 10076/week @ 2024-11-07

11,026 downloads per month
Used in 8 crates (via polkadot-sdk)

Apache-2.0

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