Skip to content

Comments

[TA-4404]: Fix indexer token precompile sync#1

Closed
banasa44 wants to merge 17 commits intoxrplevm:masterfrom
banasa44:feat/coin-token-sync
Closed

[TA-4404]: Fix indexer token precompile sync#1
banasa44 wants to merge 17 commits intoxrplevm:masterfrom
banasa44:feat/coin-token-sync

Conversation

@banasa44
Copy link

[TA-4404]: Fix indexer token precompile sync

Motivation

Allow native‐token transfers to update both coin and token balances bidirectionally, ensuring the native token’s value is always reflected in both the coin and token balance tables.

Changelog

Enhancements

  • Coin‐balance import now automatically emits matching token‐balance entries for the native token
  • Token‐balance import continues to emit matching coin‐balance entries for the native token
  • Added integration tests covering both directions (coin→token and token→coin) and block‐number ordering

Bug Fixes

  • Fixed missing token‐balance rows when importing native coin balances
  • Ensured the address record’s fetched_coin_balance and fetched_coin_balance_block_number are updated via balance_changeset on token imports

Incompatible Changes

  • None

Upgrading

No manual steps required; existing data and migrations remain valid

Checklist for your Pull Request (PR)

  • If I added new functionality, I added tests covering it
  • If I fixed a bug, I added a regression test to prevent the bug from reappearing
  • I checked whether I should update the docs and did so by submitting a PR to the docs repo
  • If I added/changed/removed ENV var, I submitted a PR to the docs repo and updated the env var list
  • If I added new DB indices, I checked that they are not redundant
  • If I added/removed chain type, I modified the CI matrix and PR labels accordingly

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