← Code LabReact Native0/50 solved · 0%
Web3 integration · hard

42. Multi-chain config lookup

Build a block-explorer URL from chain config.

Write `txUrl(chains, chainId, hash)` where `chains` maps chain id to `{ explorerUrl }`, returning `` `${explorerUrl}/tx/${hash}` `` or throwing `new Error("unsupported chain")` if not found.
Required in your answer: throw new Error