trident icon indicating copy to clipboard operation
trident copied to clipboard

🐛 [BUG] - Trident doesn't support Token2022 ATAs

Open IaroslavMazur opened this issue 4 months ago • 2 comments

Description

When attempting to create ATAs for a Token2022 mint, Trident fails with incorrect program id for instruction at GetAccountDataSize.

Observed logs (ATA → Token-2022 → GetAccountDataSize → IncorrectProgramId):

Program ATokenGPvbd... invoke [2]
Program log: Create
Program TokenzQdBNbL... invoke [3]
Program log: Instruction: GetAccountDataSize
Program log: Error: IncorrectProgramId
Program TokenzQdBNbL... failed: incorrect program id for instruction
Program ATokenGPvbd... failed: incorrect program id for instruction

This happens when the ATA is created with associated_token::token_program = Token2022 (program id TokenzQdBNbL...). The ATokenGPvbd CPI appears to use classic SPL Token ix encoding against the Token2022 program id, which rejects it.

Note: creating a regular SPL ATA works as expected.

Why this matters

Many programs need to interoperate with both SPL and Token2022. Fuzzing and local execution environments should accurately emulate both to catch real integration issues.

Reproduction steps

1. Before running a Fuzzing flow, create a Token2022 token mint via `...get_or_create_mint_account()`
2. Then, in the `set_accounts` `InstructionHook`, try to create a Token2022 ATA via `...get_or_create_token_account()`
3. Observe the aforementioned issue

OS

Mac

IaroslavMazur avatar Oct 06 '25 16:10 IaroslavMazur

The whole support for token, token 2022 program and creating associated token accounts will be much smoother in next release!

lukacan avatar Oct 24 '25 07:10 lukacan

The whole support for token, token 2022 program and creating associated token accounts will be much smoother in next release!

The next release can't come fast enough! 👀

IaroslavMazur avatar Oct 24 '25 09:10 IaroslavMazur