getGaslessRequestTransactions
List the EVM broadcast attempts stored for one gasless request, with each attempt’s receipt outcome.
import { getGaslessRequestTransactions } from "@symmio/trading-core";
const attempts = await getGaslessRequestTransactions(config, { requestId });
const latest = attempts.at(-1);A transaction hash is mutable across replacement attempts — the relayer may re-broadcast a stuck transaction with a new hash. The requestId is the stable identifier; fetch this list when a hash appears (to show an explorer link) or when a request ends failed (to diagnose which attempts were made and why they failed).
An attempt’s status is not the request’s status. A request whose first attempt is reverted can still end
succeeded on a later attempt. Read the outcome from getGaslessRequest; read
the attempts to link to an explorer or to explain a failure.
The query factory polls only when you hand it the record’s status. The attempts list has no terminal of its own to stop on — an attempt that reverted may be followed by another one, and a request with no attempt yet looks exactly like one that will never get any — so a self-driven poll here would keep billing the service after the workflow ended. Pass the status you are already reading and the list follows the record’s jittered cadence (1–2 s while queued, 3–5 s after submitted) and stops with it; leave it out and the query fetches once, with query.refetchInterval yours to set. status never enters the query key, so a status change refreshes the cadence instead of forking the cache entry.
import { getGaslessRequestQueryOptions, getGaslessRequestTransactionsQueryOptions } from "@symmio/trading-core";
const request = useQuery(getGaslessRequestQueryOptions(config, { requestId }));
/** Same cadence as the record, and it stops when the record does. */
const attempts = useQuery(
getGaslessRequestTransactionsQueryOptions(config, { requestId, status: request.data?.status }),
);It shares the record’s transient-failure handling (429, 503 and dropped connections are retried with the gateway’s Retry-After when it sent one, a jittered backoff otherwise), its AbortSignal forwarding, and the per-deployment pacing described under polling helpers.
Parameters
requestIdstringrequiredStable service tracking id returned by a gasless submit.
service"operations" | "deposits"default "operations"optionalWhich sub-service stores the request. It is folded into the query key with the same default the action applies, so a key built without it addresses the same cache entry.
signalAbortSignaloptionalCancel the read in flight. The React hook passes TanStack’s own query signal.
chainIdnumberoptionalTarget chain id. Defaults to the config’s defaultChainId.
statusGaslessRequestStatusoptionalQuery factory only, and never part of the query key: the record’s last known status, which drives the poll cadence and stops the list once the record is terminal. Without it the query does not poll.
Returns
Promise<readonly GaslessRequestTransaction[]>idstringAttempt row id.
txHashHash | nullTransaction hash of this attempt.
attemptNumbernumber1-based attempt number.
statusGaslessTransactionAttemptStatusSUBMITTED (broadcast, receipt pending), CONFIRMED (receipt status 1), REVERTED (receipt status 0), or FAILED
(never mined — dropped, replaced, or rejected by the node). An attempt status outside this set throws rather than
normalizing, so a silently mistyped attempt never renders as a confirmed one.
requestIdstringThe request this attempt belongs to (the service’s entity_id) — the same id you poll with.
workflowstringThe service-side workflow that produced the attempt, e.g. relay_instant.
receiptRecord<string, unknown> | nullThe raw receipt the service stored, as reported, or null while none was observed. Untyped on purpose: it is the
relayer’s node’s JSON, not a viem TransactionReceipt, and its shape is the service’s to change. Read the
authoritative receipt from your own client with the attempt’s txHash.
errorCodestring | nullStored error code for a failed attempt, when present.
errorMessagestring | nullStored error message, when present.
createdAtstring | nullWhen the service stored the attempt (ISO-8601).
updatedAtstring | nullWhen the service last updated the attempt (ISO-8601).
Throws
SymmError("config", "GASLESS_NOT_CONFIGURED")/("config", "GASLESS_UNSUPPORTED_CONTRACTS_VERSION").SymmApiErrorwith codeGASLESS_TRANSACTIONS_FETCH_FAILEDon HTTP failure.SymmError("api", "GASLESS_ATTEMPT_STATUS_UNKNOWN")— the service reported an attempt status outsideGaslessTransactionAttemptStatus.SymmError("api", "GASLESS_INSTANCE_MISMATCH")— a successful response came from a different protocol instance than the config expects (protocolInstance, or the instance the url path pins): a staging/production cross-wire. A gatewayurlalso fails when theX-GasLessQ-Protocol-Instanceheader is missing; behind a proxy root, only a forwarded header is checked. See URL forms.