Hello World

Before getting started with our first contract, let us set up the diectory structure I will be following throughout the book. As I said before, we will be storing all our code within the src directory.

  1. Create a directory called SolidityBasics inside src. This directory will contain all the chapters that deal with basic Solidity Syntax.
  2. Create another directory called HelloWorld inside SolidityBasics. This directory will contain all the code related to the Hello World contract. Each chapter will have its own directory.
  3. Create a file called HelloWorld.sol inside HelloWorld.

Your directory structure should look something like this:

├── src/
│ ├── SolidityBasics/
│ │ ├── HelloWorld/
| | │ ├── HelloWorld.sol
│ │ │ └── HelloWorld.t.sol

You are now ready to write your first smart contract in Solidity, and learn about what all goes inside a bare-bones smart contract.