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

feat: swaps indexing #4776

Merged

Conversation

vacekj
Copy link
Contributor

@vacekj vacekj commented Jul 29, 2024

Describe your changes

implements indexing of swaps to satisfy the /api/swaps endpoint

  • There's also an event for Swap, so we should name the event in the code to BatchSwap to avoid confusion.
  • We probably want to record some more information in the swap table, like having the trading pair there, the total amount of inputs and outputs for each asset, the unfilled amounts, et.c

Issue ticket number and link

fixes #4744

Checklist before requesting a review

  • If this code contains consensus-breaking changes, I have added the "consensus-breaking" label. Otherwise, I declare my belief that there are not consensus-breaking changes, for the following reason:

    Indexer-only changes

Copy link
Contributor

@cronokirby cronokirby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably want to record some more information in the swap table, like having the trading pair their, the total amount of inputs and outputs for each asset, the unfilled amounts, et.c

@cronokirby
Copy link
Contributor

There's also an event for Swap, so we should name the event in the code to BatchSwap to avoid confusion.

@vacekj vacekj force-pushed the 4744-pindexer-dex-implement-apiswaps-related-events-and-tables branch from 477964a to 6877a7f Compare July 30, 2024 16:43
@vacekj vacekj requested a review from cronokirby July 30, 2024 18:25
@zmanian
Copy link
Contributor

zmanian commented Aug 6, 2024

I believe this PR would unlock using the native indexer to get things like 24 hour swap volumes which would be really helpful to go to market efforts.

How can I support getting it merged?

@cronokirby cronokirby force-pushed the 4744-pindexer-dex-implement-apiswaps-related-events-and-tables branch from 7615b72 to c94ccd5 Compare August 9, 2024 23:59
@vacekj vacekj merged commit be0ef35 into main Aug 12, 2024
13 checks passed
@vacekj vacekj deleted the 4744-pindexer-dex-implement-apiswaps-related-events-and-tables branch August 12, 2024 15:43
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.

pindexer: dex: implement /api/swaps related events and tables
3 participants