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

viktor.w
  • 1
  • 1

1 Answers1

0

Try changing the rpc url to

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

Hope it helps!

  • Ramalingam but then I have the following error message: --only replay-protected (EIP-155) transactions allowed over RPC – viktor.w Jul 16 '21 at 10:02
  • try adding chainid to the transaction object, 'chainId': 80001, refer here: (https://ethereum.stackexchange.com/questions/94412/valueerror-code-32000-message-only-replay-protected-eip-155-transac) – Keerthana Ramalingam Jul 16 '21 at 11:56