Newer
Older
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
/// * event names, docs
/// * error names, docs
/// * storage names, hasher, prefixes, default value
/// * error , error, constant,
/// * manually check that:
/// * Origin is moved inside macro unser `#[pallet::origin]` if it exists
/// * ValidateUnsigned is moved inside macro under `#[pallet::validate_unsigned)]` if it exists
/// * ProvideInherent is moved inside macro under `#[pallet::inherent)]` if it exists
/// * on_initialize/on_finalize/on_runtime_upgrade/offchain_worker are moved to Hooks
/// implementation
/// * storages with `config(..)` are converted to genesis_config field, and their default is
/// `= $expr;` if the storage have default value
/// * storages with `build($expr)` or `config(..)` are built in genesis_build
/// * add_extra_genesis fields are converted to genesis_config field with their correct default
/// if specified
/// * add_extra_genesis build is written into genesis_build
/// * storages now use PalletInfo for module_prefix instead of the one given to decl_storage:
/// Thus any use of this pallet in `construct_runtime!` should be careful to update name in
/// order not to break storage or to upgrade storage (moreover for instantiable pallet).
/// If pallet is published, make sure to warn about this breaking change.
///
/// # Notes when macro fails to show proper error message spans:
///
/// Rustc loses span for some macro input. Some tips to fix it:
/// * do not use inner attribute:
/// ```ignore
/// #[pallet]
/// pub mod pallet {
/// //! This inner attribute will make span fail
/// ..
/// }
/// ```
/// * use the newest nightly possible.
///
pub use frame_support_procedural::pallet;