Planning our first blockchain project
Before we start writing the code for our first project, we’ll practice doing this by going through a visual planning exercise to help us get a visual understanding of how we will approach the project. This helps in setting a structure for the project and not only acts as a roadmap throughout the development of the project but also enhances our understanding of the core components of the project.
Let’s discuss these core components in detail.
Structs
Our program is going to contain multiple structs (we briefly touched upon structs in Chapter 2, Rust – Necessary Concepts for Building Blockchains, in the Advantages of Rust-based languages compared to Solidity section). Structs enable us to create data types using a mixture of data types that Rust already understands. Structs also help us keep our code highly modular, readable, and reusable.
The first thing we will start with is a block – the smallest entity...