promo icon

Stake your tez (XTZ) now and start earning 2x rewards

promo icon
hero background image

Home

Developer Portal

Create a Voting dApp on Tezos: A Comprehensive Tutorial

Adebola Adeniran

Adebola Adeniran

@heyadebola

·

30 min read

·

Apr 18, 2024

Type:

dApps

Smart Contracts

Level:

Beginner

Tech Stack:

React,

TypeScript,

SmartPy

In this two-part tutorial series, Adebola, a Developer Advocate at TriliTech, walks you through the process of building a Voting dApp using SmartPy and React. This tutorial is perfect for developers looking to get hands-on experience with smart contract development and front-end integration on the Tezos blockchain.

What you’ll learn:

  • Writing and deploying the Smart Contract
  • Building the frontend dApp
  • Create a decentralized Voting dApp on the Tezos blockchain using SmartPy and React

Part 1: Writing and deploying the Smart Contract

In the first part of this series, you will learn how to write a simple smart contract for your Voting dApp using SmartPy, a Python library for smart contract development on Tezos. Adebola will guide you through the steps to deploy this contract on the Tezos Testnet.

Key Steps in Part 1:

  1. Introduction to SmartPy: Understand the basics of SmartPy and why it's a powerful tool for developing smart contracts on Tezos.
  2. Writing the Voting Smart Contract: Learn how to write a smart contract that allows users to vote for their favorite football players of the year.
  3. Deploying to the Testnet: Get step-by-step instructions on how to deploy your smart contract to the Tezos Testnet.

For a more detailed walkthrough, read the accompanying blog post:

How to Build a Voting dApp on Tezos with SmartPy and React - Part 1

Or watch the 11 minute part 1 below:

Part 2: Building the frontend dApp

In the second part of the series, you will learn how to build a frontend application using React that connects to the smart contract deployed in Part 1. This part focuses on creating an intuitive user interface that interacts with the Tezos blockchain.

Key Steps in Part 2:

  1. Setting Up the React App: Learn how to set up a React application and integrate it with the Tezos blockchain.
  2. Connecting to the Smart Contract: Understand how to connect your frontend to the smart contract deployed in Part 1.
  3. Building the Voting Interface: Create a user-friendly interface that allows users to vote for their favorite football players.

For a more detailed walkthrough, read the accompanying blog post:

How to Build a Voting dApp on Tezos - Part 2

Or watch the 11 minute part 1 below:

Conclusion

By following this two-part tutorial series, you will gain a solid understanding of how to create a decentralized Voting dApp on the Tezos blockchain using SmartPy and React. Adebola's detailed walkthroughs provide valuable insights into smart contract development and frontend integration, making this a must-watch series for any developer interested in blockchain technology.

Contents

Related resources

Dive into one of the tutorials from the community and get started now.

FOLLOW US

Feedback or comments? Get in touch with us at reachout@tezos.com

For media inquiries please contact communications@tezos.foundation

General

Fundraiser

Careers

Blog