checkTransactionsTracker()
checkTransactionsTracker(
params):object
Defined in: utils/checkTransactionsTracker.ts:33
Picks the tracker for the key returned by an actionFunction. The key is always used as txKey. Rules, in order:
trackerisGelatoandgelatoApiKeyis set:Gelato(the key is a task ID).- The key must be a hex string; otherwise it throws.
trackerisERC4337:ERC4337(the key is auserOpHash). ERC-4337 is never detected automatically.- The connector type ends with
safeorsafewallet(for exampleevm:safe):Safe(the key is asafeTxHash). - Otherwise:
Ethereum.
bundlerUrl and pimlicoApiKey are not used here. pulsarEvmAdapter uses this function as
checkTransactionsTracker.
Parameters
params
The returned key and its context (CheckTxTracker from @tuwaio/pulsar-core).
Returns
The tracker and the txKey.
tracker
tracker:
TransactionTracker
The tracker to use.
txKey
txKey:
string
The key to store the transaction under: always actionTxKey.
Throws
Error when the key is not a hex string and the Gelato rule does not apply.
Example
checkTransactionsTracker({ actionTxKey: '0xabc123', connectorType: 'evm:metamask' });
// { tracker: TransactionTracker.Ethereum, txKey: '0xabc123' }Last updated on