Hello,
I'm trying to deploy a smart contract on ropsten testnet but i'm having issues below are details;
Truffle Config.
const HDWalletProvider = require('truffle-hdwallet-provider');
const infuraKey = "c5787339db824d0c8383ce97bff4dbb1";
const fs = require('fs');
const mnemonic = fs.readFileSync(".secret").toString().trim();
module.exports = {
networks: {
ropsten: {
provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/infuraKey`),
network_id: 3,
gas: 5500000,
confirmations: 2,
timeoutBlocks: 200,
skipDryRun: true
}
}
}
when I write "truffle migrate --reset --network ropsten"
Outcome
Compiling your contracts...
===========================
> Compiling .\contracts\Migrations.sol
> Compiling .\contracts\Ownable.sol
> Compiling .\contracts\SafeMath.sol
> Compiling .\contracts\cert.sol
> Compiling .\contracts\Ownable.sol
> Compiling .\contracts\SafeMath.sol
> Artifacts written to C:\Users\nwagb\Documents\b\build\contracts
> Compiled successfully using:
- solc: 0.5.12+commit.7709ece9.Emscripten.clang
C:\Users\nwagb\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\nwagb\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\provider\index.js:56:1)
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7)
Mar 11, 2020, 7:41 PM
This will help you
https://www.trufflesuite.com/tutorials/using-infura-custom-provider
https://www.trufflesuite.com/tutorials/using-infura-custom-provider
Mar 11, 2020, 8:05 PM
Okay tnx
Mar 11, 2020, 8:06 PM
Also check if your internet is on and connection is not slow
Mar 11, 2020, 8:07 PM
My internet connection is strong
Mar 11, 2020, 8:09 PM