-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New event driven workflow for chain events #9745
Comments
I agree that the event mapping is overkill and the entire process of adding events could be largely simplified if we emit ABI-parsed events and not do any additional mapping to custom internal events before emitting to the Outbox. Mapping to some internal structure reduces flexibility - each time you need a new data point you need to modify the schema and the mappers or in more extreme cases you need to modify the entire mapping pattern (e.g. adding The event system is designed to route according to the abstractions we have. That is, event names === routing keys and policy names === queues. If we want to remove mapping and simplify adding new chain event processing we need to go back to using
A downside here is that chain event policies now only hold a single
So to recap there are a couple separate streams of work we can ticket here:
|
Another note from my previous comment: we will soon have policies that include handlers for chain events and "regular" events (ThreadCreated). For example, we will need to add chain-events (contents, referrals, etc) to the Notifications policy. This may cause issues if we want types/handlers derived from event signatures. |
We will create a generic chain-event zod schema which we extend with the event names from the event registry (dynamically?). Consumers will use the https://abitype.dev/api/zod package/utils to parse events. |
The work that arose from this discussion is detailed in #9895. |
Description
The way we handle contest events is not abstract enough to handle all events. Also it adds coupling with the eventMappers. A new proposal for the event handling is as follows:
( Note that these contractAddresses will just reference the hardcoded contractAddresses variables we have, to ensure a single source of truth)
With this proposal, we will accomplish the following:
The text was updated successfully, but these errors were encountered: