Skip to main content

Questions tagged [remaining-accounts]

Filter by
Sorted by
Tagged with
0 votes
1 answer
253 views

Can your main wallet get drained if somebody knows the seed phrase of an extra account/wallet you created?

My entire Phantom wallet got drained a few days ago. The person who stole from me knew the seed phrase of an extra wallet I created in the Phantom wallet app (with no money on it), but he stole all ...
user25489's user avatar
1 vote
0 answers
119 views

Remaining Accounts lifetime

I have problem of borrowing accounts mutably from remaining accounts. Not exactly how to use AccountInfo, as error says that accounts does not live long enough. I am using Anchor 0.29, Solana-Program ...
Vladimir Demidov's user avatar
3 votes
2 answers
116 views

CpiContext with_remaining_accounts is not working because of lifetimes

I'm writing a Solana program with Anchor 0.29.0 and Solana 1.18.9. I want to invoke through CPI another program. It all worked well until I realised that, the called program needs the remaining ...
dangow3tech's user avatar
1 vote
1 answer
94 views

How to transfer SOL to remaining_accounts from the signer account

I am trying to transfer 0.1 SOL from the signer account to all the accounts passed in the remaining_accounts to the function call. Here's a breakdown of the code. anchor pub fn purchase_package(...
Dhruv Godambe's user avatar
0 votes
0 answers
57 views

Anchor 28 to 29 ctx.remaining_accounts lifetime

In Anchor 28 we had a function that read remaining_accounts in as token accounts: pub fn some_fun<'info>( &mut self, // the Context remaining_accounts: &[AccountInfo<'...
Whiteseal's user avatar
  • 3,597
1 vote
0 answers
32 views

Lifetime error using remaining accounts and magicblock session token macro

I am facing an error when using lifetimes with magicblock's session_auth_or macro in my instruction Here is a sample of the instructions #[session_auth_or( ctx.accounts.protocol_state....
Jimii's user avatar
  • 7,682