mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 08:47:57 +00:00
Make hooks and call attributes optional in pallet macro (#8853)
* Make #[pallet::hooks] optional * Make #[pallet::call] optional * Remove unused imports * Update UI test expectations * Update UI test expectations * Remove unnecessary HooksDef::empty method * Remove unnecessary CallDef::empty method * Clarify what would happen when no call or hooks are specified in a pallet
This commit is contained in:
@@ -209,7 +209,6 @@ pub mod pallet {
|
||||
#[frame_support::pallet]
|
||||
pub mod pallet2 {
|
||||
use frame_support::pallet_prelude::*;
|
||||
use frame_system::pallet_prelude::*;
|
||||
|
||||
#[pallet::config]
|
||||
pub trait Config<I: 'static = ()>: frame_system::Config {
|
||||
@@ -220,12 +219,6 @@ pub mod pallet2 {
|
||||
#[pallet::generate_store(pub(crate) trait Store)]
|
||||
pub struct Pallet<T, I = ()>(PhantomData<(T, I)>);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config<I>, I: 'static> Hooks<BlockNumberFor<T>> for Pallet<T, I> {}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config<I>, I: 'static> Pallet<T, I> {}
|
||||
|
||||
#[pallet::event]
|
||||
pub enum Event<T: Config<I>, I: 'static = ()> {
|
||||
/// Something
|
||||
|
||||
Reference in New Issue
Block a user