Following is a snippet from my truffle-config.js file
networks: {
// Useful for testing. The `development` name is special - truffle uses it by default
// if it's defined here and no other network is specified at the command line.
// You should run a client (like ganache-cli, geth or parity) in a separate terminal
// tab if you use this network and you must also set the `host`, `port` and `network_id`
// options below to some value.
//
development: {
host: "127.0.0.1", // Localhost (default: none)
port: 8545, // Standard Ethereum port (default: none)
network_id: "*", // Any network (default: none)
},
rinkeby: {
provider: function () {
return new HDWalletProvider(mnemonic, "https://rinkeby.infura.io/v3*************************************");
},
from: "0xe95745a8F4E3cDb1cF5bfFD4A94F0B249e99f489",
network_id: 4,
gas: 4500000,
gasPrice: 10000000000,
}
I am trying to deploy my contract on rinkeby using an address generated by metamask. However when I run truffle migrate --network rinkeby
It gives me the following error:
C:\Users\DELL\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\provider\index.js:56
throw new Error(errorMessage);
^
Error: There was a timeout while attempting to connect to the network.
Check to see that your provider is valid.
If you have a slow internet connection, try configuring a longer timeout in your Truffle config. Use the networks[networkName].networkCheckTimeout property to do this.
at Timeout._onTimeout (C:\Users\DELL\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\provider\index.js:56:1)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)
Any suggestions why this might be happening.