Chapter 3

  1. A Solidity contract can be large enough to be deployed into a single block of Ethereum blockchain. An Ethereum block has a maximum gas limit that, at the time of writing, is 8 million gas units. If your contract takes 8 million or less gas units at the time of deployment, you can deploy your contract on the blockchain. If it takes more gas than 8 million gas units, consider enabling optimization on your contract; this would reduce the amount of gas significantly. If, even after enabling optimization, your contract is still taking more than 8 million gas units, then you would have to break your contracts into multiple contracts and link those contracts together with interfaces.
  1. Prior to Solidity version 0.4.22, you could define ...

Get Mastering Blockchain Programming with Solidity now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.