lib.rs 65.6 KiB
Newer Older
/// 	* 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;