JavaScript in Plain English

New JavaScript and Web Development content every day. Follow to join our 3.5M+ monthly readers.

Follow publication

Build Twitter Clone using React and Solidity

Kavit (zenwraight)
JavaScript in Plain English
8 min readMar 15, 2022

--

Prerequisites

Please make sure you have knowledge about the following:

Resources

Project Overview

In this article, we will first write our own Solidity-based Smart Contract, Deploy that Smart Contract on ETH blockchain and then build a Twitter clone web app that allows us to tweet and view all the tweets.

  • To view a detailed video about the project:
  • To view the full source code for this project, here is the repository.

Backend Project Setup

To get started we need to create a hardhat project. To do so, open your terminal. Create or change into a new empty directory and run the following command:

npm install ethers hardhat @nomiclabs/hardhat-waffle \
ethereum-waffle chai @nomiclabs/hardhat-ethers \
@openzeppelin/contracts dotenv

Next, let’s initialize a new development environment, for this, we will be using the hardhat command:

npx hardhat

After running this command, we will get a bunch of setup questions, just Select Create a basic sample project option and for other options press yes .

Now you should see the following files and folders created for you in your root directory:

hardhat.config.js — The entirety of your Hardhat setup (i.e. your config, plugins, and custom tasks) is contained in this file.

--

--

Published in JavaScript in Plain English

New JavaScript and Web Development content every day. Follow to join our 3.5M+ monthly readers.

Responses (1)

Write a response