0

so I send the transaction

    const buySign = await connection.sendTransaction(swapTx, [wallet], {
      skipPreflight: true,
      preflightCommitment: 'confirmed',
      maxRetries: 3
    })

I get a signature 5kDu6b5HRsCDEawpGGAJCbDgmArPsBCTdAsHqUGFykqWjBU6kAq3jjhPZVBzwpYdWs7ctYkmQjrn3Q3gLBCkErt1

but I don't see anything in the scanner. Why did my transaction fail? What should I pay attention to? I'm doing a swap on raydium

sometimes the transaction is successful, sometimes it is not how to avoid this?

So. I added a serialized transaction. so you can see for yourself what's going on. Maybe this will help you understand why the transaction is not executed.

https://explorer.solana.com/tx/inspector

AVBKcsEs05vP6BBbO6ceiK9+Mknam+i3cHUIIFsp6xRdwa7pM3Lz/g65y7Tq0nIPzJkGvylgU3/yJwkyHYXqUwsBAAoYSD60Qpv/YtC9SIy4pCAgpQdT7dSy7dn8fV9lcTiU9VYAB6Vm0rocrH71NB4qICQrTqaOqftYF4J2jqc5DeQYgwAf3dDGbWKLpDdjb+qvON1MOcU51lihVpLnboi+Rl6zF/BRMSOZvCHA1d921q9jbMEUswxvLrNtfabMBLeRoaQfNbPHwIuWSZjunIuts7nA7uH2KgSg7uLDxG6wQtZMTzepW5ocksA+b9TFe40E7yQaXvuVdsaAA+cCNYKZjxmaSfiHl0i7g69NYxYwwtB1ns87gC8bwl2twC5ylad/4vl4+h1xckWrg1AIHD88XiCvRe1ZB5GAYrHH+AJQjEBI5XwZr4A+fJnFcp1i7+LJ5hfAL/GJ9sZfWEGVe7yBNXLygkV7Rf2/i7H4/Ju2MF+UiEy3gSDcOeSA0nQKgEG9MxaE/LdwJysBT3ZGE+I55ZjnuvaFGDFr+ngaPBusWE+lZpXvBBbqj5LDJwBT05oP3sL9lF8ST/KJrzMlEuzGdfRu2UuhmT0KuUklnu+eYXx/5oPZ+LKclEEJCOSwqX3tUG0N+ixT55a2wvB1Z4QSogvsqlJ8TgDcba4DwYozjt2cDgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKf3/gGdwjg1cZj2OcrWesn8FbrRUR2vBg30zLA8nxCRBV7BYDzHF/ORKYlgtvPnXjudZQ6CEo5OzUDaNIomTCEvZScQ2AsM/IHeQ7RajUkyhuZdc8SGiqQz/7H34torNf9yiqElhKa8duCcMBJJXS8pRxnbixPZRFE4EZNuvovSMlyWPTiSJ8bs9ECkUjg2DC1oTmdr/EIQEjnvY2+n4WQMGRm/lIRcy/+ytunLDm+e8jOW7xfcSayxDmzpAAAAABpuIV/6rgYT7aH9jRhjANdrEOdwa6ztVmKDwAAAAAAENB1GoKC2mEwX+KZw3uZjlhHHbETUDcxD4vhBFpgr27gbd9uHXZaGT2cvhRs7reawctIXtX1s3kTqM9YV+/wCp4QHLWP92MAu6vwCfmSoeRYT3/SskOrK9PsJjqexekmkIFAAJA/6xAQAAAAAAFAAFAqCGAQATBgAGABUOFwEBDgIABgwCAAAAQBkBAAAAAAAXAQYBERMGAA0AEg4XAQEREhcJEAUICwoWBAEHDAIDDwYNABEJQBkBAAAAAAAAAAAAAAAAABcDBgAAAQk=

even when I do a simulated transaction. I don't see any errors there. but for some reason, I still can’t make a transaction. Am I blocked on the blockchain? hahahahahaha, wtf

1 Answer 1

1

I can't tell from the context why it wasn't sent to the network, but you can try serializing the Tx into base64 and running it with an inspector. This way you can see at least some information about the Tx and maybe decipher what is going wrong.

https://explorer.solana.com/tx/inspector

You would need to do something like

const serializedTx = swapTx.serialize();
console.log(serializedTx.toString('base64'));

Then cut and paste the output into the simulator window in your browser.

Once the transaction is deserialized, the display will change to show information about the Tx. Make sure you don't miss the "simulate" button.

enter image description here

4
  • thanks for the help. I added a serialized transaction. but I didn't understand what the error was and why the transaction failed. can you help?
    – slntrx
    Commented Mar 10 at 10:59
  • The data you included looks like a successful transaction. So sometimes you get a successful transaction in the scanner and sometimes you get no transaction in the scanner? I wonder if it is not included in the block. Can you add a priority fee?
    – Fuzzy Yeti
    Commented Mar 11 at 4:24
  • Yes everything is correct. sometimes the transaction succeeds. sometimes not. In recent days, I have had 1 successful transaction. 5 transactions not successful
    – slntrx
    Commented Mar 11 at 6:03
  • const UNITPRICE = ComputeBudgetProgram.setComputeUnitPrice({ microLamports: 160_000 }) const UNITLIMIT = ComputeBudgetProgram.setComputeUnitLimit({ units: 150_000 })
    – slntrx
    Commented Mar 11 at 6:03

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.