Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added New tutorials for Linea #927

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open

Conversation

meowyx
Copy link

@meowyx meowyx commented Jan 8, 2025

Adding 2 new tutorials:

  • marketplace dapp
  • voting dapp

Copy link

vercel bot commented Jan 8, 2025

@meowyx is attempting to deploy a commit to the Consensys Team on Vercel.

A member of the Team first needs to authorize it.

@meowyx
Copy link
Author

meowyx commented Jan 8, 2025

will be updating and making more changes for the next few days!
feel free to leave any review.

Copy link
Collaborator

@jlwllmr jlwllmr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots of comments but don't be dismayed by the quantity — a lot of are just implementing sentence case! Thanks for putting this together. Let me know if I can expand on any of the comments.

Also since this is just the marketplace dapp, I assume you intend to add the other two guides to this PR at some point?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this index file -- you can just take the front matter here and put it at the top of the page (marketplace-dapp.mdx) itself.

This also means you don't need a h1 title in the file, since Docusaurus will pull the title from the front matter

@@ -0,0 +1,527 @@
# Building a Simple Marketplace DApp on Linea: A Step-by-Step Guide
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned above - we can remove this if you move the front matter here from the index file.

It also doesn't add much that the title and description haven't stated already

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need front matter here, e.g.

---
title: Marketplace dapp
description: A step-by-step guide for building a simple marketplace dapp
---

^ This keeps the title short to help with display in the sidebar, and moves some of the detail to the description. It also means we no longer need the # title you have line 1

docs/learn/marketplace-dapp/marketplace-dapp.mdx Outdated Show resolved Hide resolved
docs/learn/marketplace-dapp/marketplace-dapp.mdx Outdated Show resolved Hide resolved

We will cover both the **frontend** and **smart contract development.**

## **What is Linea L2 and zkEVM?**
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove this whole section. It's accurate and informative, but isn't strictly necessary for this tutorial. And we want tutorials to be as clear and fast as possible. This kind of information is also available in many other places if they want to go looking for it; we don't really need to sell Linea here, since them being on this page is probably sufficient evidence that they're looking to build

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This totally makes sense. Thank you!


Now we should be able to list and item,buy and transfer ownership.

In this guide, we built a simple decentralized marketplace DApp on Linea, leveraging zkEVM technology for scalability and cost efficiency. We covered everything from setting up the environment to writing and deploying smart contracts, and integrating the frontend with Next.js and ShadcnUI.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove this paragraph

docs/learn/marketplace-dapp/marketplace-dapp.mdx Outdated Show resolved Hide resolved
docs/learn/marketplace-dapp/marketplace-dapp.mdx Outdated Show resolved Hide resolved
docs/learn/marketplace-dapp/marketplace-dapp.mdx Outdated Show resolved Hide resolved
docs/learn/marketplace-dapp/marketplace-dapp.mdx Outdated Show resolved Hide resolved
meowyx and others added 19 commits January 13, 2025 18:21
@meowyx meowyx requested a review from jlwllmr January 14, 2025 14:14
Copy link
Collaborator

@jlwllmr jlwllmr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the second tutorial, very thorough!

A few overarching points:

  • As mentioned last time, all subheadings and headings should be sentence case
  • There are a few places where things are capitalised unnecessarily. The only places where we should be capitalising are proper nouns (e.g. product/feature names) or where gramatically necessary.
  • I think we can simplify the folder structure, i.e. marketplace-dapp.mdx and voting-dapp.mdx can just live within docs/learn rather than as orphan files in their own directories Implemented this is in my commit
  • The sidebar is manual, in sidebars.js, and needs to be updated. I'll push up a commit with this and a few other adjustments we need to make sure the link appears in the navbar too.

@@ -0,0 +1,527 @@
# Building a Simple Marketplace DApp on Linea: A Step-by-Step Guide
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need front matter here, e.g.

---
title: Marketplace dapp
description: A step-by-step guide for building a simple marketplace dapp
---

^ This keeps the title short to help with display in the sidebar, and moves some of the detail to the description. It also means we no longer need the # title you have line 1

@@ -0,0 +1,537 @@
# Building a Simple Marketplace DApp on Linea: A Step-by-Step Guide

### Introduction
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Introduction
## Introduction

