<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Chichi Johnson</title>
    <description>The latest articles on Forem by Chichi Johnson (@christy5727).</description>
    <link>https://forem.com/christy5727</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F347615%2F661d029b-5a0e-4bdf-ba13-34706a9ef306.png</url>
      <title>Forem: Chichi Johnson</title>
      <link>https://forem.com/christy5727</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/christy5727"/>
    <language>en</language>
    <item>
      <title>My Journey to becoming a Quantum Engineer</title>
      <dc:creator>Chichi Johnson</dc:creator>
      <pubDate>Wed, 01 Apr 2026 21:19:20 +0000</pubDate>
      <link>https://forem.com/christy5727/my-journey-to-becoming-a-quantum-engineer-1o4k</link>
      <guid>https://forem.com/christy5727/my-journey-to-becoming-a-quantum-engineer-1o4k</guid>
      <description>&lt;p&gt;I have procrastinated on documenting this process for the longest time. But I think i am ready now (maybe). &lt;br&gt;
Coming from a front end engineering background, I am fascinated by the work being done by the quantum engineers at IBM. I am not that great with maths and statistics but I believe anything can be learned with tons of practice and consistency. I want to use this platform to hold myself accountable (that is if i don't give up half way and delete all my posts. I'll try not to btw). &lt;/p&gt;

&lt;p&gt;This is an article describing &lt;a href="https://www.ibm.com/think/topics/quantum-computing" rel="noopener noreferrer"&gt;what quantum computing is&lt;/a&gt; and some of it's use cases.&lt;/p&gt;

&lt;p&gt;I became an IBM qiskit advocate late last year and I have been exposed to a lot of resources and networked a bunch as well. However, I still think to get to a higher level, there's still a lot of work I need to do individually behind closed doors. &lt;/p&gt;

&lt;p&gt;I guess that's why I am embarking on this journey and you all are coming with me lol. I will be posting content here weekly and consistently. No using AI. &lt;/p&gt;

&lt;h2&gt;
  
  
  Certification
&lt;/h2&gt;

&lt;p&gt;The first step of my plan is to pass the &lt;a href="https://www.ibm.com/training/certification/ibm-certified-quantum-computation-using-qiskit-v2x-developer-associate-C9008400" rel="noopener noreferrer"&gt;Qiskit v2 certification exam&lt;/a&gt;. I will be following the curriculum outlined there since it covers everything i need to know in order to pass the exam. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fecip2zn0bz66jva9cbve.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fecip2zn0bz66jva9cbve.png" alt="Qiskit v2 certification exam curriculum" width="800" height="652"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Career path
&lt;/h2&gt;

&lt;p&gt;The second step should be choosing a specific area to focus on since quantum computing has a vast amount of fields. Build stuff and contribute to that field. &lt;br&gt;
This is an article that describes &lt;a href="https://thequantuminsider.com/2022/06/29/how-to-start-a-career-get-a-job-in-quantum-computing/" rel="noopener noreferrer"&gt;8 quantum computing careers&lt;/a&gt;. I haven't decided on an area yet.&lt;/p&gt;

&lt;p&gt;I actually applied to some PhD programs last year but I got rejected from most of them except one. Still waiting on a response from the last school. Fingers crossed. If I don't get accepted, I think I would just focus on trying to get more research experience before applying again or maybe just abandon it all together and focus on the industry 🤷🏽‍♀️. &lt;/p&gt;

&lt;p&gt;Yeah. I guess this is what I have for now. Until I have something new to share. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcw23t01emzv6r3vtcum5.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcw23t01emzv6r3vtcum5.gif" alt="Until next time" width="480" height="206"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>quantumcomputing</category>
      <category>qiskit</category>
      <category>career</category>
      <category>learning</category>
    </item>
    <item>
      <title>Setting Up a Desktop Project with Wails, React, and Vite: A Step-by-Step Guide</title>
      <dc:creator>Chichi Johnson</dc:creator>
      <pubDate>Mon, 23 Oct 2023 21:07:04 +0000</pubDate>
      <link>https://forem.com/christy5727/setting-up-a-desktop-project-with-wails-react-and-vite-a-step-by-step-guide-1b0m</link>
      <guid>https://forem.com/christy5727/setting-up-a-desktop-project-with-wails-react-and-vite-a-step-by-step-guide-1b0m</guid>
      <description>&lt;h2&gt;
  
  
  INTRODUCTION
&lt;/h2&gt;

&lt;p&gt;In this article, I’ll walk you through how to quickly set up a desktop project using &lt;a href="https://wails.io/" rel="noopener noreferrer"&gt;Wails&lt;/a&gt;, &lt;a href="https://react.dev/" rel="noopener noreferrer"&gt;React&lt;/a&gt;, and &lt;a href="https://vitejs.dev/" rel="noopener noreferrer"&gt;Vite&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Wails uses Go for the backend and any front-end framework of your choosing. For this article, we will stick with React. &lt;/p&gt;

&lt;h2&gt;
  
  
  PREREQUISITES
&lt;/h2&gt;

&lt;p&gt;To be able to successfully run this project on your machine, you need to install the following: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go: You need to have Go 1.18 or above. &lt;a href="https://go.dev/dl/" rel="noopener noreferrer"&gt;Check here to download Go on your machine&lt;/a&gt;. You can check if Go is installed on your machine by running the command
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;go version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Node: You need to have node 15 or above. &lt;a href="https://nodejs.org/en/download" rel="noopener noreferrer"&gt;Check here to download the latest version of node&lt;/a&gt;. By installing node, npm is also installed. You can check if node is installed by running
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;node -–version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and check if npm is installed by running&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm -–version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Wails CLI: You can install the wails CLI by running the command
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; go install github.com/wailsapp/wails/v2/cmd/wails@latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  SETTING UP THE DEVELOPMENT ENVIRONMENT
&lt;/h2&gt;

&lt;p&gt;Let us create a React project by running the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;wails init -n myproject -t react
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you get an error saying “wails not found”, then you are probably missing “go/bin” in your path. You can add it to your path by running the command &lt;code&gt;export PATH=$PATH:~/.bin:~/go/bin&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2dy4gs8mwdunayb6jw1w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2dy4gs8mwdunayb6jw1w.png" alt=" " width="668" height="226"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Your terminal should look like the above if your project was run successfully. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmsyihlh4asg5x6hs0c4z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmsyihlh4asg5x6hs0c4z.png" alt=" " width="223" height="404"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Your folder structure should look like the above. You can make changes to the frontend of your application by editing the files in your “frontend” folder. &lt;/p&gt;

&lt;h2&gt;
  
  
  RUNNING YOUR APPLICATION
&lt;/h2&gt;

&lt;p&gt;Now, we need to start our project. We have to change directory by running the command &lt;code&gt;cd myproject&lt;/code&gt; to make sure we are in the newly created project folder. Then, run&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;wails dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F95mgyzi8uge3cdpzfby4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F95mgyzi8uge3cdpzfby4.png" alt=" " width="800" height="387"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;An icon will pop up and your project will be running successfully!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcjy56hrvz53o1d29gxvd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcjy56hrvz53o1d29gxvd.png" alt=" " width="800" height="605"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>react</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Introduction to databases</title>
      <dc:creator>Chichi Johnson</dc:creator>
      <pubDate>Tue, 12 Sep 2023 17:59:43 +0000</pubDate>
      <link>https://forem.com/christy5727/introduction-to-databases-3bni</link>
      <guid>https://forem.com/christy5727/introduction-to-databases-3bni</guid>
      <description>&lt;h2&gt;
  
  
  INTRODUCTION
&lt;/h2&gt;

&lt;p&gt;In ancient days, humans stored data in cave paintings, cuneiform tablets and papyrus scrolls. With the invention of the computer, data storage became more automatic. At first, the flat file model was invented in the early 1970s by &lt;a href="https://www.ibm.com/us-en" rel="noopener noreferrer"&gt;IBM&lt;/a&gt; where data was stored in a single table which consisted of text files with no markup and data separated by commas or delimiters. This method is inefficient in a number of ways: It is not scalable, it has limited query capabilities and data integrity and consistency was difficult.&lt;/p&gt;

&lt;p&gt;In this article, we are going to delve into what a database is and the different types of modern database management systems that are in existence today. &lt;/p&gt;

&lt;h2&gt;
  
  
  WHAT IS A DATABASE (DB)
&lt;/h2&gt;

&lt;p&gt;A database is a systematic collection of records in such a manner that it is easily accessible and organised. &lt;/p&gt;

&lt;h2&gt;
  
  
  WHAT IS A DATABASE MANAGEMENT SYSTEM (DBMS)
&lt;/h2&gt;

&lt;p&gt;A database management system is a system designed to manage databases. It gives us the ability to add data, update data, create data and delete data using queries. &lt;/p&gt;

&lt;h2&gt;
  
  
  TYPES OF DATABASE MANAGEMENT SYSTEMS
&lt;/h2&gt;

&lt;p&gt;There are different types of databases in existence today but we will be talking about some common databases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Relational Database&lt;/li&gt;
&lt;li&gt;Document Database&lt;/li&gt;
&lt;li&gt;Graph Database&lt;/li&gt;
&lt;li&gt;Key-Value Database&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  RELATIONAL DATABASE
&lt;/h2&gt;

&lt;p&gt;A relational database is a type of database that organizes data in rows and columns and these rows and columns come together to form a table.&lt;br&gt;
Relational databases give us functionality such as referential integrity which means that all the keys referenced are valid. &lt;br&gt;
Relational databases use sql as its query language. &lt;/p&gt;

&lt;p&gt;Below is an example of a simple relational database schema.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc9gp9czs3eamohj3a3zx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc9gp9czs3eamohj3a3zx.png" alt=" " width="481" height="561"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Relational databases have a lot of merits such as data consistency, data integrity and query optimization, there are also some demerits to it such as fixed schema meaning that the structure of the database has to be defined in advance and there are some issues with scalability since it poses challenges and is costly when trying to horizontally scale relational databases. &lt;/p&gt;

