Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add EIP-3326: wallet_switchEthereumChain #3326

Merged
merged 4 commits into from
Aug 11, 2021
Merged

Conversation

rekmarks
Copy link
Contributor

@rekmarks rekmarks commented Mar 4, 2021

This PR adds EIP-3326, specifying the wallet_switchEthereumChain RPC method.

Link to rendered file: https://github.com/rekmarks/EIPs/blob/3326-create/EIPS/eip-3326.md

@lightclient
Copy link
Member

@rekmarks this is still a draft PR, but I see it hasn't been modified in 2 months. Are you ready for it to be reviewed and merged as a draft EIP?

Copy link

@Chanh3939 Chanh3939 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EIPS/eip-3326.md

@994hfdgh
Copy link

994hfdgh commented Jun 1, 2021

等待中

@taylorjdawson
Copy link

@rekmarks Do we have a timeline on this?

Copy link

@Cvada98 Cvada98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

@axic
Copy link
Member

axic commented Jul 27, 2021

@rekmarks this is still a draft PR, but I see it hasn't been modified in 2 months. Are you ready for it to be reviewed and merged as a draft EIP?

Repeating @lightclient's question here 👀

@derivativedegen
Copy link

can confirm this is working in production though, and it makes network switching absolutely flawless. thank you!

@rekmarks
Copy link
Contributor Author

rekmarks commented Aug 5, 2021

Hey @axic and @lightclient, sorry for the delay. As people have noted (thanks for the positive feedback!), this is already merged and in production. I think it would be straightforward to finalize. However, given the eth1 JSON-RPC API work, I'm wondering whether it's worth our time to actually merge and ultimately finalize this EIP.

I'm currently out of the loop with the eth1 RPC API efforts, but is there a place in that repo for methods like this? @lightclient, are you the right person to ask about that?

@MicahZoltu
Copy link
Contributor

My recommendation is to convert this to a PR against https://github.com/ethereum/eth1.0-specs/blob/master/json-rpc/spec.json which is where the JSON-RPC spec now lives.

Things are a bit weird since in this case this isn't actually a JSON-RPC method, but it is structured and served in the same places as JSON-RPC so that is probably the best place for it?

@axic
Copy link
Member

axic commented Aug 6, 2021

I still think it is useful to get it finalised here given
a) it is already written, and
b) all the relevant other methods (such as #3085 and the provider API) are described here.

The linked JSON RPC spec does not even contain wallet_addEthereumChain (#3085).

If all these are moved to a new repo, hopefully all of them get at least the finalised ERCs included, which is not yet the case.

@sweetmantech
Copy link

would love to see this merged 🚀

@ethereum ethereum deleted a comment Aug 9, 2021
@rekmarks rekmarks marked this pull request as ready for review August 10, 2021 19:31
@eth-bot eth-bot enabled auto-merge (squash) August 10, 2021 19:31
@eth-bot
Copy link
Collaborator

eth-bot commented Aug 10, 2021

Hi! I'm a bot, and I wanted to automerge your PR, but couldn't because of the following issue(s):

 - File with name EIPS/eip-3326.md is new and new files must be reviewed
 - This PR requires review from one of [@micahzoltu, @lightclient, @arachnid, @cdetrio, @souptacular, @vbuterin, @nicksavers, @wanderer, @gcolvin, @axic]

@MicahZoltu @lightclient @Arachnid @cdetrio @Souptacular @vbuterin @nicksavers @wanderer @gcolvin @axic

@rekmarks
Copy link
Contributor Author

@axic alright, let's get this merged!

@MicahZoltu, I agree with you that this should live in the eth1 specs repo. I'll make sure someone from MetaMask PRs the methods we've authored there.

Just one question, when you say that wallet_switchEthereumChain "isn't actually a JSON-RPC method", you mean because it's not implemented by clients?

@lightclient
Copy link
Member

FYI, the new api repo is https://github.com/ethereum/eth1.0-apis, not the specs repo anymore.

With that said, I'm not sure if the wallet namespace should also live there. Currently, the repo is focused on specifying the RPC methods for consensus clients.

The wallet application may arbitrarily refuse or accept the request.
`null` is returned if the active chain was switched, and an error otherwise.

Important cautions for implementers of this method are included in the [Security Considerations](#security-considerations) section.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this line is unnecessary, security considerations should already be an important section for implementers to read :)

@eth-bot eth-bot merged commit 12d6e08 into ethereum:master Aug 11, 2021
Copy link

@Hbutlercapone Hbutlercapone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add EIP-3326: wallet_switchEthereumChain#3326

@ethereum ethereum deleted a comment from Palehorse999 Sep 24, 2021
@ethereum ethereum deleted a comment from gcm168 Sep 24, 2021
@ethereum ethereum deleted a comment from MOB1987 Sep 24, 2021
Copy link

@Hbutlercapone Hbutlercapone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add EIP-3326 wallet_switchEthereumChain #3326

PhABC pushed a commit to PhABC/EIPs that referenced this pull request Jan 25, 2022
* Add EIP-3326

* Add discussions-to link

* Trim discussions-to link

* Fix typos, edit copy
@Saldanaf1987
Copy link

My files been updated

@mohasin1997
Copy link

Hi

@Hbutlercapone
Copy link

Hbutlercapone commented Mar 28, 2023 via email

@mohasin1997
Copy link

Hi mohasin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.