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

#110 in #pallet

Download history 157/week @ 2024-08-04 42/week @ 2024-08-11 176/week @ 2024-08-18 41/week @ 2024-08-25 177/week @ 2024-09-01 100/week @ 2024-09-08 107/week @ 2024-09-15 260/week @ 2024-09-22 127/week @ 2024-09-29 102/week @ 2024-10-06 173/week @ 2024-10-13 226/week @ 2024-10-20 374/week @ 2024-10-27 328/week @ 2024-11-03 19013/week @ 2024-11-10 24595/week @ 2024-11-17

44,317 downloads per month
Used in 9 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–32MB
~522K SLoC