Solidity is a high-level language and has to be compiled before being deployed to Ethereum. In this recipe, you will learn how to use the solc command-line compiler to compile your smart contract to its binary and ABI.
Compiling your contract with the solc compiler
Getting ready
You need to have a working installation of the solc compiler to step through this recipe. You can also make use of the JavaScript-based solcjs to compile solidity. These commands may not work in solcjs and you have to follow its documentation.
How to do it...
- Consider the following smart contract...