mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 11:07:56 +00:00
Update template pallet to latest enum syntax (#12552)
This commit is contained in:
@@ -45,7 +45,7 @@ pub mod pallet {
|
||||
pub enum Event<T: Config> {
|
||||
/// Event documentation should end with an array that provides descriptive names for event
|
||||
/// parameters. [something, who]
|
||||
SomethingStored(u32, T::AccountId),
|
||||
SomethingStored { something: u32, who: T::AccountId },
|
||||
}
|
||||
|
||||
// Errors inform users that something went wrong.
|
||||
@@ -75,7 +75,7 @@ pub mod pallet {
|
||||
<Something<T>>::put(something);
|
||||
|
||||
// Emit an event.
|
||||
Self::deposit_event(Event::SomethingStored(something, who));
|
||||
Self::deposit_event(Event::SomethingStored { something, who });
|
||||
// Return a successful DispatchResultWithPostInfo
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user