&lt;p&gt;Popular relational databases are &lt;a href="https://www.mysql.com/" rel="noopener noreferrer"&gt;mysql&lt;/a&gt;, &lt;a href="https://www.postgresql.org/" rel="noopener noreferrer"&gt;PostgreSQL&lt;/a&gt; and &lt;a href="https://www.microsoft.com/en-us/sql-server/sql-server-downloads" rel="noopener noreferrer"&gt;Microsoft sql server&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  DOCUMENT DATABASE
&lt;/h2&gt;

&lt;p&gt;In this type of database, data is stored in a JSON like format which makes it easier  to query the database especially if data sent between the server and client is also in this JSON format.&lt;/p&gt;

&lt;p&gt;Below is an example of a JSON document.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "_id": 1,
  "first_name": "Ify",
  "last_name": "Johnson",
  "email_address": "ify@books.com",
  "age": "23",
  "billing_address": {
    "address": "1, wobo street",
    "city": "port harcourt",
    "state": "rivers state",
    "postal_code": 500012,
    "country": "Nigeria"
  }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A document database makes use of collections. Collections are used to group related documents together.&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.mongodb.com/" rel="noopener noreferrer"&gt;MongoDB&lt;/a&gt; is a great example of a document database.&lt;/p&gt;

&lt;p&gt;Document databases support horizontal scaling where data can be distributed across multiple servers and can handle large amounts of data, they have flexible schemas and flexible query languages. Schemas can also evolve over time. Schemas can be removed or added without breaking your code or affecting existing data. &lt;br&gt;
&lt;a href="https://www.mongodb.com/document-databases" rel="noopener noreferrer"&gt;Check here for more details about document databases.&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  GRAPH DATABASE
&lt;/h2&gt;

&lt;p&gt;A graph database is a type of database that stores data in nodes and forms a relationship between these nodes instead of storing data in tables like in a relational database or a document like in a document database. &lt;/p&gt;

&lt;p&gt;Examples of query languages that can be used to query and manipulate a graph database includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.janusgraph.org/getting-started/gremlin/" rel="noopener noreferrer"&gt;Gremlin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://neo4j.com/developer/cypher/" rel="noopener noreferrer"&gt;Cypher&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.gqlstandards.org/home" rel="noopener noreferrer"&gt;Graph Query Language&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Below is a diagram of a graph structure&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd3elt9u0fu7q607gvdnf.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd3elt9u0fu7q607gvdnf.jpg" alt=" " width="471" height="391"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Although graph databases are very flexible and performant, they can include complexity into simple data models and since it’s not like other NoSQL or relational databases, developers have to learn how to query and model graph data.&lt;/p&gt;

&lt;h2&gt;
  
  
  KEY-VALUE DATABASE
&lt;/h2&gt;

&lt;p&gt;This kind of database uses a key-value format to store data, whereby the key is used as a unique identifier to retrieve its corresponding value. &lt;/p&gt;

&lt;p&gt;A great example of a key-value database is &lt;a href="https://redis.io/" rel="noopener noreferrer"&gt;Redis&lt;/a&gt;. Redis, which stands for remote dictionary server, is an in-memory key-value data storage. &lt;/p&gt;

&lt;p&gt;Key-Value databases are highly scalable since it supports horizontal scaling, it also supports caching to improve read performance and thereby reduces the load on the database. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.mongodb.com/databases/key-value-database" rel="noopener noreferrer"&gt;Check here for more details about key-value databases .&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  CONCLUSION
&lt;/h2&gt;

&lt;p&gt;Different types of databases are in existence now, each serving a unique purpose. You don’t have to go for the trendiest or most popular database, simply find the database that suits your particular project needs. For example, a social media application can make use of the graph database and an e-commerce website can make use of a relational database. &lt;/p&gt;

</description>
      <category>database</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>How to verify a contract on Etherscan.</title>
      <dc:creator>Chichi Johnson</dc:creator>
      <pubDate>Wed, 16 Aug 2023 16:48:47 +0000</pubDate>
      <link>https://forem.com/christy5727/how-to-verify-a-contract-on-etherscan-495</link>
      <guid>https://forem.com/christy5727/how-to-verify-a-contract-on-etherscan-495</guid>
      <description>&lt;h2&gt;
  
  
  INTRODUCTION
&lt;/h2&gt;

&lt;p&gt;In this tutorial, I will be showing you how to verify a contract with no external imports and also how to verify a contract with external imports. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://etherscan.io/" rel="noopener noreferrer"&gt;Etherscan&lt;/a&gt; is a Block Explorer and Analytics Platform for Ethereum. With etherscan, users can view and verify smart contracts, check the current balance and transaction history of a particular Ethereum address and witness real-time transactions taking place on the Ethereum network.&lt;/p&gt;

&lt;p&gt;Contract verification is important because it gives room for transparency and trust. Users can view your source code since everything will be public once you verify your smart contract.  Users can just use your smart contract address to check if your smart contract is verified on etherscan.&lt;/p&gt;

&lt;h2&gt;
  
  
  Verifying a contract with no external imports.
&lt;/h2&gt;

&lt;p&gt;Let's write a simple smart contract and deploy it using the &lt;a href="https://remix-project.org/" rel="noopener noreferrer"&gt;remix IDE&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// SPDX-License-Identifier: MIT

pragma solidity ^0.8.13;

// contract address = 0x2f75D20eFE3115c2334bcc2e4CeB06b3Db30809c

