Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
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 ...
juic3n's user avatar
  • 115
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....
Dunty Z's user avatar
  • 11
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("----...
DumSolProgramer's user avatar
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 ...
Mike's user avatar
  • 125
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 -...
Sky020's user avatar
  • 167
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. ...
Watcher's user avatar
  • 11
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 ...
david lampach's user avatar
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 ...
nene's user avatar
  • 23
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 ...
Mahesh Ghamaand's user avatar
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 ...
jakub.bogacz's user avatar
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'...
sunnydev's user avatar
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 ...
Sing's user avatar
  • 121
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 ...
Sing's user avatar
  • 121
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 ...
Sing's user avatar
  • 121