Skip to Content

eip5792Tracker()

eip5792Tracker<T>(params): void

Defined in: trackers/eip5792Tracker.ts:145 

Starts polling an EIP-5792 call batch in the background without a store: the wallet’s status every 2 s by default, giving up after 60 consecutive failed attempts. It does not wait for block confirmations of the executing transaction (pass onSuccess’s hash to evmTracker for that).

Type Parameters

T

T extends Eip5792FetcherTx & Pick<Transaction, "pending">

The tracked transaction type.

Parameters

params

Eip5792TrackerConfig<T>

The batch, the wagmi config and the callbacks.

Returns

void

The promise of initializePollingTracker, which resolves once polling has started.

Example

const { id } = await sendCalls(wagmiConfig, { calls }); eip5792Tracker({ tx: { txKey: id, pending: true }, config: wagmiConfig, onSuccess: ({ hash }) => console.log('Executed in', hash), onFailure: (result) => console.error('Batch failed', result?.reason), });
Last updated on