Unable to mint Contracts on Polygon Mumbai

I have already created a mumbai testnet on moralis, however the token contract for marketplace and token is not getting generated, can anyone help me out

truffle-config .js

const HDWalletProvider = require('@truffle/hdwallet-provider');
const fs = require('fs');
const mnemonic = fs.readFileSync(".secret").toString().trim();

module.exports = {
  networks: {
    development: {
      host: "127.0.0.1",     // Localhost (default: none)
      port: 8545,            // Standard Ethereum port (default: none)
      network_id: "*",       // Any network (default: none)
    },
    matic: {
      provider: () => new HDWalletProvider(mnemonic, `https://4fkifv2rb2qd.moralis.io:2053/server`),
      network_id: 80001,
      confirmations: 2,
      timeoutBlocks: 200,
      skipDryRun: true
    },
  },

  // Set default mocha options here, use special reporters etc.
  mocha: {
    // timeout: 100000
  },

  // Configure your compilers
  compilers: {
    solc: {
    }
  }
}

upon running the code truffle migrate --network matic
it is spitting out random blocks of large alphanumerics

1 Like

Hey @parthgada1

You have entered the wrong node address.

matic: {
      provider: () =>
        new HDWalletProvider(
          mnemonic,
          `https://speedy-nodes-nyc.moralis.io/xxxxxxx/polygon/mumbai`
        ),
      network_id: 80001,
      confirmations: 2,
      timeoutBlocks: 200,
      skipDryRun: true,
    },

You can find your edpoints in admin panel in Speedy Nodes section:

P.S. I’ve tested deploying on mumbai using Moralis Polygon Endpoints and it works correctly :wink:

2 Likes