Gets a chain by its identifier
Error if no chain matches the identifier
// Get by numeric IDconst eth = getChain(1)// Get by hex IDconst polygon = getChain("0x89")// Get by EIP-155 formatconst bsc = getChain("eip155:56")// Get by short nameconst arbitrum = getChain("arb1") Copy
// Get by numeric IDconst eth = getChain(1)// Get by hex IDconst polygon = getChain("0x89")// Get by EIP-155 formatconst bsc = getChain("eip155:56")// Get by short nameconst arbitrum = getChain("arb1")
The chain identifier. Can be:
The matching chain object
Gets a chain by its identifier
Throws
Error if no chain matches the identifier
Example