mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 21:01:05 +00:00
Add field names to pallet Event variants (#9993)
* convert pallet-assets events to struct types * updated events of a couple pallets * updated pallet event field names * update pallet event field names * updated events in test files * cargo fmt * minorfixes * fix assertion error * minor fix * formatting fix * fmt
This commit is contained in:
@@ -105,7 +105,7 @@ pub mod pallet {
|
||||
*maybe_value = Some((who.clone(), T::Deposit::get(), false));
|
||||
T::Currency::reserve(&who, T::Deposit::get())
|
||||
})?;
|
||||
Self::deposit_event(Event::IndexAssigned(who, index));
|
||||
Self::deposit_event(Event::IndexAssigned { who, index });
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ pub mod pallet {
|
||||
*maybe_value = Some((new.clone(), amount.saturating_sub(lost), false));
|
||||
Ok(())
|
||||
})?;
|
||||
Self::deposit_event(Event::IndexAssigned(new, index));
|
||||
Self::deposit_event(Event::IndexAssigned { who: new, index });
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ pub mod pallet {
|
||||
T::Currency::unreserve(&who, amount);
|
||||
Ok(())
|
||||
})?;
|
||||
Self::deposit_event(Event::IndexFreed(index));
|
||||
Self::deposit_event(Event::IndexFreed { index });
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -219,7 +219,7 @@ pub mod pallet {
|
||||
}
|
||||
*maybe_value = Some((new.clone(), Zero::zero(), freeze));
|
||||
});
|
||||
Self::deposit_event(Event::IndexAssigned(new, index));
|
||||
Self::deposit_event(Event::IndexAssigned { who: new, index });
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -253,7 +253,7 @@ pub mod pallet {
|
||||
*maybe_value = Some((account, Zero::zero(), true));
|
||||
Ok(())
|
||||
})?;
|
||||
Self::deposit_event(Event::IndexFrozen(index, who));
|
||||
Self::deposit_event(Event::IndexFrozen { index, who });
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
@@ -261,12 +261,12 @@ pub mod pallet {
|
||||
#[pallet::event]
|
||||
#[pallet::generate_deposit(pub(super) fn deposit_event)]
|
||||
pub enum Event<T: Config> {
|
||||
/// A account index was assigned. \[index, who\]
|
||||
IndexAssigned(T::AccountId, T::AccountIndex),
|
||||
/// A account index has been freed up (unassigned). \[index\]
|
||||
IndexFreed(T::AccountIndex),
|
||||
/// A account index has been frozen to its current account ID. \[index, who\]
|
||||
IndexFrozen(T::AccountIndex, T::AccountId),
|
||||
/// A account index was assigned.
|
||||
IndexAssigned { who: T::AccountId, index: T::AccountIndex },
|
||||
/// A account index has been freed up (unassigned).
|
||||
IndexFreed { index: T::AccountIndex },
|
||||
/// A account index has been frozen to its current account ID.
|
||||
IndexFrozen { index: T::AccountIndex, who: T::AccountId },
|
||||
}
|
||||
|
||||
/// Old name generated by `decl_event`.
|
||||
|
||||
Reference in New Issue
Block a user