contract Counter {
    uint public count = 0;

    //get count 
    function getCount() public view returns(uint){
        return count;
    }

    //increment count
    function incrementCount() public {
        count += 1;
    }

    //decrement count
    function decrementCount() public {
        count -= 1;
    }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A contract to get count, increment count and decrement count. I have already deployed to the Goerli testnet and gotten a contract address. Now, let us verify it. &lt;/p&gt;

&lt;p&gt;Head over to &lt;a href="https://etherscan.io/" rel="noopener noreferrer"&gt;etherscan.io&lt;/a&gt;. Hover on the Ethereum logo at the top right corner of your screen to toggle between testnets. Since I used the Goerli testnet, I will choose Goerli testnet. If you deployed your contract to another testnet, choose that testnet.&lt;/p&gt;

&lt;p&gt;On the navigation bar, hover on 'Misc' and click on 'verify contract'.&lt;/p&gt;

&lt;p&gt;Your screen should be looking like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsvt1aqaxk1rvxvac860h.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsvt1aqaxk1rvxvac860h.PNG" alt="etherscan verify contract" width="800" height="387"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's fill the form. Enter in your contract address, compiler type (since I am using a single file, I chose 'Solidity (single file)'), compiler version and license. &lt;/p&gt;

&lt;p&gt;This is how my form looks like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjgc5lym5loxfep01dw7o.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjgc5lym5loxfep01dw7o.PNG" alt="Filled form" width="800" height="330"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, click on 'continue', you will be redirected to another page that looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp13kh4q5cwndgzvd9gx2.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp13kh4q5cwndgzvd9gx2.PNG" alt="Next page" width="800" height="383"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There is a form field labeled 'Enter the Solidity Contract Code below'. There, enter in your smart contract code. Don't forget to include your license and compiler version!&lt;/p&gt;

&lt;p&gt;There is another field for constructor arguments. Since I don't have a constructor in my contract code, I will leave that place blank. Next, I will verify reCAPTCHA and once I am verified, I click on 'Verify and Publish'. It takes a couple of seconds to verify but when it does, it redirects you to another page showing that your smart contract is officially verified. &lt;br&gt;
Your page should look like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1r2q4las6v7wpp38rlgd.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1r2q4las6v7wpp38rlgd.PNG" alt="Verification success" width="800" height="383"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Verifying a contract with external imports.
&lt;/h2&gt;

&lt;p&gt;Let's create another contract that inherits from the &lt;code&gt;Counter&lt;/code&gt; contract.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// SPDX-License-Identifier: MIT

pragma solidity ^0.8.13;

import './Counter.sol';

contract Name is Counter {
    string public name;

    constructor(string memory _myName) {
        name = _myName;
    }

    function getName() public view returns(string memory) {
        return name;
    }

    function setName(string memory _newName) public {
        name = _newName;
        incrementCount();
    } 

}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's break this down. We have a &lt;code&gt;Name&lt;/code&gt; contract that is inheriting from the &lt;code&gt;Counter&lt;/code&gt; contract. A &lt;code&gt;constructor&lt;/code&gt; to set a name. A &lt;code&gt;getName&lt;/code&gt; function that returns the name and a &lt;code&gt;setName&lt;/code&gt; function that sets a new name and also increments our count by 1. &lt;/p&gt;

&lt;p&gt;Next thing we are going to do is 'flatten' our &lt;code&gt;Name.sol&lt;/code&gt; file. Which will generate a new file that combines all the source code of our imports plus our current contract code. To flatten our file, click on the plugin icon at the bottom left of your remix IDE and search for the 'FLATTENER' plugin and activate it. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0x1nxaw18zndln41aaj6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0x1nxaw18zndln41aaj6.png" alt="Plugin" width="800" height="388"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After activation, an icon named 'flattener' should appear at the left hand side of your screen. &lt;/p&gt;

&lt;p&gt;Now, let's compile and deploy our &lt;code&gt;Name.sol&lt;/code&gt; contract. &lt;/p&gt;

&lt;p&gt;Click on the 'solidity compiler' icon. It has a 'S' shape at the left hand side of your screen. Change your 'compiler version' to '0.8.13' or whatever compiler version you used in your smart contract and then click on the 'Compile Name.sol' button to compile your smart contract. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyg856cjfzg8qqrr5s28g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyg856cjfzg8qqrr5s28g.png" alt="Compile" width="800" height="375"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A green check mark should appear on the 'solidity compiler' icon. Meaning your contract had been compiled successfully. &lt;br&gt;
Now, let us flatten the file before we deploy. Click on the 'flattener' icon and then click on 'Flatten contracts/Name.sol'. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdpfti2xguozxnu1c7kfs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdpfti2xguozxnu1c7kfs.png" alt=" " width="800" height="384"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After flattening, a green check mark appears under the 'flattener' icon. Another button, 'Save Name_flat.sol' appears under 'Flatten contracts/Name.sol'. Click on it and a pop-up appears. Asking for permission to create a new file with our flattened contents in it. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj63t1supzl9g85i8z3kh.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj63t1supzl9g85i8z3kh.PNG" alt="permission" width="800" height="383"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Accept it. &lt;br&gt;
Next, a new file called &lt;code&gt;Name_flat.sol&lt;/code&gt; appears. That is the contract we are going to deploy but we still have to compile it first. &lt;br&gt;
_Note: _ If the flattened file doesn't have 'SPDX-license-Identifier', please include it at the top.&lt;/p&gt;

&lt;p&gt;After compilation, Let us deploy to the Goerli testnet. Click on the 'deploy and run transactions' icon that is directly under the 'solidity compiler icon'. I will be using 'Injected Web3' as my environment, &lt;a href="https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn" rel="noopener noreferrer"&gt;Metamask&lt;/a&gt; pops up and I login. My current testnet appears below my environment. Head over &lt;a href="https://goerlifaucet.com/" rel="noopener noreferrer"&gt;here&lt;/a&gt; to get test Goerli eth. Your page should look like the following:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn73imop64jdvk73lioxr.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn73imop64jdvk73lioxr.PNG" alt="deploy" width="366" height="657"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then I click on deploy. Which prompts Metamask and I need to confirm the transaction. &lt;br&gt;
After deployment, You can view your transaction on etherscan. Check your terminal window for a 'view on etherscan' link. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv1r27tn9h0q3i5p2swdl.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv1r27tn9h0q3i5p2swdl.PNG" alt="View on etherscan" width="800" height="86"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Clicking on 'view on etherscan' should redirect to another page that includes transaction hash, status, block, timestamp, among others. &lt;/p&gt;

</description>
      <category>web3</category>
      <category>etherscan</category>
      <category>blockchain</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Chakra UI vs Shadcn UI</title>
      <dc:creator>Chichi Johnson</dc:creator>
      <pubDate>Wed, 16 Aug 2023 16:28:50 +0000</pubDate>
      <link>https://forem.com/christy5727/chakra-ui-vs-shadcn-ui-5ll</link>
      <guid>https://forem.com/christy5727/chakra-ui-vs-shadcn-ui-5ll</guid>
      <description>&lt;h2&gt;
  
  
  INTRODUCTION
&lt;/h2&gt;

&lt;p&gt;UI components are used to make our lives as developers easier as we get access to re-usable components we can call in our projects. It gives us the ability to focus on what makes our application unique and still helps us to deliver stunning UI in the process. &lt;/p&gt;

&lt;p&gt;In this article, we shall discuss about &lt;a href="https://chakra-ui.com/" rel="noopener noreferrer"&gt;Chakra UI&lt;/a&gt; and &lt;a href="https://ui.shadcn.com/" rel="noopener noreferrer"&gt;Shadcn UI&lt;/a&gt;. Also, their differences, similarities and which to choose when building your project. &lt;/p&gt;

&lt;h2&gt;
  
  
  WHAT IS CHAKRA UI?
&lt;/h2&gt;

&lt;p&gt;According to the official documentation:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Chakra UI is a simple, modular and accessible component library that gives you the building blocks you need to build your React applications.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Chakra UI provides accessibility - as it follows the &lt;a href="https://www.w3.org/TR/wai-aria/" rel="noopener noreferrer"&gt;WAI-ARIA&lt;/a&gt; for all it's components, it is themeable - meaning you can customise it according to your preferences, it is composable and also has an active &lt;a href="https://discord.com/invite/chakra-ui" rel="noopener noreferrer"&gt;discord community&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Chakra UI is also open source and anyone can be a contributor.&lt;/p&gt;

&lt;h2&gt;
  
  
  WHAT IS SHADCN UI?
&lt;/h2&gt;

&lt;p&gt;Shadcn UI provides components you can easily insert into your application. It is also customisable, themeable - uses Tailwind CSS utility classes, open source and accessible.&lt;/p&gt;

&lt;p&gt;In order to extend a component's props, check out &lt;a href="https://github.com/shadcn-ui/ui/issues/51" rel="noopener noreferrer"&gt;this issue&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Shadcn UI is &lt;strong&gt;not&lt;/strong&gt; a component library. This means it cannot be downloaded as a dependency using npm or yarn. &lt;/p&gt;

&lt;h2&gt;
  
  
  SIMILARITIES
&lt;/h2&gt;

&lt;p&gt;Both Chakra UI and Shadcn supports reusable components and can be used with different frameworks like &lt;a href="https://react.dev/" rel="noopener noreferrer"&gt;React&lt;/a&gt;, &lt;a href="https://www.gatsbyjs.com/" rel="noopener noreferrer"&gt;Gatsby&lt;/a&gt;, &lt;a href="https://nextjs.org/" rel="noopener noreferrer"&gt;Next&lt;/a&gt; etc.&lt;/p&gt;

&lt;h2&gt;
  
  
  DIFFERENCES
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Built with&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Chakra UI&lt;/strong&gt;: Built with React&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Shadcn UI&lt;/strong&gt;: Built with &lt;a href="https://www.radix-ui.com/" rel="noopener noreferrer"&gt;Radix UI&lt;/a&gt; and &lt;a href="https://tailwindcss.com/" rel="noopener noreferrer"&gt;Tailwind css&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Responsive styles&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Chakra UI&lt;/strong&gt;: Uses object or array notations to group related styles together as screen sizes changes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;Text fontSize={{base:"md", md:"2xl", lg:"6xl"}}&amp;gt; Hello! &amp;lt;/Text&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To pass in dynamic styling, you can use the following approach:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
import React, { useState } from 'react'
import { Input } from '@chakra-ui/react'

export default function SimpleInput() {
    const [error, setError] = useState(true)
    return &amp;lt;Input variant="filled" borderColor={error ? 'red' : 'initial'} /&amp;gt;
}



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Shadcn UI&lt;/strong&gt;: Uses a combination of tailwind css pseudo-classes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;Input placeholder="Enter project name" className="text-sm md:text-2xl lg:text-6xl" /&amp;gt;  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To pass in dynamic styling, you can use the following approach:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
import React, { useState } from 'react'
import { Input } from '@/components/ui/input'

export default function SimpleInput() {
    const [error, setError] = useState(true)
    return (
        &amp;lt;div&amp;gt;
            &amp;lt;Input
                placeholder="Enter project name"
                className={` w-[480px] ${error &amp;amp;&amp;amp; 'border-red-700 focus-visible:ring-transparent'}`}
            /&amp;gt;
        &amp;lt;/div&amp;gt;
    )
}


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  CONCLUSION
&lt;/h2&gt;

&lt;p&gt;While both are great for your project, it all depends on preference:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Shadcn UI is more styled based whereas Chakra UI is more interaction based.&lt;/li&gt;
&lt;li&gt;Shadcn UI gives more flexibility and you only install what you need. Meanwhile, Chakra UI gives you all the available components after adding it as a dependency to your project.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>frontend</category>
      <category>beginners</category>
      <category>react</category>
    </item>
    <item>
      <title>Zero Knowledge Proofs vs. Fraud Proofs</title>
      <dc:creator>Chichi Johnson</dc:creator>
      <pubDate>Fri, 22 Jul 2022 13:54:08 +0000</pubDate>
      <link>https://forem.com/christy5727/zero-knowledge-proofs-vs-fraud-proofs-47di</link>
      <guid>https://forem.com/christy5727/zero-knowledge-proofs-vs-fraud-proofs-47di</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Proofs are an important aspect in cryptography. In this article, I will explain two of the most popular proofs: validity proofs that utilizes zero knowledge cryptography and fraud proofs. What makes each of them unique and their various use cases. &lt;/p&gt;

&lt;h2&gt;
  
  
  What are zero knowledge proofs
&lt;/h2&gt;

&lt;p&gt;Zero knowledge proofs or zk proofs are ways of telling a verifier that you know some piece of information without actually revealing the information that you (the prover) knows. Privacy and security are achieved on public blockchains with zero knowledge proofs.&lt;/p&gt;

&lt;p&gt;A zero knowledge proof must satisfy the following requirements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Completeness&lt;/strong&gt;: For a proof to be complete, the verifier must be able to determine that the prover is in possession of a particular piece of information. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Soundness&lt;/strong&gt;: For a proof to be sound, the verifier cannot be convinced that the prover has a particular piece of information when in actuality, the prover does not possess such information.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Zero knowledge&lt;/strong&gt;: For a proof to be zero knowledge, the verifier must not know anything regarding the information the prover has except whether such information is true or false. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Types of zero knowledge proofs
&lt;/h3&gt;

&lt;p&gt;There are two types of zk proofs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Interactive zk proofs:&lt;/strong&gt; For interactive zk proofs, the prover and verifier interact with one another several times. The prover completes challenges issued by the verifier in order for the prover to gain the trust of the verifier and for the verifier to be sure that the information the prover has, exists and is valid.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Non-interactive zk proofs:&lt;/strong&gt; For non-interactive proof, the prover and verifier do not interact at all. Instead an automated system is used to verify the prover's claims. By using an automated system, Non-interactive zk proofs require additional software and computational power. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Some examples of zero knowledge technologies:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Zero knowledge succinct non-interactive argument of knowledge (zk SNARK):&lt;/strong&gt; An example of a cryptocurrency that uses Zk SNARK is &lt;a href="https://z.cash/" rel="noopener noreferrer"&gt;Zcash&lt;/a&gt;. Zcash uses zk SNARK to better protect the privacy of it's users. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Zero knowledge scalable transparent argument of knowledge (zk STARK):&lt;/strong&gt; An example of a decentralized finance that uses zk STARK is &lt;a href="https://rhino.fi/" rel="noopener noreferrer"&gt;DeversiFi&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Real world applications of zero knowledge proofs
&lt;/h3&gt;

&lt;p&gt;Zero knowledge proofs can be used in a wide range of scenarios where data privacy and security are paramount. Such scenarios may include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Blockchains&lt;/li&gt;
&lt;li&gt;User Verification&lt;/li&gt;
&lt;li&gt;Finance&lt;/li&gt;
&lt;li&gt;Machine learning&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Limitations of zero knowledge proofs
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;zk proofs require lots of time and computational power.&lt;/li&gt;
&lt;li&gt;zk proofs cannot give 100% certainty that a claim exists and is valid. It basically minimizes the probability of a claim being false.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What are fraud proofs
&lt;/h2&gt;

&lt;p&gt;Fraud proofs use a Dispute Time Delay (DTD) system. If a fraud proof is submitted within the DTD and has incorrect state transitions, changes made to the state are reverted and validators are penalized. If no fraud proof is submitted within the DTD, the state transition is considered correct. &lt;/p&gt;

&lt;p&gt;Fraud proofs use &lt;a href="https://www.alchemy.com/overviews/optimistic-rollups#:~:text=%E2%80%8DOptimistic%20rollups%20are%20a%20layer,base%20layer%20and%20improving%20scalability." rel="noopener noreferrer"&gt;Optimistic rollups&lt;/a&gt; that reduces costs and latency levels for decentralized applications on a blockchain network.&lt;/p&gt;

&lt;p&gt;The main &lt;strong&gt;advantage&lt;/strong&gt; of fraud proof is that they are not needed for every state transaction which means fewer computational resources are used and this promotes scalability.&lt;/p&gt;

&lt;p&gt;The main &lt;strong&gt;disadvantage&lt;/strong&gt; of fraud proof is that fraud proofs cause interactions between different parties. Thereby creating a space for these parties to commit fraud. &lt;/p&gt;

&lt;h3&gt;
  
  
  Closing remarks
&lt;/h3&gt;

&lt;p&gt;Validity proofs are needed for each transaction and they ensure that nothing other than correct state transitions are accepted while in the case of fraud proofs, they are only needed when there are incorrect state transitions. &lt;br&gt;
Both validity proofs and fraud proofs are different ways of proving the validity of information and are both tools used in Layer-2 scalability solutions. Each with it's own advantages and disadvantages. &lt;/p&gt;

&lt;h3&gt;
  
  
  Further reading
&lt;/h3&gt;

&lt;p&gt;Below is a curated list of articles I believe are worth having a look at:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.alchemy.com/overviews/zkevm" rel="noopener noreferrer"&gt;Zero knowledge EVM&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://blog.alchemy.com/blog/zero-knowledge-rollups" rel="noopener noreferrer"&gt;Zero knowledge rollups&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.alchemy.com/overviews/snarks-vs-starks" rel="noopener noreferrer"&gt;Snarks vs Starks&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.alchemy.com/overviews/polygon-zk-rollups" rel="noopener noreferrer"&gt;Polygon zk rollups&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.alchemy.com/overviews/ethereum-scaling-solutions" rel="noopener noreferrer"&gt;Ethereum scaling solutions&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>web3</category>
      <category>blockchain</category>
    </item>
    <item>
      <title>Build a Web3 app with Solidity</title>
      <dc:creator>Chichi Johnson</dc:creator>
      <pubDate>Thu, 30 Jun 2022 18:15:16 +0000</pubDate>
      <link>https://forem.com/christy5727/build-a-web3-app-with-solidity-4nfj</link>
      <guid>https://forem.com/christy5727/build-a-web3-app-with-solidity-4nfj</guid>
      <description>&lt;p&gt;In this tutorial, I'm going to show you how to build an Ethereum Decentralized application or Dapp with React.js. If you are an absolute beginner, I suggest that you go over to the &lt;a href="https://ethereum.org/en/developers/docs/" rel="noopener noreferrer"&gt;Ethereum docs&lt;/a&gt; for a proper introduction. &lt;/p&gt;

&lt;h2&gt;
  
  
  What we will be building
&lt;/h2&gt;

&lt;p&gt;We'll be building a Dapp I call SendFunds, you can call it whatever you like. It will be a place where anybody can send ether(Ethereum's native currency) to any address and display the transaction on the front end. &lt;/p&gt;

