soliditynft

ProviderError: transaction underpriced on Mumbai Testnet


I am building an NFT Market on the Polygon network.

I am able to deploy my code on localhost and everything works fine.

But when I try to it deploy to the mumbai testnet using the command npx hardhat run scripts/deploy.js --network mumbai

I run into this error. ProviderError: transaction underpriced


Solution

  • Actually I too got this error in morning. Somehow I believe default gasPrice is not picked up. So I just updated my hardhat config file with following :-

    mumbai: {
          // Infura
          url: `https://polygon-mumbai.infura.io/v3/${INFURA_API_KEY}`,
          accounts: [privateKey1],
          gasPrice: 35000000000,
          saveDeployments: true,
        },
    

    Earlier I was not using gasPrice explicitly. When I put some value it, it worked.