I am following these instructions.
The problem is that the above instructions don't mention Chain ID
and it appears Chain ID
is required to even make it work. Thus, I'm stuck.
What is the Chain ID
? How do I get it to set it?
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.
Sign up to join this communityI am following these instructions.
The problem is that the above instructions don't mention Chain ID
and it appears Chain ID
is required to even make it work. Thus, I'm stuck.
What is the Chain ID
? How do I get it to set it?
From the ganache-cli
docs:
--chainId: Specify the Chain ID ganache-cli will use for eth_chainId RPC and the CHAINID opcode. For legacy reasons, the default is currently 1337 for eth_chainId RPC and 1 for the CHAINID opcode. Setting this flag will align the chainId values. This will be fixed in the next major version of ganache-cli and ganache-core!
So, in your case, the Chain ID should be 1337
.
If you want to change the chainId use ganache-cli -f <YourNODE> --chainId <newNumber>
// You can see all commands using `ganache-cli help
As of at least ganache v7.9.0 (@ganache/cli: 0.10.0, @ganache/core: 0.10.0)
you specify chain it with --chain.chainId
if you are using the cli, otherwise it is 1337 by default
More info here