Tutorial

Solidity Twitter Project - Part 1

10 steps

In this tutorial, we’ll be providing an overview of the functionalities that will be covered in our Twitter project as well as initialising the Hardhat project folder which we’ll be using for the rest of this module. The bulk of this tutorial, however, will be spent on writing functions that achieve certain purposes. At the end of writing these functions, we’ll run our smart contract against a test script to check if the functions we’ve written are correct.

Learners are expected to have knowledge of Solidity before proceeding with this module. Please head to our Introduction to Blockchain & Solidity module if you haven’t yet learnt Solidity or require a refresher.

Helpful prior knowledge

Solidity


Learning Outcomes

By the end of this tutorial, you will be able to:

  • Initialise a Hardhat project directory
  • Confidently handle data structures such as Structs, Arrays and Mappings in Solidity
  • Write functions given the problem statement of what they should achieve
  • Test your smart contract against a given unit test script

Tutorial Steps

Total steps: 10

  • Step 1: Overview of Twitter Project
  • Step 2: Initialise Hardhat Project Directory
  • Step 3: Understanding the Project Directory
  • Step 4: Overview of Smart Contract
  • Step 5: Understanding the State Variables
  • Step 6: registerAccount()
  • Step 7: accountExists()
  • Step 8: postTweet()
  • Step 9: readTweets()
  • Step 10: Testing the Smart Contract

Help Center Need help?

Find articles to support you through your journey or chat with our support team.

Help Center