Skip to main content

All Questions

Tagged with
8 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2 votes
0 answers
432 views

Setting account values using Zero Copy PDA on Anchor

I've created a 2D array (10x10) that using a PDA and zero_copy. Here is how I set it up. pub fn setBoard(ctx: Context<SetBoard>, increment: u64) -> Result<()> { let mut board = ...
AceGravity's user avatar
1 vote
1 answer
120 views

A seeds Constraint was violated

Facing error when calling stake function. Can someone explain what am I missing? I'm running this on Solana playground and calling stake with a random amount and selecting the current wallet for ...
ProgrammerForFun's user avatar
0 votes
0 answers
36 views

How to Properly Interact with Pool Token Account in a Liquidity Pool Program using Anchor?

I'm working on a Solana program using Anchor that implements a liquidity pool with a loan feature. The pool is initialized and funded by users (liquidity providers) who deposit assets into the pool. ...
Suhas A's user avatar
0 votes
1 answer
72 views

How to pass multiple contexts to a single function?

I'm creating a staking contract and one of the functions that takes in the deposits, I'm using a struct in the context of transferring SPL, however, to keep the records for the same I need to create ...
ProgrammerForFun's user avatar
0 votes
1 answer
113 views

How can I send to multiple wallets from a single PDA in a single transaction?

Very new at rust and Solana development, hoping to get some advice. I am creating some blockchain functionality for a betting system. Players will bet on the outcome of a certain event by sending the ...
galilei's user avatar
0 votes
1 answer
87 views

How transfer SPL tokens from PDA to usual account in clean RUST?

I have PDA created in JS this way: let [pda, bump] = await PublicKey.findProgramAddress( [baseAccount.publicKey.toBuffer(), Buffer.from('1', 'utf8')], programIdPublicKey ); baseAccount is a ...
Maksim Tolstikov's user avatar
0 votes
1 answer
55 views

Invoke Signed Mint To Instruction

if let Err(error) = invoke_signed( &SPLIX::mint_to_checked( token_program_account.key, contribution_mint_account.key, contribution_token_account.key, ...
Muhammad Ali's user avatar
0 votes
1 answer
304 views

Failed to reallocate account data

I want to create a PDA account to store data about participants' wallet addresses and their deposit amounts. I have used a PDA account to store this information. It works fine when I set the array ...
Bobz's user avatar
  • 574