All Questions
13 questions
1
vote
1
answer
55
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 ...
0
votes
1
answer
76
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 ...
1
vote
1
answer
58
views
Websocket version of getProgramAccounts
Is there a WebSocket version of getProgramAccounts that allows me to fetch PDAs with supplied seeds?
2
votes
1
answer
37
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 ...
2
votes
1
answer
178
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: ...
2
votes
1
answer
49
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,
...
0
votes
1
answer
74
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 !
1
vote
2
answers
567
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,
...
3
votes
1
answer
4k
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 ...
2
votes
1
answer
376
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 ...
4
votes
2
answers
589
views
How to fetch all PDAs owned by a program
Is there a way to fetch all PDA's owned by a Solana program?
0
votes
2
answers
262
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::...
1
vote
2
answers
209
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: ...