Skip to content

Add v2 token-transfer crates with migration support#2

Open
XuyangSong wants to merge 2 commits into
mainfrom
xuyang/migration_v2
Open

Add v2 token-transfer crates with migration support#2
XuyangSong wants to merge 2 commits into
mainfrom
xuyang/migration_v2

Conversation

@XuyangSong

Copy link
Copy Markdown
Collaborator

Summary

Adds v2 of the AnomaPay Solana token-transfer resource: the same wrap/unwrap logic as v1 plus a new Migrate flow for moving a v1 resource into v2. The three v2 crates were ported from the ERC20 resource and adapted to Solana, mirroring their v1 counterparts in this repo.

Follow-ups before deploying v2

The migrate forwarder op byte, instruction-data layout, and account count (OP_MIGRATE, MIGRATE_FORWARDER_NUM_ACCOUNTS) are provisional and must be reconciled with the deployed v2 SPL token forwarder.

@XuyangSong XuyangSong requested a review from AHartNtkn June 26, 2026 13:41
@XuyangSong XuyangSong self-assigned this Jun 26, 2026

@AHartNtkn AHartNtkn left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think this is fine enough to approve. The only real problem I see is most of the tests for v1 (wrap/unwrap/persistent negative tests and overflow unit tests) don't exist for v2. Since v2 is a separate implementation, they are untested. I don't expect any actual failure here; but it is a test suite problem. You may also want to consider moving encode_migrate_forwarder_input to the anoma-pa-solana-client crate to be consistent with encode_wrap_forwarder_input and encode_unwrap_forwarder_input.

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