In this chapter, we designed and partially developed our first smart contract, or chaincode, following the use case described in Chapter 9, Building a Next-Generation Oracle B2B Platform. To begin, I explained why it is best to start designing your smart contract with a model-first approach. It is important to get to know your participants and design your data objects, transactions, and events before coding the contract. Also in this chapter, we designed our model and separated the data objects, transactions, and events into four different domains (commonly known as namespaces), namely basic, accident, vehicle repair, and insurance. For each of the domains, I reviewed the contents of the data objects, its purpose and relationships, and I described the transactions and events that we want to expose to external applications.
After designing the smart contract, I explained how to set up your development environment, including tools such as cURL, Docker and Docker Compose, the Go programming...