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

indexer extension #32

Open
wants to merge 11 commits into
base: rain-fork
Choose a base branch
from
Open

indexer extension #32

wants to merge 11 commits into from

Conversation

rouzwelt
Copy link
Collaborator

@rouzwelt rouzwelt commented Jan 14, 2025

Motivation

resolves #28

Solution

  • create a new folder called rain to include all extension files.
  • AlgebraV1Base.ts was already added by us to support algebra based dexes, now it should be moved to newly added rain folder, this equates to 90%+ of the deletions.
  • create RainUniswapV2Base.ts and RainUniswapV3Base.ts files in rain folder as an intermediate class between dexes and univ2/3 base classes so some of the base methods can be overridden, these 2 files will inherit from UniswapV2Base.ts and UniswapV3Base.ts which are the original/base files/classes.
  • We need to update all the dexes classes in liquidity-providers folder to now inherit from the RainUniswapV2Base.ts and RainUniswapV3Base.ts, so the overrides come into effect when each dex is used.
  • Create RainDataFecther in rain folder, this will inherit from original DataFetcher class, but overriding a couple fo its methods to allow for indexer functionality
  • add tests for indexer functionalities

Checks

By submitting this for review, I'm confirming I've done the following:

  • made this PR as small as possible
  • unit-tested any new functionality
  • linked any relevant issues or PRs
  • included screenshots (if this involves a front-end change)

@rouzwelt rouzwelt requested a review from hardyjosh January 15, 2025 04:07
@rouzwelt rouzwelt marked this pull request as ready for review January 15, 2025 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature Added a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

provide functionality for router to be able to work like an indexer
1 participant