&lt;p&gt;We'll be writing and deploying a smart contract that will let people connect their wallets and interact with our smart contract. We will be deploying our Dapp to the Göerli testnet. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs2udezahyeibxnnuv25x.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs2udezahyeibxnnuv25x.PNG" alt="Demo of SendFunds" width="800" height="389"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Installing dependencies
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Node js
&lt;/h3&gt;

&lt;p&gt;First we need to install the node package manager. To do this, head over to this website &lt;a href="https://nodejs.org/en/" rel="noopener noreferrer"&gt;Node.js website&lt;/a&gt;.&lt;br&gt;
You can see if you already have node installed by going to your terminal and typing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;node -v
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Metamask wallet
&lt;/h3&gt;

&lt;p&gt;We need metamask in order to interact with the ethereum blockchain. &lt;a href="https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn?hl=en" rel="noopener noreferrer"&gt;Visit this link&lt;/a&gt; to install metamask chrome plugin in your chrome browser. &lt;/p&gt;

&lt;h3&gt;
  
  
  Create-react-app
&lt;/h3&gt;

&lt;p&gt;Next, we will need to install &lt;a href="https://reactjs.org/" rel="noopener noreferrer"&gt;create-react-app&lt;/a&gt; which allows us to create and run a react application very easily without too much configuration. You can install it using the following commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install create-react-app

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Sample project
&lt;/h3&gt;

&lt;p&gt;Let's create our react app. Type in the following command in your terminal window.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx create-react-app send-funds
cd send-funds
npm start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your browser should open automatically. If it doesn't, head over to your browser and type &lt;code&gt;http://localhost:3000&lt;/code&gt;. You should see a webpage like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4h5g4vl341yxi8rhz0hh.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4h5g4vl341yxi8rhz0hh.PNG" alt="React webpage" width="800" height="385"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Hardhat
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://hardhat.org/getting-started" rel="noopener noreferrer"&gt;Hardhat&lt;/a&gt; is a tool that lets us compile our smart contract code quickly and test them locally. It creates a local Ethereum network for us that mimics the actual Ethereum mainnet. How cool is that!&lt;br&gt;
Install Hardhat with the following commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install --save-dev hardhat

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make sure you are inside the &lt;code&gt;send-funds&lt;/code&gt; directory!&lt;/p&gt;

&lt;h3&gt;
  
  
  Sample project
&lt;/h3&gt;

&lt;p&gt;Let's get a sample project running.&lt;br&gt;
Run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx hardhat
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your terminal should look like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgwpz5thc5uhyhhigoaa3.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgwpz5thc5uhyhhigoaa3.PNG" alt="npx hardhat" width="800" height="316"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Choose the option to “Create a basic sample project”. Say yes to everything. In case you get a conflict error, delete the &lt;code&gt;README.md&lt;/code&gt; file in your root directory. &lt;/p&gt;

&lt;p&gt;We need a few other dependencies. Let's install them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install --save-dev @nomiclabs/hardhat-waffle ethereum-waffle chai @nomiclabs/hardhat-ethers ethers moment dotenv 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Writing our smart contract code
&lt;/h2&gt;

&lt;p&gt;Inside of your &lt;code&gt;send-funds&lt;/code&gt; folder, navigate to your &lt;code&gt;contracts&lt;/code&gt; folder and create a new file called &lt;code&gt;SendFunds.sol&lt;/code&gt;. You can go ahead and delete &lt;code&gt;Greeter.sol&lt;/code&gt; as we will not be needing it. &lt;/p&gt;

&lt;p&gt;I will paste the code we will be needing below and explain what each line does.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//SPDX-License-Identifier: MIT

pragma solidity ^0.8.13;

import "hardhat/console.sol";

