#[account(init,
payer = funder,
token::mint = token_mint_a,
token::authority = authority)]
pub token_vault_a: Box<Account<'info, TokenAccount>>,
#[account(init,
payer = admin,
associated_token::mint = token_a_mint,
associated_token::authority = swap_account,
)]
pub token_a_account: Box<Account<'info, TokenAccount>>,
Add a comment
|
1 Answer
The associated_token
accounts are deterministic and only 1 exist per pair (derived from the wallet PublicKey and token mint PublicKey). You can't use Aux accounts in this context.
With the token::mint
and token::authority
context you can use any TokenAccount
matching that mint and authority. This way you can also read and create Auxilarily or non-associated token accounts.
-
By using above steps it's giving an error (
rent
value not found ) Commented Aug 3, 2022 at 9:29 -