I tried to compile 2 swaps into one transaction and got this error,
Error:encoding overruns Uint8Array
I know there is a 1232 limit for a single transaction, my question is, is there any way to reduce my instructions size? or is there any other way can make my code works?
const transactionMessage = new TransactionMessage({ payerKey: payer.publicKey, recentBlockhash: blockhash, instructions: innerInstructions, // lots of instructions }) const itemV = new VersionedTransaction(transactionMessage.compileToV0Message()) itemV.sign([...innerSigners, payer]);
Here is code I use. thanx