erc4337Tracker()
erc4337Tracker<
T>(config):void
Defined in: trackers/erc4337Tracker.ts:204
Starts polling a UserOperation in the background with erc4337Fetcher, without a store: every 2 s by default,
giving up after 60 consecutive failed attempts. It only follows the bundler; it does not wait for block
confirmations of the bundle transaction (pass onSuccess’s hash to evmTracker for that).
Type Parameters
T
T extends Pick<Transaction, "chainId" | "txKey"> & Pick<EvmTransaction, "bundlerUrl" | "pimlicoApiKey"> & Pick<Transaction, "pending">
The tracked transaction type.
Parameters
config
The UserOperation and the callbacks.
Returns
void
Example
erc4337Tracker({
tx: { txKey: userOpHash, chainId: 11155111, pimlicoApiKey, pending: true },
onSuccess: ({ hash }) => console.log('Bundled in', hash),
onFailure: (result) => console.error('UserOperation failed', result?.reason),
});Last updated on