0

I am trying to deploy my smart contracts on the Matic Mumbai testnet. Please find below my truffle-config.js:

module.exports = {
  plugins: ['solidity-coverage'],
  migrations_directory: './dist/migrations',
  networks: {
    development: {
      host: '127.0.0.1', // Localhost (default: none)
      port: 7545, // Standard Ethereum port (default: none)
      network_id: '*', // Any network (default: none)
    },
    matic: {
      networkCheckTimeout: 10000, 
      provider: () => new HDWalletProvider(mnemonic, `https://rpc-mumbai.maticvigil.today`),
      network_id: 80001,
      confirmations: 2,
      timeoutBlocks: 200,
      skipDryRun: true,
      
    },

  // Set default mocha options here, use special reporters etc.
  mocha: {
    //timeout: 100000,
    reporter: 'eth-gas-reporter',
    reporterOptions: {
      excludeContracts: ['Migrations'],
    },
  },

  // Configure your compilers
  compilers: {
    solc: {
      version: solcconfig.version,
      settings: {
        optimizer: solcconfig.optimizer,
        evmVersion: solcconfig.evmVersion,
      },
    },
  },

  db: {
    enabled: false,
  },
};

But somehow I can’t connect to the network: Error: There was a timeout while attempting to connect to the network. any idea? I tried to google it and changed https://rpc-mumbai.maticvigil.today by https://rpc-mumbai.matic.today but then I have an other error. Thanks for the help!

Version: Truffle version: v5.4.0 Nodejs: v14.16.0

1
  • Matic is a congested network already, I would install my own bor & heimdall processes
    – Nulik
    Jul 15, 2021 at 14:21

1 Answer 1

0

Try changing the rpc url to

// Mainnet
"https://rpc-mainnet.maticvigil.com/"
// Testnet
"https://rpc-mumbai.maticvigil.com/"

Hope it helps!

2

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.