Returns the explorer link for a given chain, hash or address.
Generates a blockchain explorer URL based on the provided parameters. The function
determines whether the input is an address or transaction hash and constructs
the appropriate URL path.
// Get link for a transaction hash with custom explorer consttxLink = getExplorerLink({ chain:optimism, hashOrAddress:'0x123...abc', explorerUrl:'https://optimistic.etherscan.io' }); // Returns: "https://optimistic.etherscan.io/tx/0x123...abc"
Returns the explorer link for a given chain, hash or address.
Generates a blockchain explorer URL based on the provided parameters. The function determines whether the input is an address or transaction hash and constructs the appropriate URL path.