This chapter covers
- Deploying contracts and interacting with them through geth’s console
- Simplifying console-based deployment with Node.js
- Deploying on a private network
- Deploying on a mock network
In chapter 4, you had a first taste of deploying a smart contract on the Ethereum network. You did so through the Ethereum wallet and through Remix (with MetaMask). It looked relatively easy, as it involved only a few clicks on a well-designed screen. On the other hand, the convenience and simplicity of the user interface hid from you the key steps that take place on the network when contract deployment is in progress. Did you ask yourself, for example, how the code you entered on the code editor (of the wallet or Remix) got compiled, packaged, and sent to the Ethereum network, and how it finally got installed on each node?
In the last three chapters, you learned in depth how to develop a smart contract with Solidity. It’s time to learn the deployment process in depth as well. It’s important knowledge to have if you want to truly understand how decentralized applications work under the hood, and if you want to be able to troubleshoot postdeployment issues you might experience.