1

hi i am new to solana with the aim to create spl-token but when i create 2 keypair, one for contract address and two for holding spl token. When I wanted to top up the gas fee I got a deposit error on the contract account and when I wanted to send it again the CLI command didn't work. the command I use :

solana transfer --from dev.json DybfqR2xGdGYw7sygWMryCMSSEUn4KSZuQ1wuoAhc3T 2 --url https://api.mainnet-beta.solana.com --fee-payer spl.json

output : Error: RPC response error -32002: Transaction simulation failed: Error processing Instruction 0: invalid program argument [3 log messages]

solana transfer --from dev.json DybfqR2xGdGYw7sygWMryCMSSEUn4KSZuQ1wuoAhc3T 2 --url https://api.mainnet-beta.solana.com --fee-payer dev.json

output : Error: RPC response error -32002: Transaction simulation failed: This account may not be used to pay transaction fees

software v1.17.5


Hi thank you and sorry for the delay. So how do I withdraw my $SOL in the dev.json wallet? I always get the output: Transaction simulation failed: This account may not be used to pay transaction fees.

I have imported the private key into soflare wallet to submit and got the output as shown below:enter image description here

2 Answers 2

2

It's tough to tell exactly without more info, but it seems like dev.json is not a normal system account / wallet. The second error of "this account may not be used to pay transaction fees" means that dev.json is owned by some other program.

You'll need to use a system account (ie. not a stake account or SPL token account) as the fee payer or source account for transfers.

0

please check the address of your keypair like so:

solana address -k dev.json
solana address -k spl.json

the past these addresses into

explorer.solana.com 

There you will see the Assigned Program Id. Is that is not the system program you can not just transfer the sol out.

If the owner is the token program though, (maybe you accidentally send sol to a token account?) then you can transfer all the tokens out and then close the token account to get your sol back.

Another problem could be that spl.json needs some sol to pay for transaction fees if its owned by the system program.

Hope that helps.

1
  • it's true that I accidentally sent soles to the token account after I send to system account and close the token it's the same I still can't send my SOL to other address... do you have cli command guide for this problem? Commented Jan 28 at 10:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.