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

#105 in #pallet

Download history 6/week @ 2024-07-03 118/week @ 2024-07-10 141/week @ 2024-07-17 49/week @ 2024-07-24 73/week @ 2024-07-31 119/week @ 2024-08-07 56/week @ 2024-08-14 164/week @ 2024-08-21 99/week @ 2024-08-28 144/week @ 2024-09-04 122/week @ 2024-09-11 89/week @ 2024-09-18 278/week @ 2024-09-25 96/week @ 2024-10-02 157/week @ 2024-10-09 127/week @ 2024-10-16

684 downloads per month
Used in 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
~517K SLoC