Quantcast
Channel: Recent Questions - Solana Stack Exchange
Viewing all articles
Browse latest Browse all 7869

Getting "Invalid Arguments" error while sending versioned transaction although it passes after multiple retries with the same arguments

$
0
0

I am using "@solana/web3.js": "^1.90.0".While sending versioned transactions I am getting "Invalid Arguments". I have a retry logic in place that retries failed transactions with the same arguments until the transaction lands on chain. After multiple retries it lands with the same arguments same transaction instructions. I am not sure what I am doing wrong. I have recently switched from using normal Transactions to Versioned Transactions. Is there something I have to add while converting?

Below is the code snippet of how I am converting my normal Transaction to VersionedTransaction

// tx is a signed Transaction objectlatestBlockHash =  await connection.getLatestBlockhash('finalized'); // Fetches the latest blockhashtx.recentBlockhash = latestBlockHash.blockhash;tx.lastValidBlockHeight = latestBlockHash.lastValidBlockHeight;// Coverting tx to a signed VersionedTransaction objectconst compiledTxMessage1 = tx.compileMessage();const txMessage1 = new MessageV0(compiledTxMessage1);tx = new VersionedTransaction(txMessage1);tx.sign(signers);

Viewing all articles
Browse latest Browse all 7869

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>