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

#81 in #pallet

Download history 33/week @ 2024-08-26 192/week @ 2024-09-02 97/week @ 2024-09-09 106/week @ 2024-09-16 260/week @ 2024-09-23 124/week @ 2024-09-30 93/week @ 2024-10-07 174/week @ 2024-10-14 234/week @ 2024-10-21 400/week @ 2024-10-28 299/week @ 2024-11-04 20195/week @ 2024-11-11 24338/week @ 2024-11-18 27495/week @ 2024-11-25 22225/week @ 2024-12-02 26960/week @ 2024-12-09

102,209 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–31MB
~519K SLoC