0

I am trying to redeploy a contract on Ropsten Testnet using the command:

truffle migrate --reset -f 1567182283 --network ropsten

Here, "1567182283" is the prefix of my migration file. Upon executing, it gets stuck after compiling the contract:

Compiling your contracts...
===========================
> Everything is up to date, there is nothing to compile.

I even left it overnight but there was no message or anything, it just gets stuck like this for more than 6-7 hours. Below is my truffle-config.js:

const HDWalletProvider = require('truffle-hdwallet-provider');
const fs = require('fs');
const mnemonic = fs.readFileSync(".secret").toString().trim();
module.exports = {
  // rpc: {
  //   host: "localhost",
  //   port: 8545
  // },
  networks: {
    development: {
      host: "127.0.0.1",     // Localhost (default: none)
      port: 9545,            // Standard Ethereum port (default: none)
      network_id: "*",       // Any network (default: none)
      websockets: true
    },
    ropsten: {
      provider: new HDWalletProvider(mnemonic, "https://ropsten.infura.io/v3/KEY"),
      network_id: 3,       // Ropsten's id
      gas: 550000000,        // Ropsten has a lower block limit than mainnet
      networkCheckTimeout: 1000000000,
      timeoutBlocks: 200,
      skipDryRun: true,
    },
    rinkeby: {
      provider: function() {
        return new HDWalletProvider(mnemonic, "https://rinkeby.infura.io/v3/KEY");
      },
      network_id: 4,
      networkCheckTimeout: 1000000000,
      timeoutBlocks: 200
    }
  }
}

Any way to solve this problem? I have tried running the command without --reset and -f as well but still the same.

| improve this question | | | | |
  • Delete your build folder and try again. – goodvibration Jan 19 at 6:59
  • I have tried that as well. Does not work – Tanay Bhartia Jan 19 at 7:06
0

Your network timeout is very long. delete that line. It will then give you an error telling you what to do next. Probably to do with lack of reply to your infura ping.

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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