Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Update template pallet to latest enum syntax (#12552)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sacha Lansky authored Oct 24, 2022
1 parent 3d6043a commit d695386
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/node-template/pallets/template/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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(())
}
Expand Down

0 comments on commit d695386

Please sign in to comment.