I am writing a ICO contract in truffle using openzeppelin

I used the below code in the truffle.js and I am trying to launch in mainnet. When I tried this I could see that the transaction is using the 100Gwei which is too high.

Question :

  1. How much is the minimum gas and gasPrice for an ICO using open Zeppelin
  2. If we are not going to give the gasPrice, will it set to 100 Gwei as default ?
  3. Please let me know the best values for these to parameters "gasPrice :" and "gas:"

     The below transaction hash which showing the Gas Price: 0.0000001 Ether (100 Gwei)



module.exports = {

// See http://truffleframework.com/docs/advanced/configuration // to customize your Truffle configuration!

networks: {

mainnet: {
  provider: infuraProvider('mainnet'),   
  gas: 400000,
  network_id: '1'


solc: {
optimizer: {
  enabled: true,
  runs: 200


1 Answer 1


you can add a default gas price in the config with the gasPrice option:

mainnet: {
  provider: infuraProvider('mainnet'),   
  gas: 400000,
  network_id: '1',
  gasPrice: 10000000000

The above sets it to 10 gwei, which should be enough, given the current, not very congested, state of the ETH network.

You can also set the gasPrice with each transaction that you create.

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.