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 evmEvents for Better Code Quality #105

Open
zsystm opened this issue Sep 11, 2024 · 0 comments
Open

Refactor evmEvents for Better Code Quality #105

zsystm opened this issue Sep 11, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@zsystm
Copy link
Collaborator

zsystm commented Sep 11, 2024

Description and context

The current implementation of evmEvents contains multiple logical operations directly within the function, which should be separated into distinct functions.

  • Fetching logs from ethereum client
  • Converting those logs to EVMEvent objects
  • Verifying the converted events
  • Sorting the events

This approach limits testability, as it prevents writing tests for specific logic handled by evmEvents and increases complexity by combining too many responsibilities.

Suggested solution

Refactor by delegating separable logic into dedicated functions. For example, we can serpate the following logics to other functions.

  • Geth log conversion and verification
  • Sorting EVMEvents

Definition of done

#106 is merged

@zsystm zsystm added the enhancement New feature or request label Sep 11, 2024
@zsystm zsystm self-assigned this Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant