Developing Smart Contract
we will begin exploring smart contract development, using the Solidity pro‐ gramming language.
Setting Up a New Truffle Project
1. Create a New Directory
$ mkdir greeter
$ cd greeter2. Initialize the Truffle Project
$ truffle init✔ Preparing to download
✔ Downloading
✔ Cleaning up temporary files
✔ Setting up box
Unbox successful. Sweet!
Commands:
Compile: truffle compile
Migrate: truffle migrate
Test contracts: truffle test3. Project Directory Structure
Directory Overview
4. Truffle Commands
5. Configuration
Our First Test
1. Create a Simple Smart Contract
Contract Explanation
2. Create a Migration Script
Script Explanation
3. Write a Test Script
Test Script Explanation
4. Run the Tests
Last updated