1

I’m trying to perform a token swap on Solana using the Jupiter swap API, but I keep getting the following error:

Error while performing the swap: Transaction initiation failed: Simulation failed.
Message: Transaction simulation failed: Error processing Instruction 2: invalid program argument.
Logs:
[
  "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [2]",
  "Program log: Instruction: GetAccountDataSize",
  "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 1569 of 1394295 compute units",
  "Program return: TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA pQAAAAAAAAA=",
  "Program 11111111111111111111111111111111 invoke [2]",
  "Transfer: `from` must not carry data", // <<<<<<<<----------------------
  "Program 11111111111111111111111111111111 failed: invalid program argument",
  "Program ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL consumed 9973 of 1399700 compute units",
  "Program ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL failed: invalid program argument"
]

I've been using this wallet for the past few days and everything was okay! I think I started getting this error when I ran a script to close my token accounts... I cant send, swap or anything else with the wallet now, I get the same error!

Here’s what I’ve done so far:

  • Closed all token accounts and ensured they have zero balance.
  • Verified that my wallet has enough SOL for transaction fees.
  • Tried using different swaps and AMMs but got the same error.

Could someone help me figure out what might be going wrong or suggest any troubleshooting steps?

Example failed tx: https://solscan.io/tx/5jor7KgmqTtJBSL6gqGauPaeMbSqKVTTMPpDvzpSrXsxdLSYBh1b7sRXPrPgnhrHGGNXaYSUK1Hg9BsubWeMQKhs

2 Answers 2

1

can we have a signature ? I think you are trying to transfer SOL from a token account ?

EDIT: you are not transferring SOL from a token account. However, there is a transaction here that seems to be one of the last that worked where your account seems to be used as a nonce account. I don't know much about nonce, but they are used to sign transaction that will be sent later. Does that help you understand what you did / signed ?

1
1

The error says: "from must not carry data"

This means that during a transfer with the system program, the source account (the one sending the funds) cannot have any data on it. In this case, the source account, https://explorer.solana.com/address/pzZHCJ5fXTnfDqucYZV3fhssveVq6Pv4zrgF7MQkd92, is a nonce account, and thus it has data.

If you want to withdraw SOL from a nonce account, you'll need to use the withdraw_nonce_account instruction: https://github.com/anza-xyz/agave/blob/4c2e79fe159d0d27b732468da3d88225ebe62e32/sdk/program/src/system_instruction.rs#L1663

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.