Image result for solidity

This lab will walk you through the basics of Solidity programming. Throughout this sequence of codelabs, you may find you'd like more information about what is going on. If you find you need more resources on Solidity, visit the reference site at https://solidity.readthedocs.io/en/latest/ or viewing the associated screencast lectures available from class.

What you'll learn

What you'll need

CryptoZombies is a scaffolded programming site that allows you to develop a smart contract for creating a zombie version of CryptoKitties. The site is organized into "Lessons" with each lesson consisting of about a dozen chapters. Each chapter requires you to write Solidity code to complete a smart contract in order to continue to the next one. The site allows you to write and check the correctness of your code all within the browser.

  1. To get started visit https://cryptozombies.io/en/course/. You should see 6 lessons in the "Solidity Path: Beginner to Intermediate Smart Contracts"

  1. Click on the first lesson (Making the Zombie Factory).

  1. Click on a sequence and scroll down to "Start"

  1. For each chapter, read the overview on left pane (scrolling to the bottom if necessary) *before* attempting the code exercise
  2. On first screen, read the entire overview on the left pane (scrolling to the bottom if necessary), customize your zombie, then click "NEXT". You will complete all chapters in each of the lessons

The UI of each chapter is the same. Instructions appear on the left pane, a code editor appears in the upper right pane, and a Hints section appears in the lower right pane.

  1. Ensure you read the entire chapter description, before continuing. In the code editor, what you are expected to program is given in individual steps provided in Solidity comments (denoted with two forward slashes and highlighted in green).
  2. At the bottom, a "Check Answer" button allows you to test whether you've completed the chapter correctly.
  3. Try completing each level on your own. If you get stuck, the Hints section will show you where in the program you have incorrect code. An option exists for you to go straight to the answer. If you want to learn anything, try to avoid using it. For the example below, because you haven't specified the Solidity version or the contract code, when you check your answer, the red highlights indicate what needs to be fixed.

  1. At the end of a lesson, look for a "Next Chapter" button to proceed

Complete all of the chapters in Lesson 1. At the end of the chapter, name your zombie with your OdinID, take a screenshot of your zombie and include it in our lab notebook to show completion. Example for an OdinID of foobar below.

Complete the next 5 lessons of CryptoZombies, providing a screenshot of completion for each one showing your OdinID as the zombie's name whenever appropriate. (Advanced lessons will reward you with Zombie's that you do not name.) Each lesson takes about 60 minutes to complete.

Stop when you become the Phantom of Web3.

You are now semi-versed in Solidity, the de-facto language for programming smart contracts on Ethereum. You may have found its constructs difficult and confusing to use. Don't fret. Other developers do as well and security issues abound as a result of it. This is why many are moving away from it as a development language for the blockchain. We will delve more into these issues in subsequent labs so that you can begin to understand the perils in developing for the blockchain.