selectEvmTxExplorerLink()
selectEvmTxExplorerLink<
T>(params):string
Defined in: utils/selectEvmTxExplorerLink.ts:24
Builds the URL of a transaction page:
- Safe transactions link to the transaction in the Safe web app (gnosisSafeLinksHelper).
- Other transactions link to
<explorer>/tx/<hash>on the default block explorer of the chain inchains, where<hash>isreplacedTxHash, elsehash, elsetxKey. Before an ERC-4337 UserOperation is bundled, this is theuserOpHash, which block explorers do not know.
Type Parameters
T
T extends Transaction
The application transaction type.
Parameters
params
The chains and the transaction.
chains
readonly [Chain, Chain]
The viem chains of the app.
tx
T
The transaction.
Returns
string
The URL, or an empty string when the chain or its explorer is not configured.
Last updated on