It looks like the contract was deployed well on mainnet However, eventually this error occurs

Saving migration to chain.insufficient funds for gas * price + value

Does it mean that the migration was not saved?

Does it mean the contract should be re-deployed again? Or it is possible to fix?


ADDITIONAL truffle.js

live: {
    provider: function() {
        return new HDWalletProvider(MNEMONIC, `https://mainnet.infura.io/v3/${INFURA_API_KEY}`)
    network_id: '1',
    //gas: 8000000,
    gasPrice: 140000000000,

1 Answer 1


Yes, the migration has failed. This error means you have insufficient Ethers to deploy your contract, you should therefore redeploy with the correct amount of ETH.

  • thanks! Does it mean I should have more ETH, or should I change my truffle.js also. E.g: currently I have gasPrice: 140000000000, added in ticket description more details. Jul 28, 2020 at 12:23
  • You can do both. Your gas price is currently at 140 gwei. You can see here ethgasstation.info the average current gas price. It is 70gwei at the time of this post so you can decrease your gas price in truffle.js to match the average market price. If it not sufficient, get more ETH.
    – clement
    Jul 28, 2020 at 13:28
  • Got it thanks, btw just wonder the contract was deployed well but the output about saving migrations was strange. I'm able to see the contract on Etherscan. Wonder could it be just some truffle issue with logs/messaging...? Or could I have issue with following migrations in future? Jul 28, 2020 at 14:01
  • 1
    Are you able to interact with you contract ? If yes, that's mean it is deployed but that's would be surprising regarding the Truffle error.
    – clement
    Jul 28, 2020 at 14:05
  • Yes I was able to interact with the contract, thanks! Jul 30, 2020 at 22:15

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.