Skip to Content
Mastering Blockchain - Second Edition
book

Mastering Blockchain - Second Edition

by Ankur Daharwal, Imran Bashir, Pranav Burnwal
March 2018
Beginner to intermediate
656 pages
20h 9m
English
Packt Publishing
Content preview from Mastering Blockchain - Second Edition

Installation on macOS

To install solc on macOS, execute the following commands:

$ brew tap ethereum/ethereum
$ brew install solidity
$ brew linkapps solidity  

solc supports a variety of functions. A few examples are shown as follows:

  • Display contract in a binary format:
      $ solc --bin Addition.sol  

This command will produce an output similar to the following. This shows the binary translation of the Addition.sol contract code:

Solidity compiler binary output
  • Estimate gas:
      $ solc --gas Addition.sol

This will give the following output:

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Blockchain - Third Edition

Mastering Blockchain - Third Edition

Imran Bashir
Mastering Blockchain

Mastering Blockchain

Lorne Lantz, Daniel Cawrey
Mastering Ethereum

Mastering Ethereum

Andreas M. Antonopoulos, Gavin Wood

Publisher Resources

ISBN: 9781788839044Supplemental Content