Skip to content

DirectTradesFetcher module (depends on #50, #51)#91

Draft
alastairong1 wants to merge 1 commit intomainfrom
alastair/direct-trades-fetcher
Draft

DirectTradesFetcher module (depends on #50, #51)#91
alastairong1 wants to merge 1 commit intomainfrom
alastair/direct-trades-fetcher

Conversation

@alastairong1
Copy link
Copy Markdown
Contributor

Summary

  • Adds DirectTradesFetcher — a shared SQLite connection that bypasses the library's per-query connection model
  • batch_fetch(): single SQL query for multiple order hashes (vs N individual queries)
  • fetch_taker_tx_hashes(): finds transactions where a given address was the taker
  • fetch_by_tx_hash(): finds all trades in a given transaction
  • Creates performance indexes on take_orders and vault_balance_changes tables
  • Handles Float hex parsing/negation in Rust instead of via custom SQLite functions

Dependencies

Test plan

  • cargo check passes (with deps)
  • Fetcher initializes correctly when raindex db exists
  • Batch queries return trades grouped by order hash
  • Performance indexes are created on first run

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 20, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9319913f-b842-4e74-ac4a-a4a01b7f4134

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch alastair/direct-trades-fetcher

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@alastairong1 alastairong1 requested a review from findolor April 28, 2026 19:20
@findolor findolor changed the base branch from main to graphite-base/91 April 30, 2026 11:47
@findolor findolor force-pushed the alastair/direct-trades-fetcher branch from 5ee92e5 to b1352d1 Compare April 30, 2026 11:47
@findolor findolor changed the base branch from graphite-base/91 to implement-trades-address April 30, 2026 11:47
Copy link
Copy Markdown
Collaborator

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add the label add-to-gt-merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@findolor findolor force-pushed the implement-trades-address branch from 0a05197 to 10c59f1 Compare April 30, 2026 11:55
@findolor findolor force-pushed the alastair/direct-trades-fetcher branch from b1352d1 to 5ee92e5 Compare April 30, 2026 11:55
@findolor findolor changed the base branch from implement-trades-address to main April 30, 2026 11:55
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.

2 participants