All Questions
14 questions
0
votes
2
answers
48
views
Best to have PDA own a System Account or be the System Account to move SOL tokens?
What would be the considerations for choosing between the following?
A) Using a PDA (that is a System Account type) to receive and send SOL tokens on behalf of User A
B) Using a PDA that owns a System ...
1
vote
0
answers
17
views
Use PDA as the authorized account for the token account Failed
I want to create a public wallet (public_account) when I create SPL tokens, and then this wallet holds the original mint tokens, and then others can transfer tokens from through the contract interface....
0
votes
1
answer
23
views
Transfering sol from pda to a hardcoded account pubkey
Can i transfer money from a program owned PDA to a hardcoded pubkey without AccountInfo of the receiver ? Or do I NEED to pass it from the client?
let hardcoded_pubkey = Pubkey::from_str("----...
1
vote
1
answer
64
views
Error sending SOL from PDA to system account
I'm writing an English auction program that tries to refund the previous bidder if they are outbid.
I store funds from bidding in a PDA called auction, and attempt to send them to the previous highest ...
6
votes
2
answers
716
views
Anchor Realloc PDA
I am trying to write a program that:
a) Creates an account (state) if one does not already exist
b) Reallocs as needed for changed state
Error
Error: Account allocation failed: RPC response error -...
1
vote
0
answers
115
views
How do I transfer SOL from a PDA account to a user's wallet?
I'm now developing on solana blockchain. I want to users can deposit and refund their sol on my pool. create_pool works well it means users can deposit their sol to my pool.
but cancel_pool error. ...
1
vote
0
answers
2k
views
Transaction simulation failed: This account may not be used to pay transaction fees using Solana CLI
I am getting this error using "solana transfer" at the command line. "solana address," and "solana balance" both work fine, so it seems like the wallet is properly ...
2
votes
1
answer
729
views
How do I transfer SPL-token programmatically when the recipient is the transaction signer?
I want to transfer my custom SPL-token programmatically from my vault (source token account) to George (user destination token account), where the transaction caller-payer is George. Hence, I must use ...
3
votes
2
answers
1k
views
How to create ATA (Associated Token Account ) for a PDA (Program Derived Addresses) on devnet?
I am creating a token-sale program, to sale tokens, I want to transfer spl-tokens to a PDA-address, so I can transfer them from PDA-token-account to recipient(transaction-signer)-token-account by ...
2
votes
1
answer
110
views
How to lock lamports to the game and allow winner to withdraw the winning reward
I'm learning Solana with Anchor and decided to implement Roshambo (rock, paper and scissors) game as part of my journey. I'd like to allow players to place some bid on game where winner collects all ...
1
vote
2
answers
246
views
Do I need PDA to send SOL to another account?
I'm struggling to send SOL to another address(fixed one when initialize) on Rust level along logging the sender's account address on the program.
Do I need PDA for this?
Also I have to log the sender'...
3
votes
1
answer
76
views
Transaction does not show amount
I am writing a program to transfer SOL owned by the system program to another system program PDA, in the tests everything works fine and also on the frontend UI but the problem is that, when the user ...
1
vote
3
answers
206
views
Unauthorized signer on CPI transfer call
so I am trying to write an app where we can deposit native SOL to a wallet, that wallet would be a PDA, and based on some event I would like to transfer SOL to a particular wallet via a CPI call but I ...
0
votes
3
answers
269
views
Issue, transfer SOL via CPI call
I am trying to make a SOL transfer via a CPI call, I managed to create an account to which I have to transfer, this account's authority is owned by a (master) PDA, transfer/deposit works fine but when ...