Expand description
§Basic Example Pallet
A pallet demonstrating concepts, APIs and structures common to most FRAME runtimes.
This pallet serves as an example and is not meant to be used in production.
Made with Substrate, for Polkadot.
§Pallet API
See the pallet module for more information about the interfaces this pallet exposes,
including its configuration trait, dispatchables, storage items, events and errors.
§Overview
This pallet provides basic examples of using:
- A custom weight calculator able to classify a call’s dispatch class (see:
[
frame_support::dispatch::DispatchClass]) - Pallet hooks to implement some custom logic that’s executed before and after a block is
imported (see: [
frame_support::traits::Hooks]) - Inherited weight annotation for pallet calls, used to create less repetition for calls that
use the 
Config::WeightInfotrait to calculate call weights. This can also be overridden, as demonstrated byCall::set_dummy. - A private function that performs a storage update.
 - A simple transaction extension implementation (see:
[
sp_runtime::traits::TransactionExtension]) which increases the priority of theCall::set_dummyif it’s present and drops any transaction with an encoded length higher than 200 bytes. 
Re-exports§
Modules§
- pallet
 - The 
palletmodule in each FRAME pallet hosts the most important items needed to construct this pallet. - weights
 - Autogenerated weights for pallet_example_basic
 
Structs§
- Watch
Dummy  - A simple transaction extension that checks for the 
set_dummycall. In that case, it increases the priority and prints some log.