contract SendFunds {
    constructor() payable {
        console.log("hello");
    }

    event NewTxn(address indexed to, uint256 amount, uint256 timestamp);

    struct SentTransaction {
        address reciever;
        uint256 amount;
        uint256 timestamp;
    }

    SentTransaction[] allTxn;

    function sendFunds(address payable _to, uint256 amount) public payable {
        require(amount &amp;lt;= address(this).balance, "not enough funds");
        (bool success, ) = _to.call{value: amount}("");
        require(success, "Unable to send Ether");
        allTxn.push(SentTransaction(_to, amount, block.timestamp));
        emit NewTxn(_to, amount, block.timestamp);
    }

    function getAllTxn() public view returns (SentTransaction[] memory) {
        return allTxn;
    }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//SPDX-License-Identifier: MIT
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every smart contract must begin with an &lt;code&gt;// SPDX-License-Identifier&lt;/code&gt;. If you do not do this, an error will occur.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pragma solidity ^0.8.13;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A version of solidity must be indicated next. We do this to tell the compiler to use version 0.8.13. To know more about license identifiers and compiler versions, check &lt;a href="https://docs.soliditylang.org/en/v0.6.8/layout-of-source-files.html" rel="noopener noreferrer"&gt;this&lt;/a&gt; out.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import "hardhat/console.sol";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Hardhat gives us a way to &lt;code&gt;console.log&lt;/code&gt; statements to our teminal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;contract SendFunds {
    constructor() payable {
        console.log("hello");
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Smart contracts looks like a &lt;code&gt;class&lt;/code&gt; in other programming languages. The &lt;code&gt;constructor&lt;/code&gt; will run once when the contract is initialized for the first time and print what is in the &lt;code&gt;console.log()&lt;/code&gt;. We are making the constructor &lt;code&gt;payable&lt;/code&gt; because we want the smart contract to be able to receive ether.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;event NewTxn(address indexed to, uint256 amount, uint256 timestamp);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next is our &lt;code&gt;event&lt;/code&gt;. We need to display the transaction on our front end, we need an &lt;code&gt;event&lt;/code&gt; to be able to communicate to our front end that some state has changed!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SentTransaction[] allTxn;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;struct&lt;/code&gt; is used to group related data together. When sending a transaction, we need to store the &lt;code&gt;receiver&lt;/code&gt;, the &lt;code&gt;amount&lt;/code&gt; and the &lt;code&gt;timestamp&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function sendFunds(address payable _to, uint256 amount) public payable {
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next is our sendFunds function which takes in an &lt;code&gt;address payable _to&lt;/code&gt; meaning the address can accept payment. A &lt;code&gt;uint256 amount&lt;/code&gt; which takes in the amount to send to &lt;code&gt;_to&lt;/code&gt; and the function is &lt;code&gt;payable&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;require(amount &amp;lt;= address(this).balance, "not enough funds");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;require&lt;/code&gt; keyword returns a true or false. If the first half of it is true, it continues code execution. If false, it throws an error. Here, we are checking if the amount we want to send to the receiver is less than or equal to what the sender has in their wallet.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(bool success, ) = _to.call{value: amount}("");

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Above is the magic line that actually sends ether to the receiver. Then we have another &lt;code&gt;require&lt;/code&gt; block to check if the transaction was a success.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;allTxn.push(SentTransaction(_to, amount, block.timestamp));
emit NewTxn(_to, amount, block.timestamp);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, we are pushing &lt;code&gt;_to&lt;/code&gt;, &lt;code&gt;amount&lt;/code&gt; and &lt;code&gt;block.timestamp&lt;/code&gt; to our &lt;code&gt;struct&lt;/code&gt; instance and emitting it to the front end.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function getAllTxn() public view returns (SentTransaction[] memory) {
        return allTxn;
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For the final block of code, this function above returns all the transactions. &lt;/p&gt;

&lt;h2&gt;
  
  
  Testing out our smart contract
&lt;/h2&gt;

&lt;p&gt;Before we begin, head over to your &lt;code&gt;hardhat.config.js&lt;/code&gt; file and change your version of solidity to &lt;code&gt;0.8.13&lt;/code&gt; so it would match what you have in your &lt;code&gt;SendFunds.sol&lt;/code&gt; file. &lt;/p&gt;

&lt;p&gt;In your &lt;code&gt;scripts&lt;/code&gt; folder, delete &lt;code&gt;sample-script.js&lt;/code&gt; and create two new files. &lt;code&gt;run.js&lt;/code&gt; is the first file to create. Here, we would play around with testing different aspects of our code and the next file to create is &lt;code&gt;deploy.js&lt;/code&gt;, here is the file we use to deploy our smart contract to your testnet. &lt;/p&gt;

&lt;p&gt;The code below should be inside the &lt;code&gt;run.js&lt;/code&gt; file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const hre = require("hardhat");

const main = async () =&amp;gt; {
  const sendFundsContractFactory = await hre.ethers.getContractFactory(
    "SendFunds"
  );
  const sendFundsContract = await sendFundsContractFactory.deploy({
    value: hre.ethers.utils.parseEther("4"),
  });

  await sendFundsContract.deployed();

  console.log("contract address: ", sendFundsContract.address);
  let contractBalance = await hre.ethers.provider.getBalance(
    sendFundsContract.address
  );
  console.log(
    "Contract balance:",
    hre.ethers.utils.formatEther(contractBalance)
  );

  const [owner, randomPerson] = await hre.ethers.getSigners();
  const sendFunds = await sendFundsContract
    .connect(randomPerson)
    .sendFunds(randomPerson.address, 2);
  await sendFunds.wait();

  const allTxn = await sendFundsContract.getAllTxn();
  console.log(allTxn);
};

const runMain = async () =&amp;gt; {
  try {
    await main();
    process.exit(0);
  } catch (error) {
    console.log(error);
    process.exit(1);
  }
};

runMain();

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's go over this line by line.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const hre = require("hardhat");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We are requiring hardhat here because we will be needing it later.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const sendFundsContractFactory = await hre.ethers.getContractFactory(
    "SendFunds"
  );
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will compile our smart contract and generate the necessary files we need to work with our contract under the &lt;code&gt;artifacts&lt;/code&gt; folder.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const sendFundsContract = await sendFundsContractFactory.deploy({
    value: hre.ethers.utils.parseEther("4")
  });

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Hardhat will create a local Ethereum network for us. Then, after the script completes it'll destroy that local network and we are giving the contract 4 ether.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  await sendFundsContract.deployed();

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, we are waiting for the contract to be deployed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log("contract address: ", sendFundsContract.address);
  let contractBalance = await hre.ethers.provider.getBalance(
    sendFundsContract.address
  );
  console.log(
    "Contract balance:",
    hre.ethers.utils.formatEther(contractBalance)
  );
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, we are console.logging the contract's address and the contract's balance.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const [owner, randomPerson] = await hre.ethers.getSigners();
  const sendFunds = await sendFundsContract
    .connect(randomPerson)
    .sendFunds(randomPerson.address, 2);
  await sendFunds.wait();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What is going on here is we are getting a random user to send some ether to and we are calling the &lt;code&gt;sendFunds&lt;/code&gt; function passing in the random user's address and amount and waiting for the transaction to be completed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const allTxn = await sendFundsContract.getAllTxn();
  console.log(allTxn);

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For the final bit of testing, we are calling the &lt;code&gt;getAllTxn&lt;/code&gt; function to get all of our transactions. &lt;/p&gt;

&lt;p&gt;Run the following command in your terminal: &lt;code&gt;npx hardhat run scripts/run.js&lt;/code&gt;. Your terminal should be outputing the following:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fud19gotgvyhbr661rx3h.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fud19gotgvyhbr661rx3h.PNG" alt="test terminal" width="703" height="218"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's write our deploy script. It will be very similar to our &lt;code&gt;run.js&lt;/code&gt; file. &lt;/p&gt;

&lt;p&gt;Input the following in your &lt;code&gt;deploy.js&lt;/code&gt; file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const hre = require("hardhat");

const main = async () =&amp;gt; {
    const [deployer] = await hre.ethers.getSigners();
    const accountBalance = await deployer.getBalance();

    console.log("deploying contracts with account ", deployer.address);
    console.log("account balance ", accountBalance.toString());

    const sendFundsContractFactory = await hre.ethers.getContractFactory("SendFunds");
    const sendFundsContract = await sendFundsContractFactory.deploy();

    await sendFundsContract.deployed();

    console.log("Funds contract address: ", sendFundsContract.address)

    }

    const runMain = async () =&amp;gt; {
        try {
            await main();
            process.exit(0)
        } catch (error) {
            console.log(error);
            process.exit(1)
        }
    }

    runMain();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Deploy to the Göerli testnet with Alchemy
&lt;/h2&gt;

&lt;p&gt;We are going to be deploying to a testnet because deploying to the Ethereum Mainnet costs real money. I'll show you how to deploy to a testnet using &lt;a href="https://www.alchemy.com/" rel="noopener noreferrer"&gt;Alchemy&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;After logging in to Alchemy, on the top right corner, there is a create app button. Click on it&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6bktei9yk3y5gjv3y27w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6bktei9yk3y5gjv3y27w.png" alt="Alchemy dashboard" width="800" height="389"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A pop up should appear next. Give your app a name, the chain should be Ethereum and network should be changed to Göerli. Finally click on create app button. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fla3r0gd1z63v806h8nlr.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fla3r0gd1z63v806h8nlr.PNG" alt="testnet" width="800" height="351"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, click on your newly created project, it should take you to your project's dashboard. You will be needing the API url. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhoa0oeivvby9x4l7yl3u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhoa0oeivvby9x4l7yl3u.png" alt="View key" width="800" height="328"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fch4t79oe4v89nrwxrjt7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fch4t79oe4v89nrwxrjt7.png" alt="API" width="800" height="332"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, create a &lt;code&gt;.env&lt;/code&gt; file in your root directory. We would be adding some things we don't want to public to get access to like your private key and API url. Don't forget to add your &lt;code&gt;.env&lt;/code&gt; file to your &lt;code&gt;gitignore&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;Head over to your &lt;code&gt;hardhat.config.js&lt;/code&gt; file. Input the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;require("@nomiclabs/hardhat-waffle");
require('dotenv').config();

module.exports = {
  solidity: "0.8.13",
  networks: {
    goerli: {
      url: process.env.ALCHEMY_URL,
      accounts: [process.env.WALLET_PRIVATE_KEY],
    },
  }
};

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's go over this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;require('dotenv').config();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;First, we are requiring &lt;code&gt;dotenv&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;module.exports = {
  solidity: "0.8.13",
  networks: {
    goerli: {
      url: process.env.ALCHEMY_URL,
      accounts: [process.env.WALLET_PRIVATE_KEY],
    },
  }
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, we are filling in the url and accounts with our alchemy API url and our private key. To get your wallet's private key, head over &lt;a href="https://metamask.zendesk.com/hc/en-us/articles/360015289632-How-to-export-an-account-s-private-key" rel="noopener noreferrer"&gt;here&lt;/a&gt;. &lt;br&gt;
Please keep your private key safe to avoid loss of funds. &lt;/p&gt;

&lt;p&gt;Before we deploy to the testnet, we need test Göerli. Head over to &lt;a href="https://goerlifaucet.com/" rel="noopener noreferrer"&gt;Göerli faucet&lt;/a&gt;. Login with Alchemy and paste in your wallet address. You should receive your test Göerli in a couple of seconds. &lt;/p&gt;

&lt;p&gt;In your terminal, run the following commands to deploy your contract to the Göerli testnet: &lt;code&gt;npx hardhat run scripts/deploy.js --network goerli&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Your terminal should output the following:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F99v0jloe2edghbnwi00b.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F99v0jloe2edghbnwi00b.PNG" alt="Deployed successfully" width="800" height="65"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Copy your contract's address. We are going to need it in the front end. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/l3q2NdI5m0jrtwFpu/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img width="480" src="https://i.giphy.com/media/l3q2NdI5m0jrtwFpu/giphy.gif" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You've come a long way. Now let's connect our front end. &lt;/p&gt;
&lt;h2&gt;
  
  
  Setting up the front end
&lt;/h2&gt;

&lt;p&gt;Let's start by deleting some unwanted code in your &lt;code&gt;App.js&lt;/code&gt; file under your &lt;code&gt;src&lt;/code&gt; folder. It should look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import './App.css';

function App() {
  return (
    &amp;lt;div&amp;gt;
      hello
    &amp;lt;/div&amp;gt;
  );
}

export default App;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, we are going to be creating some new folders. Under your &lt;code&gt;src&lt;/code&gt; folder, create two new folders: &lt;code&gt;components&lt;/code&gt; and &lt;code&gt;utils&lt;/code&gt;. &lt;br&gt;
Inside your &lt;code&gt;components&lt;/code&gt; folder, create two new files: &lt;code&gt;Home.js&lt;/code&gt; and &lt;code&gt;Home.css&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Inside of your &lt;code&gt;Home.js&lt;/code&gt; file. Input the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React, { useEffect, useState } from "react";

function Home() {
  const [currentAccount, setCurrentAccount] = useState("");

  const checkIfWalletIsConnected = async () =&amp;gt; {
    try {
      const { ethereum } = window;
      if (!ethereum) {
        console.log("you need to install metamask");
      } else {
        console.log("found one", ethereum);
      }
      /*
       * Check if we're authorized to access the user's wallet
       */

      const accounts = await ethereum.request({ method: "eth_accounts" });
      if (accounts.length !== 0) {
        const account = accounts[0];
        console.log("account ", account);
        setCurrentAccount(account);
      } else {
        console.log("no authorized account found");
      }
    } catch (error) {
      console.log(error);
    }
  };

  useEffect(() =&amp;gt; {
    checkIfWalletIsConnected();
  }, []);

  return &amp;lt;div&amp;gt;Home&amp;lt;/div&amp;gt;;
}

export default Home;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What is going on here is that we are basically checking to see if the special &lt;code&gt;window.ethereum&lt;/code&gt; object is injected in our browser. If not, you get a &lt;code&gt;console.log&lt;/code&gt; telling you to install Metamask. If the object is found, we use a special method called &lt;code&gt;eth_accounts&lt;/code&gt; to see if we're authorized to access any of the accounts in the user's wallet and since a user can have multiple accounts, we are taking the first one. Finally we are using the &lt;code&gt;useEffect&lt;/code&gt; hook to run the function immediately the page loads. &lt;/p&gt;

&lt;h2&gt;
  
  
  Connecting our wallet
&lt;/h2&gt;

&lt;p&gt;Connecting our wallet is very easy to do. Your &lt;code&gt;Home.js&lt;/code&gt; file should look like the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React, { useEffect, useState } from "react";
import "./Home.css";

function Home() {
  const [currentAccount, setCurrentAccount] = useState("");

  const checkIfWalletIsConnected = async () =&amp;gt; {
    try {
      const { ethereum } = window;
      if (!ethereum) {
        console.log("you need to install metamask");
      } else {
        console.log("found one", ethereum);
      }
      /*
       * Check if we're authorized to access the user's wallet
       */

      const accounts = await ethereum.request({ method: "eth_accounts" });
      if (accounts.length !== 0) {
        const account = accounts[0];
        console.log("account ", account);
        setCurrentAccount(account);
      } else {
        console.log("no authorized account found");
      }
    } catch (error) {
      console.log(error);
    }
  };

  //connect wallet with button click
  const connectWallet = async () =&amp;gt; {
    try {
      const { ethereum } = window;
      if (!ethereum) {
        console.log("you need to install metamask");
        return;
      }
      const accounts = await ethereum.request({
        method: "eth_requestAccounts",
      });

      console.log("Connected", accounts[0]);
      setCurrentAccount(accounts[0]);
    } catch (error) {
      console.log(error);
    }
  };
  useEffect(() =&amp;gt; {
    checkIfWalletIsConnected();
  }, []);

  //truncate wallet address
  function truncate(input) {
    return input.substring(0, 5) + "..." + input.substring(38);
  }

  return (
    &amp;lt;div className="App"&amp;gt;
      {currentAccount.length === 0 ? (
        &amp;lt;div&amp;gt;
          &amp;lt;div className="nav"&amp;gt;
            &amp;lt;h1&amp;gt;SendFunds&amp;lt;/h1&amp;gt;
          &amp;lt;/div&amp;gt;
          &amp;lt;div className="content"&amp;gt;
            &amp;lt;div&amp;gt;
              &amp;lt;p className="description"&amp;gt;
                Send &amp;lt;i className="fa-brands fa-ethereum"&amp;gt;&amp;lt;/i&amp;gt; to your friends
                and family.
              &amp;lt;/p&amp;gt;
              &amp;lt;button className="connect-btn" onClick={() =&amp;gt; connectWallet()}&amp;gt;
                Connect Wallet
              &amp;lt;/button&amp;gt;
            &amp;lt;/div&amp;gt;
          &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
      ) : (
        &amp;lt;div&amp;gt;
          &amp;lt;div className="nav flex"&amp;gt;
            &amp;lt;h1&amp;gt;SendFunds&amp;lt;/h1&amp;gt;
            &amp;lt;p className="wallet-address"&amp;gt;{truncate(currentAccount)}&amp;lt;/p&amp;gt;
          &amp;lt;/div&amp;gt;
          &amp;lt;div className="content connected-wallet"&amp;gt;
            &amp;lt;p className="description"&amp;gt;
              Send &amp;lt;i className="fa-brands fa-ethereum"&amp;gt;&amp;lt;/i&amp;gt; to your friends and
              family.
            &amp;lt;/p&amp;gt;
          &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
      )}
    &amp;lt;/div&amp;gt;
  );
}

export default Home;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's go over the &lt;code&gt;connectWallet&lt;/code&gt; and &lt;code&gt;truncate&lt;/code&gt; functions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const connectWallet = async () =&amp;gt; {
    try {
      const { ethereum } = window;
      if (!ethereum) {
        console.log("you need to install metamask");
        return;
      }
      const accounts = await ethereum.request({
        method: "eth_requestAccounts",
      });

      console.log("Connected", accounts[0]);
      setCurrentAccount(accounts[0]);
    } catch (error) {
      console.log(error);
    }
  };
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, we are checking if &lt;code&gt;window.ethereum&lt;/code&gt; is present. If it is, we call &lt;code&gt;eth_requestAccounts&lt;/code&gt; to ask Metamask to give us access to the user's wallet. Then we are setting &lt;code&gt;setCurrentAccount&lt;/code&gt; to the first account.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; function truncate(input) {
    return input.substring(0, 5) + "..." + input.substring(38);
  }

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Since, wallet addresses are too long, we are truncating it.&lt;/p&gt;

&lt;p&gt;Finally, we are doing some conditional rendering. If &lt;code&gt;currentAccount.length === 0&lt;/code&gt;, the user needs to connect their wallet, else display a welcome text. &lt;/p&gt;

&lt;p&gt;The styling for the &lt;code&gt;Home.css&lt;/code&gt; page:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;body{
    background: rgb(100,0,123);
    background: radial-gradient(circle, rgba(100,0,123,1) 0%, rgba(62,20,86,1) 100%);
    color: #fff;
    margin: 2px 40px;
    font-family: 'Bellota', cursive;
  }

  .content {
    text-align: center;
    margin: 160px auto 40px;
  }

  .description {
    font-size: 30px;
    font-weight: bold;
  }

  .connect-btn {
  color: white;
  padding: 10px 30px;
  font-size: 1.3em;
  background: transparent;
  border-radius: 50px;
  border: 1px solid white;
  margin: 10px auto 0;
  cursor: pointer;
  opacity: 0.7;
  font-family: 'Bellota', cursive;
  font-weight: bold;
  }

.nav {
  border-bottom: 1px solid #fff;
}

.nav h1 {
  margin-bottom: 0;
  text-align: left;
}

.flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  place-items: flex-end;
}

