-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: multiple tokenPoolPda
accounts
#1407
Conversation
tokenPoolPda
accounts
93ebd77
to
4a44eaa
Compare
16e0246
to
f80ecb9
Compare
f80ecb9
to
fe1308a
Compare
f0f8785
to
c385d63
Compare
@@ -206,14 +221,20 @@ pub mod sdk { | |||
pub burn_amount: u64, | |||
pub signer_is_delegate: bool, | |||
pub is_token_22: bool, | |||
pub token_pool_bump: u8, | |||
pub additonal_pool_accounts: Vec<Pubkey>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo, should be additional_pool_accounts
) -> ( | ||
HashMap<Pubkey, usize>, | ||
CompressedTokenInstructionDataTransfer, | ||
) { | ||
let mut additonal_accounts = Vec::new(); | ||
additonal_accounts.extend_from_slice(accounts); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same, typo
* feat: multiple token pool accounts * fix: lint * chore: unify execute token program instruction with multiple token pool accounts --------- Co-authored-by: ananas-block <[email protected]> chore: fix additonal typo (#1426) fix: invoke_token_program_with_multiple_token_pool_accounts (#1427)
* feat: multiple token pool accounts * fix: lint * chore: unify execute token program instruction with multiple token pool accounts --------- Co-authored-by: ananas-block <[email protected]> chore: fix additonal typo (#1426) fix: invoke_token_program_with_multiple_token_pool_accounts (#1427) chore: unify is_valid_token_pool_pda in compress spl tokens & mint to, fix comments in invoke_token_program_with_multiple_token_pool_accounts (#1429)
* feat: multiple token pool accounts * fix: lint * chore: unify execute token program instruction with multiple token pool accounts --------- Co-authored-by: ananas-block <[email protected]>
* feat: multiple token pool accounts * fix: lint * chore: unify execute token program instruction with multiple token pool accounts --------- Co-authored-by: ananas-block <[email protected]> chore: fix additonal typo (#1426) fix: invoke_token_program_with_multiple_token_pool_accounts (#1427) chore: unify is_valid_token_pool_pda in compress spl tokens & mint to, fix comments in invoke_token_program_with_multiple_token_pool_accounts (#1429) fix cherry-pick
* feat: multiple `tokenPoolPda` accounts (#1407) * feat: multiple token pool accounts * fix: lint * chore: unify execute token program instruction with multiple token pool accounts --------- Co-authored-by: ananas-block <[email protected]> chore: fix additonal typo (#1426) fix: invoke_token_program_with_multiple_token_pool_accounts (#1427) chore: unify is_valid_token_pool_pda in compress spl tokens & mint to, fix comments in invoke_token_program_with_multiple_token_pool_accounts (#1429) * rename is_valid_token_pool_pda, check_spl_token_pool_derviation, _with_bump --------- Co-authored-by: ananas-block <[email protected]> Co-authored-by: Swenschaeferjohann <[email protected]>
/// CHECK: (seed constraint) is derived from mint account. | ||
#[account(mut, seeds = [POOL_SEED, mint.key().as_ref()], bump)] | ||
pub token_pool_pda: InterfaceAccount<'info, TokenAccount>, | ||
/// CHECK: in burn_spl_from_pool_pda. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a check is not really being done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue:
tokenPoolPda
account to be created per token mintSolution:
tokenPoolPda
accounts per mintChanges:
add_token_pool
spl_token_pool_derivation
with a bump to derive multiple accountstokenPoolPda
is insufficient to support the decompression amount, loop over remaining accounts starting from index 0 and decompress. Loop until the complete decompression amount has been decompressed.