trufflesuite / ganache

:warning: The Truffle Suite is being sunset. For information on ongoing support, migration options and FAQs, visit the Consensys blog. Thank you for all the support over the years.
https://consensys.io/blog/consensys-announces-the-sunset-of-truffle-and-ganache-and-new-hardhat?utm_source=github&utm_medium=referral&utm_campaign=2023_Sep_truffle-sunset-2023_announcement_
MIT License
2.61k stars 676 forks source link

We should stop using random values for the `networkId` by default. Other dev tools don't do this, and it confuses everything. #4334

Open davidmurdoch opened 1 year ago

davidmurdoch commented 1 year ago

One such instance of an issue this has caused is in Brave. Brave wallet conflates networkId and chainId when evaluating an chain's available tokens in it's Swap feature. Aligning networkId and chainId makes it work.

I propose that we change the default value for networkId to match chainId (which defaults to 1337). But it should match a user provided chainId as well. If the user wants a random id they can use the word "random". Open to discussion on the best path forward (this will be a breaking change).