Step-by-step guide for building robust, production-grade Solana transaction sending workflows. Learn compute optimization, priority fees, and confirmation strategies.
Build the Initial Transaction
Optimize Compute Units
Add Priority Fees
Send and Re-broadcast
sendSmartTransaction
method in our Node.js SDK and Rust SDK to see a production-grade implementation of this workflow.Transaction
or VersionedTransaction
object. You will also need to fetch a recent blockhash.
This example prepares a versioned transaction. At this stage, you must also sign it so that it can be simulated in the next step.
simulateTransaction
RPC method.
It’s a best practice to first simulate with a high CU limit to ensure the simulation itself succeeds, and then use the unitsConsumed
from the response to set your actual limit.
getPriorityFeeEstimate
RPC method. For the highest chance of inclusion via Helius’s staked connections, use the recommended: true
option.
maxRetries
in sendTransaction
). While Helius’s staked connections forward your transaction directly to the leader, it can still be dropped. You must implement your own rebroadcasting logic for reliable confirmation.