Skip to main content
2 of 3
Increase gas limit source
0xCrema.eth
  • 1.2k
  • 1
  • 12
  • 21

Actually the maximum gas per transaction is given by eth.getBlock('latest').gasLimit which is around 4.7million today.

Edit : Gas limit is increasing and it seems the target is to reach a limit of 6.7million so without to do anything you might soon be able to deploy your contract. Source: Reddit

In order to deploy your contract you have to reduce the cost of deployment.

There is ways to reduce gas cost:

  1. Simplify the contract. (especially constructors)
  2. Use the optimizer
  3. Split it into multiple contracts.
  4. Refactor to use libraries

You can for example try to use SafeMath instead of your own implementation of it.

Or even though you might have done it but you can remove part used to debug like

// @notice For debugging purposes when using solidity online browser function whoAmI() constant returns (address) { return msg.sender; } 

By the way the discussion to increase gas limit are on the way, some miner pools already increased it but some huge one are still using this "old" limit used to prevent DDOS attacks. This thread on Reddit explains a bit the current issue with gas limit.

0xCrema.eth
  • 1.2k
  • 1
  • 12
  • 21