Skip to main content

Questions tagged [pda]

Filter by
Sorted by
Tagged with
2 votes
2 answers
139 views

In my contract, it is: use anchor_lang::prelude::*; #[account] #[derive(InitSpace)] pub struct Proposal { pub author: Pubkey, #[max_len(32)] pub evidence: String, pub ...
Amiya Behera's user avatar
1 vote
1 answer
33 views

Desc When an account uses both init and seeds constraints in Anchor, the generated IDL omits the pda field that should describe the seed derivation. This makes it impossible for client developers to ...
Takshak Mudgal's user avatar
1 vote
2 answers
63 views

I'm building a survey system that needs to store up to 20,000 encrypted responses (~5.8MB total). Each response is 288 bytes (256 encrypted data + 32 byte commitment). What I want: Pay rent ...
MaxLuong's user avatar
2 votes
1 answer
54 views

My program is creating PDAs. I want to retrieve all of them. What would be the usual method if there is one: getProgramAccounts + filter + set up my own RPC node (or use third party) listen to the ...
Parchemin Parchemin's user avatar
1 vote
1 answer
56 views

I'm aware that storing the bump and using it for derivation saves CU. However, we have to pay rent costs for storing the bump, correct? Which leads me to the question, when is it worth it to store the ...
Eddie Spaghetti's user avatar
0 votes
2 answers
42 views

error: custom attribute panicked --> programs/token_launchpad/src/lib.rs:16:1 | 16 | #[program] | ^^^^^^^^^^ | = help: message: Safety checks failed: /mnt/c/Users/...
Vasil Makar's user avatar
0 votes
1 answer
223 views

I'm parsing Pump.fun migrate transactions with 24 accounts and need to extract the token mint and AMM pool addresses. I've tried multiple methods but getting wrong addresses: Method 1: Direct ...
Jeffrey's user avatar
3 votes
1 answer
110 views

#[derive(Accounts)] pub struct Withdraw<'info> { // TODO: Add required accounts and constraints #[account(mut)] pub vault_authority: Signer<'info>, #[account(mut,seeds=[b&...
Ayush Kaushik's user avatar
2 votes
1 answer
110 views

I minted 1B coin tokens with cointool app. I am not a programmer and that is why I used the app. I received them into a Phantom wallet. I sent 10 test tokens to a solflare wallet and received them, ...
ProBooksbyGeorgeBlackJr's user avatar
2 votes
1 answer
58 views

I create a PDA account using create_challenge function, join the challenge using join_challenge works fine, and then I call update function and get PDA mismatch error error error: SendTransactionError:...
Mankey's user avatar
  • 33
4 votes
1 answer
261 views

Before closing a program, I want to know all its PDAs so I can transfer funds before closing it. What's the best way to do it?
Zidong's user avatar
  • 183
1 vote
2 answers
87 views

