"ProviderError: transaction underpriced" during deployment using @openzeppelin/hardhat-upgrades

Hi,
ran into the error during the deployment to the Mainnet.
I'm using "@openzeppelin/hardhat-upgrades" plugin.
I got the error: "ProviderError: transaction underpriced" and the process is stopped.
But I see the very first transaction is succeeded:

How to avoid such an error? Does it mean what the gasPrice is too low?
Is it possible to restart the deployment process from the point of failure?

3 Likes

I had the same problem, still trying to understand.

The gas prices you have specifed in your hardhat.config.ts is too low for the transaction to get mined. The gas price is the price in ETH (in GWEI) that you're willing to pay.

You can see the current "market rate" on a gas station, such as etherscan. https://etherscan.io/gastracker

The price can move with the demand on the network.

1 Like

You can use the txOverrides option to set the gas price or other transaction parameters. See https://github.com/OpenZeppelin/openzeppelin-upgrades/issues/85#issuecomment-1664101542

If you run your script again, it will resume the deployment process.