createSafeFetcher()
createSafeFetcher(
options?): (__namedParameters) =>Promise<void>
Defined in: trackers/safeTracker.ts:131
Creates a fetcher for initializePollingTracker from @tuwaio/pulsar-core that checks a Safe multisig transaction once
through the Safe Transaction Service API of tx.chainId (SafeTransactionServiceUrls). tx.txKey is the
safeTxHash and tx.from the Safe address.
Requests: GET <service>/multisig-transactions/<safeTxHash>/, and while it is not executed,
GET <service>/safes/<from>/multisig-transactions/?nonce=<nonce>.
- Executed: calls
onSuccessoronFailure(byisSuccessful) and stops polling, keeping the transaction. - Another transaction with the same nonce was executed: calls
onReplacedwith it and stops polling, keeping the transaction. - Still pending
pendingTimeoutMsaftersubmissionDate(one day by default): callsonFailurewith the status and stops polling, keeping the transaction. Without a timeout (null) it keeps waiting. - The service returns 404: calls
onFailure()without a response and stops polling, keeping the transaction. - An unsupported chain or another failed request throws, so the polling tracker counts it as a failed attempt.
Parameters
options?
SafeTrackerOptions = {}
The tracker options.
Returns
The fetcher. Its promise resolves when the check is done.
(__namedParameters) => Promise<void>
Last updated on