0

I'm a bit new here and I've been trying to migrate truffle however I keep running into this error: Error: The network id specified in the truffle config (5777) does not match the one returned by the network (1). Ensure that both the network and the provider are properly configured.

I've tried to specify the network in truffle-config.js file although that hasn't worked. It currently looks like this:

module.exports = {
  networks: {
    development: {
      host: "127.0.0.1",
      port: 7545,
      network_id: "*" // Match any network id
    }
  },
}

Trying to run ganache forked and haven't been able to change networkId from 1. Cannot for the life of me find the issue, any help would be greatly appreciated. :)

2
  • How do you run ganache?
    – matank001
    Commented Oct 22, 2022 at 15:37
  • I've been running it through terminal with command: ganache -f -m <Mnemonic phrase> -u <user> -p 7545
    – Madds
    Commented Oct 25, 2022 at 1:27

1 Answer 1

0

Try running ganache with:

--networkId 5777

3
  • Unknown argument: chainId is returned.
    – Madds
    Commented Oct 25, 2022 at 23:40
  • @Madds edited, I wrote to ganache-cli
    – matank001
    Commented Oct 26, 2022 at 4:50
  • Even running ganache with --networkId 5777 I get a Network ID: 1 returned on the forked chain.
    – Madds
    Commented Oct 31, 2022 at 1:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.