Chapter 4. Deploying your first smart contract

 

This chapter covers

  • Deploying a contract onto the Ethereum network
  • Interacting with the contract over the network
  • Nodeless contract deployment and interaction with MetaMask

In the first two chapters, you started building SimpleCoin, your basic cryptocurrency. You did so in the Remix IDE and tried out its minimal functionality through its JavaScript-based EVM emulator. The experience was useful to help you understand from a conceptual point of view what a smart contract looks like and how to activate and interact with it. But SimpleCoin still looks like a bit of code running in an IDE. Now that you’re becoming familiar with the Ethereum platform, you may be wondering, “Wouldn’t it be nice to see SimpleCoin in action in a more realistic environment?” That’s exactly what you’ll be doing in this chapter.

You’ll deploy the SimpleCoin contract onto the Ethereum network, and then you’ll interact with it in a couple of ways. First, you’ll go through the Ethereum wallet, which requires you to import a copy of the blockchain locally, and then you’ll go through MetaMask, a third-party tool that allows you to connect to the Ether-eum network without accessing an Ethereum client or the wallet.

4.1. Deploying a contract onto the network

4.2. Interacting with the contract

4.3. Nodeless deployment through MetaMask

Summary