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

Index scheduled transfer events. #324

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

td202
Copy link
Collaborator

@td202 td202 commented Dec 6, 2024

Purpose

Relates to: #246

This implements indexing for scheduled transfers. The actual queries are not yet implemented.

Changes

  • Add scheduled_releases table.
  • Add index by (account_index, release_time) for efficiently querying the pending releases on a particular account.
  • Add handling for TransferredWithSchedule and TransferredWithScheduleAndMemo events to index the scheduled releases appropriately.

Checklist

  • My code follows the style of this project.
  • The code compiles without warnings.
  • I have performed a self-review of the changes.
  • I have documented my code, in particular the intent of the
    hard-to-understand areas.
  • (If necessary) I have updated the CHANGELOG.

@td202 td202 requested review from limemloh and DOBEN and removed request for limemloh December 6, 2024 16:08
Copy link
Contributor

@limemloh limemloh left a comment

Choose a reason for hiding this comment

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

Looks good to me, but we need some logic for these scheduled_releases to be resolved and update the account balances accordingly.
We can introduce that in a separate PR.

backend-rust/migrations/0003_release_schedule.up.sql Outdated Show resolved Hide resolved
backend-rust/migrations/0003_release_schedule.up.sql Outdated Show resolved Hide resolved
backend-rust/src/indexer.rs Outdated Show resolved Hide resolved
backend-rust/src/indexer.rs Outdated Show resolved Hide resolved
@limemloh limemloh requested review from DOBEN and lassemand December 18, 2024 11:29
Copy link
Member

@DOBEN DOBEN left a comment

Choose a reason for hiding this comment

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

LGTM

backend-rust/src/graphql_api.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@lassemand lassemand left a comment

Choose a reason for hiding this comment

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

Besides

#324 (comment)

it looks good to me.

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.

4 participants