Function: getChain()
getChain(
chainId
:number
):Chain
This will resolve the chainId number to the corresponding chain name.
Parameters
Parameter | Type | Description |
---|---|---|
chainId | number | The chainId of the network |
Returns
chain name
Example
getChain(1) // 'ethereum'
getChain(11155111) // 'ethereum'
getChain(100) // 'gnosis'
getChain(10200) // 'gnosis'
getChain(137) // 'polygon'
getChain(80002) // 'polygon'