#pallet #default #blockchain #substrate

no-std pallet-default-config-example

FRAME example pallet demonstrating derive_impl / default_config in action (polkadot v1.13.0)

20 releases (major breaking)

17.0.0 Jun 21, 2024
16.0.0 May 23, 2024
15.0.0 Apr 30, 2024
14.0.0 Apr 8, 2024
0.1.0-dev.2 Jul 27, 2023

#144 in #pallet

Download history 6/week @ 2025-02-14 1/week @ 2025-02-21

1,225 downloads per month
Used in pallet-examples

MIT-0 license

2.5MB
41K SLoC

Default Config Pallet Example

A simple example of a FRAME pallet that utilizes frame_support::derive_impl to demonstrate the simpler way to implement Config trait of pallets. This example only showcases this in a mock.rs environment, but the same applies to a real runtime as well.

See the source code of tests for a real examples.

Study the following types:


Default Config Example Pallet

An example pallet demonstrating the ability to derive default testing configs via #[derive_impl] and #[pallet::config(with_default)].

Run cargo doc --package pallet-default-config-example --open to view this pallet's documentation.

License: MIT-0

Dependencies

~19–34MB
~565K SLoC