Attribute Macro frame_support::pallet_macros::constant

source ·
#[constant]
Expand description

Allows adding an associated type trait bounded by Get from pallet::config into metadata.

§Example

#[frame_support::pallet]
mod pallet {
    use frame_support::pallet_prelude::*;
    #[pallet::config]
    pub trait Config: frame_system::Config {
		/// This is like a normal `Get` trait, but it will be added into metadata.
		#[pallet::constant]
		type Foo: Get<u32>;
	}
}

§Note on deprecation of constants


Documentation for this macro can be found at frame_support::pallet_macros::constant.