So my issue is when I run the compile
and then migrate
commands everything goes smooth, then I try to test by running the truffle test
command and it gives me an error saying 'Error: The network id specified in the truffle config (4447) does not match the one returned by the network (5777)'. This is what is in my config file at the moment:
module.exports = {
localGanache: {
development: {
host: "127.0.0.1",
port: 7545,
from: '0xFE50B4F7B2921454E9204596b295d2B3648CF421',
network_id: "5777",
gas: 6721975
},
Do I need to have a separate config file set up for testing? If so what does it look like?
Thanks in advance for help and sorry my newbie skills
Best Answer
You can set the ganache-cli network ID by using a flag when running it: