-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Enable using Hardhat network without changing the localhost:8545 chain ID #10290
Comments
Another alternative is to create an additional network at MetaMask, name it |
@aeither : Use |
The original GitHub issue linked has been closed, and a new one has been opened to support HH out of the box. Old value: MetaMask/metamask-extension#9827 New value: MetaMask/metamask-extension#10290. This PR updates the link to point to the new issue.
That still don't work for me .. |
Can we please fix this created unnecessary friction for developers! |
Is there any progress on this issue?? |
Alright, we're gonna try to do something about this. I can't talk about dates or specifics yet, but hopefully in an upcoming sprint. Our hope is to effectively restore the chain ID behavior for By way of context, the change that implemented the current behavior was introduced in version Thank you for your patience and consistent feedback on this issue. We will let you know when we have more information to share, or simply close this issue when we've merged a fix. |
We are waiting metamask? |
Any progress? |
@eniolasonowo @codingwithdidem please don't do that. We all want this to happen, but these things take time. Erik didn't mention dates for a reason. Just be patient. |
Would love a fix for this! |
It's probably because of Hardhat's documentation: "Please voice your support for MetaMask to fix this [...]" |
@loziniak in the context of GitHub issues that means upvoting an issue to help maintainers figure out how important it is. But you're right that it could be misleading, I'll update it. |
MetaMask! fix this |
updates ? |
Any updates?? |
Still suffering with this. |
Any progress on this? indeed, annoying |
Any updates? |
cmon guys, do something |
Hey guys! I have found a solution, you must pass directly the e.g
|
@Justice-Orogun review my comment |
@Justice-Orogun use 31337 in your MetaMask ChainID |
|
@luislucena16 |
@Justice-Orogun This is how I have mine and it works fine.. |
@luislucena16 lemme check this out if it works from my end. Thanks for the feedback |
@luislucena16 this is what I have on my end.... However, lemme check out your method. |
@luislucena16 The same error bro..... |
@Justice-Orogun I don't understand why the error is still occurring. It works fine for me |
@Justice-Orogun Are you running the |
@luislucena16 I already run the npx hardhat node command |
@Justice-Orogun Now try adding the localhost network |
@luislucena16 The same error..... I just did everything again from scratch.... |
Same error, please fix this. This is unbelievable. |
@hernandp I feel this has to do with Metamask and hardhat... I am very sure there are errors somewhere around it.... |
same error |
@Justice-Orogun i am using same version as you but when i switched to 0.8.16 it start working fine |
that issue get solved before as I know the 31337 error and save button are not visible all things are get solved |
I want my localhost HARDHAT network to be added by calling wallet_addEthereumChain, when I am passing the chainId inside params of 31337 the calling that the function on the UI,the chainId it is showing me of 201527. |
@hammad-ali18 try this: |
With the manual configurations described in previous comments it is possible to address the problem, but it would be great if MetaMask could fix this for immediate operation with Hardahat. |
does the above solutions work for sepolia too? |
@thunder1911 with sepolia you have no problem! |
No I'm getting the same error when I'm trying to deploy my contract based on sepolia to tha localhost. |
Can we use the same solution given above? |
I'm opening this issue as suggested by @rekmarks: #9827 (comment)
MetaMask comes with a
localhost:8545
network, typically used for development. This network used to work fine both with ganache and with hardhat, but now MetaMask checks that the connected network has 1337 as its chainId. Since Hardhat uses 31337 as its chainId, users get an EIP-155 error when trying to use MetaMask.The solution is to manually change the project's configuration so that 1337 is used as chainId. This causes unnecessary friction.
I don't know what the correct solution would be here. I think users starting a node on their localhost are knowledgeable enough, and so accepting the chain id returned by the node seems fine in that scenario (unlike manually added networks, where users could be adding by following malicious instructions). But any approach that makes MetaMask work out of the box with Hardhat would be great.
The text was updated successfully, but these errors were encountered: