From 2426c0766dfd2073e8fbb792e47ea5ab00c22649 Mon Sep 17 00:00:00 2001 From: brewmaster012 <88689859+brewmaster012@users.noreply.github.com> Date: Mon, 7 Oct 2024 10:02:07 -0500 Subject: [PATCH] add comment on pda_ata --- programs/protocol-contracts-solana/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/programs/protocol-contracts-solana/src/lib.rs b/programs/protocol-contracts-solana/src/lib.rs index 5e38f66..411aaf3 100644 --- a/programs/protocol-contracts-solana/src/lib.rs +++ b/programs/protocol-contracts-solana/src/lib.rs @@ -273,6 +273,9 @@ pub mod gateway { return err!(Errors::TSSAuthenticationFailed); } + // associated token address (ATA) of the program PDA + // the PDA is the "wallet" (owner) of the token account + // the token is stored in ATA account owned by the PDA let pda_ata = get_associated_token_address(&pda.key(), &ctx.accounts.mint_account.key()); require!( pda_ata == ctx.accounts.pda_ata.to_account_info().key(),