.nav p {
  margin: 3px 0;
}

.connected-wallet {
  margin: 70px auto 40px;

}

.wallet-address {
  border: 1px solid #fff;
  padding: 2px 15px;
  border-radius: 50px;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I got my icon from &lt;a href="https://fontawesome.com/" rel="noopener noreferrer"&gt;font awesome&lt;/a&gt; and added the &lt;a href="https://cdnjs.com/libraries/font-awesome" rel="noopener noreferrer"&gt;cdn&lt;/a&gt; to my &lt;code&gt;index.html&lt;/code&gt; file. For the font, I used &lt;a href="https://fonts.google.com/specimen/Bellota?query=bellota" rel="noopener noreferrer"&gt;Bellota&lt;/a&gt; from &lt;a href="https://fonts.google.com/" rel="noopener noreferrer"&gt;google fonts&lt;/a&gt; and also added the link to my &lt;code&gt;index.html&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;Import &lt;code&gt;Home.js&lt;/code&gt; in your &lt;code&gt;App.js&lt;/code&gt; file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import './App.css';
import Home from './components/Home';


function App() {
  return (
    &amp;lt;div&amp;gt;
      &amp;lt;Home /&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}

export default App;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run &lt;code&gt;npm start&lt;/code&gt; to check out your Dapp.&lt;/p&gt;

&lt;p&gt;Your Home page should be looking like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj9nw0aoxgsvaw5s5ayq0.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj9nw0aoxgsvaw5s5ayq0.PNG" alt="Home page" width="800" height="378"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Form implementation
&lt;/h2&gt;

&lt;p&gt;Let's dive into our form creation. Under the &lt;code&gt;utils&lt;/code&gt; folder, create a new file called &lt;code&gt;SendFunds.json&lt;/code&gt;. This will house the artifacts gotten when you deployed your contract. &lt;br&gt;
Under &lt;code&gt;artifacts/contracts/SendFunds.sol&lt;/code&gt;, you will find a &lt;code&gt;SendFunds.json&lt;/code&gt; file. Copy everything and paste in inside your &lt;code&gt;utils/SendFunds.json&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;You also need to create two new files under your &lt;code&gt;components&lt;/code&gt;: &lt;code&gt;Form.js&lt;/code&gt; and &lt;code&gt;Form.css&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;Let's create a custom form inside your &lt;code&gt;Form.js&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React, {useState} from 'react';
import './Form.css';


const Form = () =&amp;gt; {
    const [walletAddress, setWalletAddress] = useState('')
    const [amount, setAmount] = useState('')


  return (
    &amp;lt;div className="form"&amp;gt;
      &amp;lt;form&amp;gt;
        &amp;lt;p&amp;gt;
          &amp;lt;input
            type="text"
            name=""
            id=""
            placeholder="Enter Wallet Address"
            required
            value={walletAddress}
            onChange={(e) =&amp;gt; setWalletAddress(e.target.value)}
          /&amp;gt;
        &amp;lt;/p&amp;gt;
        &amp;lt;p&amp;gt;
          &amp;lt;input
            type="number"
            name=""
            id=""
            placeholder="Enter Amount"
            required
            value={amount}
            onChange={(e) =&amp;gt; setAmount(e.target.value)}
            step='any'
            min='0'
          /&amp;gt;
        &amp;lt;/p&amp;gt;
        &amp;lt;button type="submit"&amp;gt;
          Send
        &amp;lt;/button&amp;gt;
      &amp;lt;/form&amp;gt;

    &amp;lt;/div&amp;gt;
  );
};

export default Form;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The code above is pretty straight forward. Two &lt;code&gt;input&lt;/code&gt; fields. One a &lt;code&gt;number&lt;/code&gt; and the other a &lt;code&gt;text&lt;/code&gt; type. Then, I am saving the values in state. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note:&lt;/em&gt; Don't forget to include your &lt;code&gt;Form.js&lt;/code&gt; file at the bottom of your &lt;code&gt;Home.js&lt;/code&gt; file. &lt;/p&gt;

&lt;p&gt;Now, let's call our &lt;code&gt;sendFunds&lt;/code&gt; function from our smart contract.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React, { useState } from "react";
import { ethers } from "ethers";
import abi from "../utils/SendFunds.json";
import { parseEther } from "ethers/lib/utils";

const Form = () =&amp;gt; {
  const [walletAddress, setWalletAddress] = useState("");
  const [amount, setAmount] = useState("");

  const contractAddress = "0x0FB172Db7Ab332f3ea5189C4A3659720124880Bc";
  const contractABI = abi.abi;
  const sendFunds = async () =&amp;gt; {
    try {
      const { ethereum } = window;
      if (ethereum) {
        const provider = new ethers.providers.Web3Provider(ethereum);
        const signer = provider.getSigner();
        const sendFundsContract = new ethers.Contract(
          contractAddress,
          contractABI,
          signer
        );
        const sendFundsTxn = await sendFundsContract.sendFunds(
          walletAddress,
          ethers.utils.parseEther(amount),
          { gasLimit: 300000, value: parseEther(amount) }
        );
        await sendFundsTxn.wait();
        setWalletAddress('')
        setAmount('')
      } else {
        console.log("ethereum object does not exist!");
      }
    } catch (error) {
      console.log(error);
    }
  };

  const handleSubmit = (e) =&amp;gt; {
    e.preventDefault();
    sendFunds();
  };

  return (
    &amp;lt;div className="form"&amp;gt;
      &amp;lt;form onSubmit={handleSubmit}&amp;gt;
        &amp;lt;p&amp;gt;
          &amp;lt;input
            type="text"
            name=""
            id=""
            placeholder="Enter Wallet Address"
            required
            value={walletAddress}
            onChange={(e) =&amp;gt; setWalletAddress(e.target.value)}
          /&amp;gt;
        &amp;lt;/p&amp;gt;
        &amp;lt;p&amp;gt;
          &amp;lt;input
            type="number"
            name=""
            id=""
            placeholder="Enter Amount"
            required
            value={amount}
            onChange={(e) =&amp;gt; setAmount(e.target.value)}
            step="any"
            min="0"
          /&amp;gt;
        &amp;lt;/p&amp;gt;
        &amp;lt;button type="submit"&amp;gt;Send&amp;lt;/button&amp;gt;
      &amp;lt;/form&amp;gt;
    &amp;lt;/div&amp;gt;
  );
};

export default Form;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We have a lot going on here, so let's break it down.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { ethers } from "ethers";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We are importing &lt;code&gt;ethers&lt;/code&gt; because we will need it in order to interact with our smart contract.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import abi from "../utils/SendFunds.json";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, we are importing our abi. You can read more about it &lt;a href="https://www.quicknode.com/guides/solidity/what-is-an-abi" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { parseEther } from "ethers/lib/utils";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We use &lt;code&gt;parseEther&lt;/code&gt; when we want to convert a value from ETH to WEI which is the value we want to send to the contract when calling a payable method.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const contractAddress = "0x0FB172Db7Ab332f3ea5189C4A3659720124880Bc";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The contract address gotten when we deployed our smart contract. Incase you didn't save yours, run &lt;code&gt;npx hardhat run scripts/deploy.js --network goerli&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  const contractABI = abi.abi;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The abi gotten from our &lt;code&gt;SendFunds.json&lt;/code&gt; file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const provider = new ethers.providers.Web3Provider(ethereum);
const signer = provider.getSigner();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A Provider is what we use to actually talk to Ethereum nodes. A signer is used to sign transactions and send the signed transactions to the Ethereum network. Read more abour signers &lt;a href="https://docs.ethers.io/v5/api/signer/" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const sendFundsTxn = await sendFundsContract.sendFunds(
          walletAddress,
          ethers.utils.parseEther(amount),
          { gasLimit: 300000, value: parseEther(amount) }
        );
        await sendFundsTxn.wait();

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We are calling the function we wrote in our smart contract and passing in the necessary arguments and waiting for the transaction to execute. &lt;/p&gt;

&lt;p&gt;Next is the function to get all of our transactions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React, { useEffect, useState } from "react";
import { ethers } from "ethers";
import abi from "../utils/SendFunds.json";
import { parseEther } from "ethers/lib/utils";
import Transaction from "./Transactions";
import "./Form.css";

const Form = () =&amp;gt; {
  const [walletAddress, setWalletAddress] = useState("");
  const [amount, setAmount] = useState("");
  const [allTxns, setAllTxns] = useState([]);
  const [isTxn, setIsTxn] = useState(false);

  const contractAddress = "0x0FB172Db7Ab332f3ea5189C4A3659720124880Bc";
  const contractABI = abi.abi;
  const sendFunds = async () =&amp;gt; {
    try {
      const { ethereum } = window;
      if (ethereum) {
        const provider = new ethers.providers.Web3Provider(ethereum);
        const signer = provider.getSigner();
        const sendFundsContract = new ethers.Contract(
          contractAddress,
          contractABI,
          signer
        );
        const sendFundsTxn = await sendFundsContract.sendFunds(
          walletAddress,
          ethers.utils.parseEther(amount),
          { gasLimit: 300000, value: parseEther(amount) }
        );
        await sendFundsTxn.wait();
      } else {
        console.log("ethereum object does not exist!");
      }
    } catch (error) {
      console.log(error);
    }
  };

  const handleSubmit = (e) =&amp;gt; {
    e.preventDefault();
    sendFunds();
  };

  const getAllTransactions = async () =&amp;gt; {
    try {
      const { ethereum } = window;
      if (ethereum) {
        const provider = new ethers.providers.Web3Provider(ethereum);
        const signer = provider.getSigner();
        const sendFundsContract = new ethers.Contract(
          contractAddress,
          contractABI,
          signer
        );
        let getAllTxn = await sendFundsContract.getAllTxn();
        setIsTxn(true);

        let txns = [];
        getAllTxn.forEach((txn) =&amp;gt; {
          txns.push({
            address: txn.reciever,
            amount: txn.amount,
            timestamp: new Date(txn.timestamp * 1000),
          });
        });
        setAllTxns(txns);
      } else {
        console.log("ethereum object does not exist!");
      }
    } catch (error) {
      console.log(error);
    }
  };

  useEffect(() =&amp;gt; {
    getAllTransactions();
  }, []);

 useEffect(() =&amp;gt; {
    let sendFundsContract;

    const onNewTransaction = (to, amount, timestamp) =&amp;gt; {
      console.log("New transaction", to, amount, timestamp);
      setAllTxns(prevState =&amp;gt; [
        ...prevState,
        {
          address: to,
          amount: amount,
          timestamp: new Date(timestamp * 1000)
        },
      ]);
    };

    if (window.ethereum) {
      const provider = new ethers.providers.Web3Provider(window.ethereum);
      const signer = provider.getSigner();
      sendFundsContract = new ethers.Contract(contractAddress, contractABI, signer);
      sendFundsContract.on("NewTxn", onNewTransaction);
    }

    return () =&amp;gt; {
      if (sendFundsContract) {
        sendFundsContract.off("NewTxn", onNewTransaction);
      }
    };
  }, []);

  return (
    &amp;lt;div className="form"&amp;gt;
          {/* don't forget to add the input fields, i removed them to make the code shorter */}

      &amp;lt;div&amp;gt;
        {isTxn === false ? (
          &amp;lt;div&amp;gt;&amp;lt;/div&amp;gt;
        ) : (
          &amp;lt;div&amp;gt;
            &amp;lt;Transaction allTxns={allTxns} /&amp;gt;
          &amp;lt;/div&amp;gt;
        )}
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
  );
};

export default Form;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We are calling the &lt;code&gt;getAllTxn&lt;/code&gt; function and pushing it into an array that we store with &lt;code&gt;useState&lt;/code&gt; and sending the array to the &lt;code&gt;Transaction&lt;/code&gt; component. You can go ahead and create a &lt;code&gt;Transaction.js&lt;/code&gt; and &lt;code&gt;Transaction.css&lt;/code&gt; files inside your &lt;code&gt;components&lt;/code&gt; folder. &lt;br&gt;
I am also catching the event I created on the smart contract so I don't have to refresh the page whenever I send in a new transaction. &lt;/p&gt;

&lt;p&gt;The styling I used for the form. Add it to your &lt;code&gt;Form.css&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;* {
  font-family: 'Bellota', cursive;

}

button {
  color: white;
  padding: 10px 30px;
  font-size: 1.3em;
  background: transparent;
  border-radius: 50px;
  border: 1px solid white;
  margin: 10px auto 0;
  cursor: pointer;
  opacity: 0.7;
  font-weight: bold;
}

.form {
    text-align: center;
    margin: 60px auto 40px;
}

input {
    border: 1px solid #fff;
    padding: 8px 13px;
    border-radius: 50px;
    width: 30%;
    margin-bottom: 20px;
    font-weight: bold;
    font-size: 18px;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For the final bit of this tutorial, let us display our transactions on the front end. &lt;/p&gt;

&lt;p&gt;In your &lt;code&gt;Transaction.js&lt;/code&gt; file, input the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from 'react';
import './Transaction.css'
import moment from 'moment'
import {ethers} from 'ethers'

const Transaction = ({allTxns}) =&amp;gt; {
  console.log(allTxns)
  return (
    &amp;lt;div className='transaction-container'&amp;gt;
    &amp;lt;h2&amp;gt;All Transactions:&amp;lt;/h2&amp;gt;
     {allTxns.length === 0 ? &amp;lt;div&amp;gt;

       &amp;lt;/div&amp;gt;: &amp;lt;div className='grid-container'&amp;gt;

          {allTxns.map((txn, index) =&amp;gt; {
            return (
              &amp;lt;div key={index} className='transactions'&amp;gt;
                &amp;lt;p&amp;gt;Reciever: {txn.address}&amp;lt;/p&amp;gt;
                &amp;lt;p&amp;gt;Amount: {ethers.utils.formatUnits(txn.amount.toString(), 'ether')} eth&amp;lt;/p&amp;gt;
                &amp;lt;p&amp;gt;Date:  {moment(txn.timestamp.toString()).format('MM/DD/YYYY')}&amp;lt;/p&amp;gt;
                &amp;lt;/div&amp;gt;
            )
          })}
         &amp;lt;/div&amp;gt;}
    &amp;lt;/div&amp;gt;
  );
};

export default Transaction;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What is going on here is very clear. We are getting the &lt;code&gt;allTxns&lt;/code&gt; prop from the &lt;code&gt;Form.js&lt;/code&gt; file and we are displaying the data. Changing WEI to ETH using &lt;code&gt;ethers.utils.formatUnits&lt;/code&gt; and changing the &lt;code&gt;txn.timestamp&lt;/code&gt; to something more readable using &lt;code&gt;moment&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;Styling for &lt;code&gt;Transaction.css&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.transaction-container {
    text-align: left;
    margin-top: 20px;
}

.grid-container {
    display: grid;
    grid-template-columns: auto auto auto;
    grid-gap: 10px;
}

.transactions{
    background-color: #ffffff;
    color: black;
    padding: 0 10px;
    border-radius: 10px;
    width: 60%;

}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run &lt;code&gt;npm start&lt;/code&gt; in your terminal. Send some transactions. Your web page should be looking like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fymcdb3iiggjoydaekmeh.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fymcdb3iiggjoydaekmeh.PNG" alt="Final result" width="800" height="382"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Further learning
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://solidity-by-example.org/" rel="noopener noreferrer"&gt;Solidity by example&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://buildspace.so/" rel="noopener noreferrer"&gt;buildspace&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cryptozombies.io/" rel="noopener noreferrer"&gt;cryptozombies&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Connect with me on: &lt;a href="https://twitter.com/devv_chi" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt; || &lt;a href="https://www.linkedin.com/in/chidera-johnson-7018ba22a/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>react</category>
      <category>web3</category>
      <category>programming</category>
    </item>
    <item>
      <title>Differences between Web2(social web) and Web3(semantic web)</title>
      <dc:creator>Chichi Johnson</dc:creator>
      <pubDate>Tue, 01 Mar 2022 16:32:23 +0000</pubDate>
      <link>https://forem.com/christy5727/differences-between-web2social-web-and-web3semantic-web-5ea1</link>
      <guid>https://forem.com/christy5727/differences-between-web2social-web-and-web3semantic-web-5ea1</guid>
      <description>&lt;p&gt;Before we dive into the differences between web2 and web3, we first need to understand what web2 and web3 are. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WHAT IS WEB2&lt;/strong&gt;&lt;br&gt;
Web2 is the version of the internet most of us know of today. With technologies like js, html and css, the web became more interactive as tech giants like meta, Twitter and Amazon provides services to us and in the process collected data from us. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WHAT IS WEB3&lt;/strong&gt;&lt;br&gt;
This is an idea for a new iteration of the World Wide Web based on blockchains which incorporates concepts including decentralization and token based economics.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Differences between web2 and web3&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;WEB2&lt;/th&gt;
&lt;th&gt;WEB3&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Apps like Twitter and Facebook are centralized&lt;/td&gt;
&lt;td&gt;Apps or dApps are decentralized&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Servers can go down&lt;/td&gt;
&lt;td&gt;Servers can’t go down&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Participation in this network is controlled by a central authority&lt;/td&gt;
&lt;td&gt;participation is free to anyone and isn’t controlled by a central authority&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;central authorities can censor data&lt;/td&gt;
&lt;td&gt;censorship is much harder as information has many ways to move through the network&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;With the emergence of web3, web2 is not and will not be completely eradicated because it still has its usefulness.&lt;br&gt;
Although web3 has its limitations such as scalability, accessibility and cost. It is still very new and more web3 technologies are being invented everyday.&lt;/p&gt;

&lt;p&gt;An intern at &lt;a href="https://blockgames.gg/" rel="noopener noreferrer"&gt;blockgames&lt;/a&gt; hoping to work and learn at &lt;a href="https://nestcoin.com/" rel="noopener noreferrer"&gt;Nestcoin&lt;/a&gt; and the amazing team at &lt;a href="https://zuri.team/" rel="noopener noreferrer"&gt;Zuriteam&lt;/a&gt;&lt;/p&gt;

</description>
      <category>web3</category>
      <category>webdev</category>
      <category>blockchain</category>
    </item>
    <item>
      <title>How to get google client ID and client Secret</title>
      <dc:creator>Chichi Johnson</dc:creator>
      <pubDate>Sun, 05 Apr 2020 15:43:34 +0000</pubDate>
      <link>https://forem.com/christy5727/how-to-get-google-client-id-and-client-secret-4c87</link>
      <guid>https://forem.com/christy5727/how-to-get-google-client-id-and-client-secret-4c87</guid>
      <description>&lt;p&gt;These are the easy steps in creating your own google client ID and google Secret.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to console.developers.google.com. &lt;/li&gt;
&lt;li&gt;Click on new project.
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffh887n3fjkp54q3cglhn.png" alt="New Project" width="800" height="456"&gt;
&lt;/li&gt;
&lt;li&gt;Add project name and click on create.
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fx9w97xz1qj89a7bk67wj.png" alt="Project name" width="800" height="456"&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Make sure the project you are on is the newly created one.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fe51jskuz6uprl40t3k9k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fe51jskuz6uprl40t3k9k.png" alt="Newly Created" width="800" height="456"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click on the hamburger icon, navigate to api services and choose credentials. &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fsy2ommkam44ji3v5iq29.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fsy2ommkam44ji3v5iq29.png" alt="Credentials" width="800" height="456"&gt;&lt;/a&gt;&lt;br&gt;
Then click on create credentials and click on oauth client ID.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fvhiteluglgoz6rcig011.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fvhiteluglgoz6rcig011.png" alt="client id" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Before you can create client ID, you need to configure consent screen.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F4lala14diwgbfbqxcxfi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F4lala14diwgbfbqxcxfi.png" alt="consent screen" width="800" height="456"&gt;&lt;/a&gt;&lt;br&gt;
click on configure consent screen.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click on external and create.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fo5i1vo89jeb3j1weewr4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fo5i1vo89jeb3j1weewr4.png" alt="External" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Type in the application name. You can fill out the form if you like, it is not required. Make sure the application name does not have the word 'google' in it.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Frk09wkv0rpfricb7rl8v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Frk09wkv0rpfricb7rl8v.png" alt="App name" width="800" height="456"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Go back to the dashboard and click on enable Apis and services. &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fucs4ptd5oxng98037x31.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fucs4ptd5oxng98037x31.png" alt="Enable" width="800" height="456"&gt;&lt;/a&gt;&lt;br&gt;
For google, it is google plus api.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ftdn91a077fartyobso2i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ftdn91a077fartyobso2i.png" alt="Google plus" width="800" height="456"&gt;&lt;/a&gt;&lt;br&gt;
click on enable.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Go back to credentials, click on create credentials then navigate to oauth client ID.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click on web application. if you are using localhost, follow the image instruction below for authorized javascript origin and redirect uri. then click on create.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqyuhg9g277pg2ib9427l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqyuhg9g277pg2ib9427l.png" alt="web app" width="800" height="456"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Your oauth client ID and client Secret is successfully created. &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fc0hrihjloe0w3ol8vir1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fc0hrihjloe0w3ol8vir1.jpg" alt="id and secret" width="800" height="456"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>webdev</category>
      <category>api</category>
    </item>
  </channel>
</rss>
