I am trying to deploy my contract to the ETH mainnet / livenet.

Everything works fine for the testnet, and also the dry-run for the mainnet works, but not the actual migration.

Here is the output:

truffle migrate --network live                                                                                                                                                                                                     1 ⨯

Compiling your contracts...
> Everything is up to date, there is nothing to compile.

Migrations dry-run (simulation)
> Network name:    'live-fork'
> Network id:      1
> Block gas limit: 30029267 (0x1ca35d3)


   Deploying 'TestContract'
   > block number:        13060683
   > block timestamp:     1629442749
   > account:             <my_account>
   > balance:             0.086514396
   > gas used:            3742802 (0x391c52)
   > gas price:           2 gwei
   > value sent:          0 ETH
   > total cost:          0.007485604 ETH

   > Total cost:         0.007485604 ETH

> Total deployments:   1
> Final cost:          0.007485604 ETH

Starting migrations...
> Network name:    'live'
> Network id:      1
> Block gas limit: 29970705 (0x1c95111)


   Deploying 'TestContract'

Error:  *** Deployment Failed ***

"TestContract" could not deploy due to insufficient funds
   * Account:  <my_account>
   * Balance:  94000000000000000 wei
   * Message:  insufficient funds for gas * price + value
   * Try:
      + Using an adequately funded account
      + If you are using a local Geth node, verify that your node is synced.

    at /usr/local/lib/node_modules/truffle/build/webpack:/packages/deployer/src/deployment.js:365:1
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at Migration._deploy (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:70:1)
    at Migration._load (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:56:1)
    at Migration.run (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:217:1)
    at Object.runMigrations (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/index.js:150:1)
    at Object.runFrom (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/index.js:110:1)
    at Object.run (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/index.js:87:1)
    at runMigrations (/usr/local/lib/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:258:1)
    at Object.run (/usr/local/lib/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:221:1)
    at Command.run (/usr/local/lib/node_modules/truffle/build/webpack:/packages/core/lib/command.js:172:1)
Truffle v5.4.5 (core: 5.4.5)
Node v12.21.0

I have 0.09 ETH on my wallet, which should be enough to cover the migration.

Can anybody help me here?

2 Answers 2


This is the error:

 * Try:
      + Using an adequately funded account
      + If you are using a local Geth node, verify that your node is synced.

I think you should add more ETH to cover the migration. Testnet gas fees are way lower than mainnet, so do not take that value to justify mainnet deployments.

  • Hm okay, I thought the try-run gas estimation is more or less accurate
    – user79384
    Aug 20, 2021 at 7:25
  • is there a way to see how much is actually needed?
    – user79384
    Aug 20, 2021 at 7:30
  • It could be something else, but lets take it step by step and figure it out. Its best to start with the basics. Try adding a web3 confirmation, metamask will show you the gas estimate. I'm not sure if there is a better way to find this out Aug 20, 2021 at 7:45
  • Do you have an article about adding a web3 confirmation? I just added another 0.09 ETH (0.18 in total now) -> still the same error.
    – user79384
    Aug 20, 2021 at 7:52
  • Is your Geth node synced? Aug 20, 2021 at 7:58

I found a few helpful resources in this Discord group : https://discord.gg/MffMqPF3. The community is quite helpful as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.