Skip to content
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

refactor: implemented base for new indexer event handling approach #590

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

hussedev
Copy link
Member

@hussedev hussedev commented Jul 15, 2024

In this PR we are setting a base for a new approach on how we handle events in the indexer, starting with ProjectCreated event of alloV1.

With this new approach we will have separated contract folders that will include the abi and the event handlers.
To retrieve the handler of an specific event we will use getEventHandler function that receives the contract and event names as arguments.

For now we are relying in this function to delegate event handling to the old approach if the function returns undefined,
this allows us to migrate event by event or contract by contract seamlessly, while in the future we will throw an error if it returns undefined.

indexer/abis/index.ts will be moved to indexer/contracts/abis.ts, in that way once the migration is done, when we want to include a new strategy, we will just include the folder with its abi and its handlers, and import the abi to indexer/contracts/abis.ts.

Closes BLU-119

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant