solanaTrackerForStore()
solanaTrackerForStore<
T>(params):Promise<void>
Defined in: trackers/solanaTracker.ts:341
Tracks a Solana transaction of the Pulsar store with solanaFetcher (the first look a second away; then by its age, every second for two minutes, then every 15 seconds, and every minute after 30
consecutive status errors) and writes the results to the store: confirmationStatus (processed, then confirmed, usually within a
second of sending), confirmations, slot, fee, instructions and recentBlockhash while pending, then
Success with confirmationStatus: 'finalized' and confirmations: 'MAX', or Failed with the normalized error,
and the local time as finishedTimestamp. The details (fee, instructions, recentBlockhash) are optional: when
getTransaction fails, the status is still written, and a finalized transaction whose details are still missing
after 10 checks is marked Success without them.
A transaction sent with signAndSendSolanaTx gets the last valid block height of its blockhash, saved as
lastValidBlockHeight: when the chain passes it without the transaction, it is marked Failed with an “expired”
error, within seconds instead of an hour.
An RPC outage says nothing about the transaction, so errors of getSignatureStatuses or getBlockHeight never end
tracking. When it is not finalized one hour after localTimestamp, long past any blockhash lifetime, the transaction is
marked Failed and stays in the pool. The callbacks receive the
transaction with every update written by the tracker; onError receives the on-chain error, or an Error when the
transaction expired or tracking timed out. An on-chain error is written with the message
The transaction failed on the chain: ..., naming the error as the node gave it.
Type Parameters
T
T extends Transaction
The application transaction type.
Parameters
params
Pick<ITxTrackingStore<T>, "updateTxParams" | "removeTxFromPool" | "transactionsPool"> & Partial<Pick<ITxTrackingStore<T>, "isTxTracked">> & object & TrackerCallbacks<T>
The transaction, the store members and the callbacks.
Returns
Promise<void>
A promise that resolves once polling has started.