Skip to main content

All Questions

Tagged with
1 vote
1 answer
45 views

Account creation on Solana

Suppose I have a PDA address that hasn't been initialized yet and I send SOL to it, Am I correct in assuming that this account will exist? Who will have control over this account? Will it still be by ...
Jimii's user avatar
  • 3,907
0 votes
1 answer
25 views

Best practice design PDA in solana

When developing contract in solana, I had seen some example (include example in solana cook book - https://solanacookbook.com/gaming/store-sol-in-pda.html#tiny-adventure-anchor-program-part-two) had ...
Nhat Minh Nguyen Quang's user avatar
1 vote
1 answer
36 views

Websocket version of getProgramAccounts

Is there a WebSocket version of getProgramAccounts that allows me to fetch PDAs with supplied seeds?
kekti's user avatar
  • 55
2 votes
1 answer
36 views

Relational PDA design through seeds

I have somewhat what seems to be a fairly simple question. Lets assume we are building a Todo list where everything is public. And lets say a user will be able to create a new Task and that task will ...
kekti's user avatar
  • 55
2 votes
1 answer
130 views

Deserialise getAccountInfo data from Rust rpcclient for a PDA from drift protocol

Basically I have the following code in devnet. I want to call getAccountInfo to get some account information. I have a PDA: JD71QyQpAJvoyq4p6mfwyaw4rY9qaDLk4CQpHeuPSpEK created by the programId: ...
panicKing's user avatar
2 votes
1 answer
48 views

How is the PDA created for this program?

in this code example: use borsh::{BorshDeserialize, BorshSerialize}; use solana_program::{ account_info::{next_account_info, AccountInfo}, declare_id, entrypoint::ProgramResult, msg, ...
FluffyMuffin47's user avatar
0 votes
1 answer
51 views

How can i enter a Vec<PubKey> in the solana play ground?

I want to enter a Vec as input But i can't do that i don't know what is wrong !
pooria sarkhan's user avatar
1 vote
2 answers
418 views

Is there a way to overwrite data in an account?

I have a PDA account, and I am trying to change the data format in the account. from this #[account] pub dummy_data { x_point: f32 } to #[account] pub dummy_data { x_point: u64, y_point: f64, ...
Jimii's user avatar
  • 3,907
2 votes
1 answer
3k views

Error Message: A seeds constraint was violated

Here is my code #[program] pub mod anchor_code { use super::*; pub fn new_wallet(ctx: Context<WalletInfo>) -> Result<()>{ Ok(()) } } #[derive(Accounts)] pub struct ...
Pixeled's user avatar
  • 476
2 votes
1 answer
299 views

Getting error when using bump with a target

fairly new to Solana/anchor dev here. When i anchor build i get this error: thread 'main' panicked at 'Code not parseable: Error("bump targets should not be provided with init. Please use bump ...
ZeRo's user avatar
  • 33
4 votes
2 answers
451 views

How to fetch all PDAs owned by a program

Is there a way to fetch all PDA's owned by a Solana program?
incog's user avatar
  • 567
0 votes
2 answers
210 views

How do I use PDA account to pay for new PDA account

I am struggling to successfully create a PDA account (pdaUSER) paid for by another PDA account. I am doing it like this, and it does not work: invoke_signed( &system_instruction::...
Blair Munro's user avatar
1 vote
2 answers
128 views

Using Anchor, how to have PDA created without the PDA info being sent by the client?

Program: #[derive(Accounts)] pub struct Transact<'info> { #[account(init, payer=payer, space= 8 + 1 + 4, seeds=[b"transaction", payer.key.as_ref()], bump)] pub transaction: ...
DevelopingJoku's user avatar