4

I'm building a todoList Web-App using blockchain. I'm stuck when I tried to connect the blockchain server to metamask. When I try to add new network as mentioned in my Ganache(HTTP://127.0.0.1:7545) then I miss chainID and When I fill the chainID with Genache network Id it shows the given error. enter image description here

When I try to connect to localhost8545 then it returns this error: enter image description here

trufle-config.js

module.exports = {
  networks: {
    development: {
      host: "127.0.0.1",
      port: 7545,
      network_id: "*" // Match any network id
    }
  },
  solc: {
    optimizer: {
      enabled: true,
      runs: 200
    }
  }
}

How can I connect my blockchain network with my localhost?

Uttam
  • 718
  • 6
  • 19

3 Answers3

8

remove default localhost account (i.e. Localhost 8545 ) first and then add the new network with details and chain ID as 1337

Sudarshan
  • 702
  • 6
  • 24
2
  • Open metamask extenuation settings
  • find there network
  • click on it
  • find localhost 8545
  • remove it
  • try create new with 1337
Armen Asaduryan
  • 318
  • 3
  • 15
0

I am greeting same error but I tried this and i got the solution [https://i.stack.imgur.com/tVzp4.png] I am changing the host name to localhost and it work for me

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jul 12 '23 at 10:14