Solana’s CLMM pools using PDAs and NFTs can lock liquidity in a way that is immutable— there’s no private key, no authority, no backdoor. It’s rock-solid. Yet many scanners (like Jupiter, Raydium, ...
Acke's user avatar
  • 11
1 vote
1 answer
62 views

I'm working on an app that allows users to create and join pools where they can contribute SOL (or any token), and the contributed SOL can be traded by the pool admin (pool admin can swap SOL for USDC,...
Franklin Ikeh's user avatar
0 votes
1 answer
36 views

So I updated my program and then ran into the issue where the new program could no longer deserialize the old PDA data, since now I have a few more option fields and one I've removed as well. I do ...
xorn's user avatar
  • 133
0 votes
2 answers
75 views

When I try to create a PDA account on the program side, I get an error. I seem to be passing all the required accounts with the correct read-only/signed permissions, but this error still occurs: Error:...
Rodion's user avatar
  • 1
0 votes
1 answer
50 views

Error: AnchorError thrown in programs/system/src/invoke_cpi/verify_signer.rs:58. Error Code: CpiSignerCheckFailed. Error Number: 6002. Er ror Message: Cpi signer check failed. code - https://gist....
Thrishank 3410's user avatar
1 vote
2 answers
65 views

I want to create a pda account from my program, but I am stuck with pda account generating mismatch. this is my frontend test.ts code const [groupPda, bump] = anchor.web3.PublicKey....
白樂褀's user avatar
4 votes
2 answers
143 views

How to derive a PDA address using the new solana kit library. PublicKey.findProgramAddress( [seed, seed], programId );
Jimii's user avatar
  • 13.2k
1 vote
0 answers
30 views

I have no experience in ZK can anyone explain what these function params are ? proof: ValidityProof, address_merkle_context: PackedAddressMerkleContext, output_merkle_tree_index: u8, use light_sdk::{ ...
Thrishank 3410's user avatar
1 vote
1 answer
34 views

In Solana programs, it’s common to use PDAs whose seeds come entirely from on-chain data — no user input involved. Since the program has access to all required seeds, it seems like it could simply ...
Iaroslav's user avatar
  • 303
0 votes
1 answer
50 views

Is it possible to invoke the advanceNonce instruction using an off-curve PDA signature? I would like a Solana program to have nonce Authority of a nonce account. Then the first instruction would ...
Anthony Anderson's user avatar
0 votes
1 answer
1k views

I’m developing a script to perform manual buy and sell transactions on Pump.fun’s bonding curve (program ID: 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P) using the Solana blockchain. I’m struggling to ...
M.M Umber's user avatar
0 votes
2 answers
50 views

I'm new developing on Anchor. I have to know where is more common or best practices derived a PDA like the following. I have a Event account with an collection_mint PDA and anyone can mint NFTs inside ...
Francisco Rappazzini's user avatar
2 votes
2 answers
69 views

I'm building a Solana program where I want a Program Derived Address (PDA) to receive exactly a fixed amount of SOL — no more and no less. For example, the PDA should receive exactly 1 SOL. If someone ...
Cadalt's user avatar
  • 33
0 votes
1 answer
99 views

I’m trying to create a PDA-owned Token-2022 token account (aka a “vault”) to use in a vesting smart contract. I successfully did this two weeks ago, and I’m fairly certain I used spl-token-cli at the ...
SirOso's user avatar
  • 11
0 votes
1 answer
45 views

A couple of weeks ago, I was able to create a PDA-owned Token-2022 token account (a vault for a vesting contract). I believe I used spl-token-cli at the time. Now, I’m trying to repeat this, and every ...
SirOso's user avatar
  • 11
0 votes
1 answer
22 views

Contract Below is the voting contract from the BootCamp #![allow(clippy::result_large_err)] use std::process::Command; use anchor_lang::prelude::*; // declare_id!("...
Harshal Khobragade's user avatar
2 votes
1 answer
41 views

In my program, users can create token mint derived from a seed and an argument input: #[account( init, seeds = [ crate::USER_TOKEN_MINT_SEED.as_bytes(), user_input_seed.as_bytes()...
Zidong's user avatar
  • 183
2 votes
1 answer
216 views

Trying token example from https://www.anchor-lang.com/docs/tokens/basics/mint-tokens, I get Error processing Instruction 0: Provided owner is not allowed, for the MintTokens instruction, when I run ...
avalez's user avatar
  • 159
1 vote
1 answer
114 views

I am working on a Solana program using Anchor that allows users to track their "hops." The program creates a Program Derived Address (PDA) for each user based on their public key. However, ...
shae's user avatar
  • 13
1 vote
1 answer
39 views

I'm building a liquidity pool program with Anchor on Solana. I derive each pool's PDA using the token mint accounts as seeds, and I have two separate instructions: one (initialize_pda) that creates ...
Daktic's user avatar
  • 21
0 votes
1 answer
42 views

I'm building a password manager on Solana where users can store encrypted credentials on-chain while keeping metadata (site, username, etc.) in a database. Right now, I’m deciding between two storage ...
Joshua W's user avatar
0 votes
0 answers
30 views

Context: For Solana smart contract development, we normally store state in PDA because the program is stateless. eg. For ERC20 token, you need to deploy a new contract for every token while for solana ...
noooooooob's user avatar
0 votes
2 answers
95 views

I am aware everything is Solana is an account but there are different designations of accounts on Solana. There are accounts that store programs which are system accounts. There are also PDAs which ...
Jurry's user avatar
  • 146
0 votes
1 answer
47 views

I am analyzing the Solana account BKuzP63i6NZ13opjVYKHAevK7PkyjPaT57bHgD4dCCMM, which holds a significant amount of liquidity. Initially, I assumed it was a Program Derived Address (PDA), but I later ...
user37868's user avatar
0 votes
0 answers
37 views

I was listening to Associated accounts changes owned by RaydiumV4 I noticed I am getting addresses with an accending pattern. I saved 3 snapshots as you notice below the addresses keep getting bigger, ...
Mohamad Amin Abou Harb's user avatar
0 votes
1 answer
43 views

By looking at question you probably got that i am new to solana. I am building a platform where, users can provide service and get compansated in tokens. without going into much details following is ...
Kalpesh Patil's user avatar
1 vote
1 answer
88 views

(This is a follow up question to use newly created keypair as token account) Say I've a program, which creates custom account escrow (which is PDA). And in the program's initialize instruction: It ...
Eric's user avatar
  • 443
0 votes
1 answer
58 views

Say I created a mint A. I have an account X, I derived a token address Xa using mint A and account X. Now I want to transfer some token from Xa to another address. Way 1: Usually I would do this: ...
Eric's user avatar
  • 443
0 votes
0 answers
30 views

I'm trying to work with pda and cli, users wallet can make a deposit, and only the admin can withdraw. deposit method works correctly, but withdraw returns the invalid program argument error. I'm ...
keqezer's user avatar
2 votes
0 answers
32 views

I would like to guarantee that a program only creates 1 PDA representing a Twitter/X user. What's the best way to implement such uniqueness check so that there's exactly one-to-one mapping between ...
ttl's user avatar
  • 125
1 vote
0 answers
26 views

I've uncovered an issue in my TS tests using the Bankrun provider for Anchor. The problem occurs when a PDA’s seed is derived from a mutable account’s data field. My program defines three instructions:...
Iaroslav's user avatar
  • 303
2 votes
1 answer
118 views

I've uncovered an issue with the TypeScript tests using the Bankrun provider for Anchor when creating a PDA whose seed is derived from data inside another account. Here’s the setup: Data PDA: An ...
Iaroslav's user avatar
  • 303
0 votes
1 answer
160 views

I want to define a PDA inside my anchor program, that will be expected as input from my receiving program via CPI. The PDA should belong to another program (not the one where it is defined in): #[...
JAS's user avatar
  • 121
1 vote
1 answer
58 views

going through a training workshop and we are building an escrow, I went off script a bit and was trying to incorporate a "counter" (0 +1, +2) as an input for generating the seed for our ...
ScozziSOL's user avatar
1 vote
2 answers
53 views

Setup: Say your program address is A Your program has a PDA address derived from some seed at address B B is the mint authority for one of the program tokens Someone sends some SOL to B before your ...
ttl's user avatar
  • 125
1 vote
1 answer
177 views

This is a follow up question on this answer in a way. Some programs seem to initialize some of their PDAs by sending SOL to it before it's manually created by the program so the owner is set to the ...
ttl's user avatar
  • 125
0 votes
1 answer
41 views

I would like to deploy a program to a specific address (aka Program ID). Can any PDA be used as the Program ID? For example, if I derive some PDA off of the BPF Loader program (owner for programs) ...
ttl's user avatar
  • 125
0 votes
1 answer
45 views

I've finished my ninth project (Token Lottery) in the Solana bootcamp. In the first instruction, we created a PDA account (TokenLottery) using the following attributes: We used this TokenLottery ...
Lajos Gregus's user avatar
1 vote
1 answer
33 views

my program has It's PDA account to allow withdraw from the program. there is a spl-token account created from this admin PDA, and only whitelist users can withdraw spl-token by calling withdraw ...
Lion.k's user avatar
  • 183

1
2 3 4 5
7