2

I wrote a piece of code that uses associated_token::mint and associated_token::authority and I passed the Token Program but did not pass the Associated Token Program. Considering All Accounts must be specified before any Instruction, I expected this to fail because the Associated Token Program was not passed but the Instruction was successful. Why is the Associated Token Program Account not necessary when using associated_token?

1 Answer 1

3

You need the Associated Token Program when creating an ATA on the Rust end, but don't need it just to validate an ATA.

So if the ATA was created earlier, or you create your ATAs on the client side, you don't need the Associated Token Program.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.