Coinbase Wallet SDK
wallet_addEthereumChain
Add a new Ethereum chain to the wallet
Defined in EIP-3085
Requests that the wallet tracks the given chain and adds it to the wallet’s UI. This method is used to suggest new networks to the user.
Parameters
The chain data object containing network information.
Returns
Returns null if successful.
Error Handling
Code | Message | Description |
---|---|---|
4001 | User rejected the request | User denied adding the chain |
4100 | Requested method not supported | The method is not supported by the wallet |
4902 | Unrecognized chain ID | The chain ID is not recognized |
Make sure to provide accurate RPC URLs and block explorer URLs. Incorrect URLs may cause connectivity issues.