Skip to content

Upgrade/cleanup/refactor plan #341

Description

@rouzwelt

Motivation

ArbBot was originally written in javascript and over time, as new features and updates have been added to the codebase, older code and free functions have accumulated in various files, leading to a less organized and harder-to-maintain project structure and then adding to all of that, it was directly ported to typescript. Besides some very recent features/updates, this has resulted in free function all over the place, generic utility files, unclear module boundaries and in general poor code structure and standard.
To ensure the long-term health, scalability, and maintainability of the project, an upgrade and refactor is necessary. The goal is to reorganize the code into clear, purpose-driven modules, improve test coverage and reliability, and establish a well organized and extensible architecture that enables easier maintainability and extendability and also in general, establish acceptable standard for the repo and codebase.

Goals

  • Establish a clear, modular architecture, by relocating free functions into appropriate modules and under corresponding newly added types.
  • Remove generic utils files by distributing their contents to relevant modules.
  • Improve code documentation and comments, and add any mising ones.
  • Transition all unit tests to use vitest and cover any missing one and ensure all code paths are tested.
  • Ensure all changes in PRs are incremental, non-breaking and reasonably sized to speed up the review and approval process (that means all PRs must pass all CIs (unit and e2e tests) and preview deployment).

PR Tracking List

  • - general update #339 - A general base update for upcoming PRs that include updating: flake, node version, Dockerfile node version, adding vitest to dev deps and rename from arb-bot to rain-solver in docs
  • - state module #340 - Introducing state module, that keeps state of the app during runtime and also relocating some relevant functionalities to this module
  • - logger module #342 - introduces logger module, which hosts all functionalities needed to instrument RainSolver for open telemetry
  • - subgraph module #343 - introduces subgraph module with SubgraphManager class that contains all the functionalities needed for interacting with subgraphs and getting order details and other relevant info

new PRs will be added to the track list as they come

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationenhancementNew feature or requestgeneral updateA general update to the repoupdateUpdate Inner Logic

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions