Skip to main content

Transaction Submission Pattern

Transaction submission is a workflow, not a single RPC call. A production submit path validates input, simulates when possible, signs with controlled key material, submits once, watches for inclusion, and reports a stable outcome.

StepPurposeExamples
BuildCreate chain-specific transaction payloadEVM calldata, Solana message, Sui transaction block, Aptos entry function
Estimate/simulateDetect failures before spending feesEVM gas estimate, Solana simulateTransaction, Sui dry run, Aptos simulation
SignUse controlled keys and correct chain id/domainHSM, wallet, custody service, local dev key
SubmitSend through a submit-capable private or authenticated endpointJSON-RPC, REST, SDK
TrackPoll or subscribe until finality thresholdReceipt, signature status, checkpoint/version
ReconcileHandle timeout, duplicate, replacement, or rejectionIdempotency table keyed by client request id

EVM submissions must manage nonce, gas, chain id, and replacement rules. Solana submissions must account for recent blockhash expiry. Sui and Aptos submissions should use their transaction simulation/dry-run facilities before broadcast where appropriate (Sui API references, Aptos APIs).

CREATE TABLE submitted_transactions (
client_request_id text PRIMARY KEY,
chain text NOT NULL,
transaction_id text,
status text NOT NULL,
submitted_at timestamptz NOT NULL DEFAULT now()
);

:::danger Blind resubmission is unsafe If the submit call times out, the transaction may already be accepted. Query by nonce, signature, digest, hash, or client id before creating a replacement. :::