We jump immediately to a h3 (###) from h1 (#). Since we should only ever move in increments of 1, this should be a h2

In this tutorial, we will build a simple marketplace dapp.

We will cover both the **frontend** and **smart contract development.**

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove these lines; we only need one line of space

@@ -0,0 +1,679 @@
Blockchain and web3 have changed our understanding of transparency, trust and decentralization. One of the most incredible use-case for this technology is the development of web3 dApps(Decentralized Applications) that offers solutions that are secure, verifiable and tamper-proof solutions to our everyday challenges. Among all the use-cases, decentralized voting stands out. Decentralized technologies remove middlemen and ensure transparent vote counts, this voting dApp has the potential to change governance system while enhancing the democratic process.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs front matter, similar to the content I added in a comment on the other guide, and to match the standard format for the repo

@@ -0,0 +1,679 @@
Blockchain and web3 have changed our understanding of transparency, trust and decentralization. One of the most incredible use-case for this technology is the development of web3 dApps(Decentralized Applications) that offers solutions that are secure, verifiable and tamper-proof solutions to our everyday challenges. Among all the use-cases, decentralized voting stands out. Decentralized technologies remove middlemen and ensure transparent vote counts, this voting dApp has the potential to change governance system while enhancing the democratic process.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Blockchain and web3 have changed our understanding of transparency, trust and decentralization. One of the most incredible use-case for this technology is the development of web3 dApps(Decentralized Applications) that offers solutions that are secure, verifiable and tamper-proof solutions to our everyday challenges. Among all the use-cases, decentralized voting stands out. Decentralized technologies remove middlemen and ensure transparent vote counts, this voting dApp has the potential to change governance system while enhancing the democratic process.
Blockchain and web3 have changed our understanding of transparency, trust and decentralization. Dapps (decentralized applications) offer secure, verifiable, and tamper-proof solutions to our everyday challenges. Decentralized voting is one such use case, where these technologies remove middlemen and ensure transparent vote counts, introducing a new, democratic governance paradigm.

You can probably trim this down considerably — above is my suggestion.

Blockchain and web3 have changed our understanding of transparency, trust and decentralization. One of the most incredible use-case for this technology is the development of web3 dApps(Decentralized Applications) that offers solutions that are secure, verifiable and tamper-proof solutions to our everyday challenges. Among all the use-cases, decentralized voting stands out. Decentralized technologies remove middlemen and ensure transparent vote counts, this voting dApp has the potential to change governance system while enhancing the democratic process.

In this tutorial, we will build a simple voting dapp on linea, a zkEVM layer 2 blockchain solution. You will learn how to write, deploy and interact with a smart contract which is designed for decentralized voting process. By the end of this tutorial, you’ll have the solid understanding of the tools and features provided by linea for decentralized applications.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unnecessary lines here


## Architecture

The voting dApp has three main components: smart contracts, smart contracts integration and the frontend interface.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The voting dApp has three main components: smart contracts, smart contracts integration and the frontend interface.
The voting dapp has three main components: smart contracts, smart contracts integration and the frontend interface.

Please use dapp throughout.

"smart contracts integration" also needs some attention but I'm not entirely clear what you're referring to, so unsure what to suggest. What does this statement mean?


The voting dApp has three main components: smart contracts, smart contracts integration and the frontend interface.

The smart contract is one of the main component of the application. This can handle critical functionalities such as registering candidates, allowing users to give their votes based on candidates index numbers, enforcing a one vote per wallet address policy and managing voting period by automatically closing the voting period after a specified duration. The smart contract makes sure that the voting process is secure, transparent and tamper-proof by recording all votes on the blockchain.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The smart contract is one of the main component of the application. This can handle critical functionalities such as registering candidates, allowing users to give their votes based on candidates index numbers, enforcing a one vote per wallet address policy and managing voting period by automatically closing the voting period after a specified duration. The smart contract makes sure that the voting process is secure, transparent and tamper-proof by recording all votes on the blockchain.
The smart contract is one of the main components of the application. This can handle critical functionalities such as registering candidates, allowing users to give their votes based on candidates index numbers, enforcing a one-vote-per-wallet-address policy and managing voting period by automatically closing it after a specified duration. The smart contract makes sure that the voting process is secure, transparent, and tamper-proof by recording all votes on the blockchain.

Above in line 9 you referenced smart contracts, in the plural, but here we talk. about a single one -- which is it?


To ensure smooth interaction with the Linea blockchain, we'll utilize the MetaMask SDK along with libraries like Wagmi and connect through Infura RPC providers. These tools allow the frontend to communicate with the blockchain, enabling users to sign transactions and interact with the smart contracts directly from their web browsers. This integration is crucial for maintaining the decentralized nature of the application while providing a user-friendly experience.

### Setting Up the Environment
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Setting Up the Environment
### Set up the environment

Titles should use imperative verb forms, e.g. "Set up" rather than "setting up"


Now, you have a decentralized voting dApp where users can vote for the candidates by using their index number. These votes are secure, transparent and recorded on Linea blockchain.

In this tutorial, we built a simple decentralized voting application on Linea, while leveraging zkEVM technology for scalability, security, and cost efficiency. We covered everything from setting up the environment by using the CLI to writing and deploying smart contracts, and integrating the frontend with Next.js and Shadcn UI.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In this tutorial, we built a simple decentralized voting application on Linea, while leveraging zkEVM technology for scalability, security, and cost efficiency. We covered everything from setting up the environment by using the CLI to writing and deploying smart contracts, and integrating the frontend with Next.js and Shadcn UI.
In this tutorial, we built a simple decentralized voting application on Linea, while leveraging zkEVM technology for scalability, security, and cost efficiency. We covered everything from setting up the environment by using the CLI to writing and deploying smart contracts, and integrating the frontend with Next.js and Shadcn UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants