Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
proto: add extension trait for easier parsing of domain types (#4886)
## Describe your changes This allows creating domain types for each of the events, e.g. `EventBatchSwap`, and then doing `EventBatchSwap::try_from_event(&event)`, which makes the pindexer app views much more ergonomic, especially because we can avoid having to duplicate event parsing logic across views. In subsequent PRs, we should create domain types for each component. We can probably do this as needed, when we write app views touching particular components. ## Checklist before requesting a review - [x] If this code contains consensus-breaking changes, I have added the "consensus-breaking" label. Otherwise, I declare my belief that there are not consensus-breaking changes, for the following reason: > Just an internal refactor to events code, so doubly non breaking.
- Loading branch information