Truffle Migration Errors – Intrinsic Gas Too Low on Truffle Migrate

truffletruffle-migration

I'm trying to follow the tutorial on using Truffle framework for Ethereum development at https://medium.com/@mvmurthy/full-stack-hello-world-voting-ethereum-dapp-tutorial-part-2-30b3d335aa1f.

Unfortunately I'm not able to successfully deploy the compiled contract to Ropsten testnet with

truffle migrate

in the Truffle console. The following error keeps showing up:

Error: intrinsic gas too low

I know it has something to do with a too low amount of gas being used in the transaction which deploys the contract to the testnet.

I've already tried different settings of gas in truffle.js for development which were all below the result of:

web3.eth.getBlock("pending").gasLimit

But I assume this has nothing to do with my problem.

I also found https://stackoverflow.com/questions/42589091/ethereum-truffle-metacoin-fails-with-intrinsic-gas-too-low but there the solution was to change the gas limit in genesis.json. As I want to deploy to testnet that's not an option in my case.

I'm pretty sure I'm missing a configuration setting in Truffle.

Best Answer

Ok, I found it by myself ;)

I overlooked to increase the gas option in file

2_deploy_contracts.js

file which was set to 21000 as it was automatically created by Truffle.

Changing it to 290000 solved the issue.

Related Topic