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

Migrate Pallets to Named Events #5422

Closed
shawntabrizi opened this issue Apr 29, 2022 · 1 comment · Fixed by #5423 or paritytech/cumulus#1260
Closed

Migrate Pallets to Named Events #5422

shawntabrizi opened this issue Apr 29, 2022 · 1 comment · Fixed by #5423 or paritytech/cumulus#1260

Comments

@shawntabrizi
Copy link
Member

shawntabrizi commented Apr 29, 2022

The #[pallet::event] macro supports named structs for events, which provides better UX to users listening and accessing events.

To migrate the events you need to:

  1. Search for #[pallet::event] enum definitions
  2. Switch events from unnamed tuples to named structs
  3. Clean up comments which manually labeled the unnamed tuple elements
  4. Fix all usage of the new struct
  5. Format, compile, and run tests using features=runtime-benchmarks

Should be non-breaking and backwards compatible.

See an example: #5423

@shawntabrizi
Copy link
Member Author

still more to do here :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant