Looked everywhere, and all I can find are a bunch of EIPs. Is there a document/repo somewhere listing all available RPC calls that interact with the wallet (wallet_...)?

Specifically, I'd like to switch a user to one of the testnets when they log into my dApp. However, wallet_addEthereumChain, mentioned in EIP-3085 does not work for mainnet, or any of the 4 testnets (returns May not specify default MetaMask chain.), and wallet_updateEthereumChain mentioned in EIP-2015, returns May not specify default MetaMask chain. as well.

1 Answer 1


The docs you're looking for can be found on the Metamask site: https://docs.metamask.io/guide/rpc-api.html#table-of-contents

The RPC call you're looking for is indeed wallet_addEthereumChain(), which you've tried.

The restriction you're hitting is by design: according to the docs the call won't work... "If the chain ID corresponds to any default MetaMask chains."

However, there's an open issue tracking the potential removal of the check: #10597.

  • Thanks! That's what I needed. Seems like these are MetaMask specific? Do other Web3 wallets subscribe to the same RPC calls, and have the same effects? Mar 23, 2021 at 17:59
  • 1
    Hi again - yes, these are Metamask specific. I think different wallets (i.e. providers, when you've incorporated them into your code) will have their own RPC methods. The one you've used was only added by Metamask about 10 days ago. I don't know of any other provider that lets you push the user to an alternative network via an RPC method. Mar 23, 2021 at 20:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.