Submit a Transaction and Confirm It
A 5-step recipe with Solana. We can help you get access.
Recipe · 5 steps
Submit a Transaction and Confirm It
with Solana
Simulate, submit, and confirm a signed Solana transaction end to end.
- Fetch a recent blockhash and the last block height at which it stays valid. The client signs the transaction against this blockhash, and the expiry height bounds how long confirmation polling is worth attempting.
- Dry-run the signed transaction against the current bank without broadcasting it. Signature verification is enabled, and the step only succeeds when the simulated result carries no error, so a transaction that would fail on-chain is never su
- Relay the signed transaction to the cluster as-is. The node returns the base58 transaction signature, which is the handle used to track confirmation.
- Poll the signature status until the cluster reports it finalized. The step retries on a short interval because a freshly submitted transaction takes several slots to reach finality.
- Read the finalized transaction back in parsed form to capture the slot it landed in, the fee actually charged, and the on-chain log messages.
What you'll need to have ready
- signedTransaction: The signed transaction, already encoded (base64 or base58) by the client SDK, built against the blockhash returned by fetchBlockhash.
- encoding: Encoding of the supplied signed transaction.
For your developer
Arazzo workflow solana:send-transaction-lifecycle, 5 operations: getLatestBlockhash → simulateTransaction → sendTransaction → getSignatureStatuses → getTransaction. Specs on APIs.io.