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.
{
"id": 1,
"jsonrpc": "2.0",
"method": "wallet_addEthereumChain",
"params": [{
"chainId": "0x2105",
"chainName": "Base Mainnet",
"nativeCurrency": {
"name": "Ether",
"symbol": "ETH",
"decimals": 18
},
"rpcUrls": ["https://mainnet.base.org"],
"blockExplorerUrls": ["https://basescan.org"]
}]
}
{
"id": 1,
"jsonrpc": "2.0",
"result": null
}
Provider RPC Methods
wallet_addEthereumChain
Add a new Ethereum chain to the wallet
{
"id": 1,
"jsonrpc": "2.0",
"method": "wallet_addEthereumChain",
"params": [{
"chainId": "0x2105",
"chainName": "Base Mainnet",
"nativeCurrency": {
"name": "Ether",
"symbol": "ETH",
"decimals": 18
},
"rpcUrls": ["https://mainnet.base.org"],
"blockExplorerUrls": ["https://basescan.org"]
}]
}
{
"id": 1,
"jsonrpc": "2.0",
"result": null
}
Defined in EIP-3085
Was this page helpful?