Add reallocation functionality to transfer process - #1659
Merged
Conversation
Coverage Report •
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Member
Author
|
Additionally fixed the API docs schema: a0bda94 |
YoshihitoAso
approved these changes
Jul 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 Description
This pull request introduces a new "Reallocation" transfer event type to the system, updates related models and schemas, and adds functionality to detect and handle this event during batch processing. It also includes tests to validate the new functionality.
✅ Related Issues
🔄 Changes
Enhancements to Transfer Event Types
REALLOCATIONevent type to theIDXTransferSourceEventTypeandTransferSourceEventenums inapp/model/db/idx_transfer.pyandapp/model/schema/token.py. [1] [2]TransferHistoryandTransferHistoriesResponsemodels to include the newREALLOCATIONevent type. [1] [2]Batch Processing Updates
batch/indexer_Transfer.pyto detect "Reallocation" events by checking transaction data for a specific marker (c0ffee00) and added logic to process these events accordingly.HexBytesimport to support transaction data handling.Testing Enhancements
reallocate_share_tokenintests/contract_modules.pyto simulate "Reallocation" events.tests/batch/indexer_Transfer_test.pyto include tests for "Reallocation" events, ensuring proper detection, processing, and database insertion. [1] [2] [3] [4] [5] [6] [7]📌 Checklist