The Voting dApp#

In this tutorial, you are going to get familiar with the deployed voting dApp on testnet. The voting dApp example is intended to show how you can use Concordium to conduct an election using the Concordium Wallet for Web to enable users to cast their vote in your election. You are going to write a basic web frontend example that can read from and write to the deployed smart contract on testnet.

If you want to try this example before starting the tutorial:

  1. Download and configure the Concordium Wallet for Web on Testnet. You need an account with some CCD. Use the testnet faucet for CCDs if you don’t have any.

  2. Go to the example dApp site. Click Setup election.

  3. Click Connect. When prompted in your Concordium Wallet for Web, accept the connection.

  4. Enter an election description and add options for voting selections. Change the deadline if you wish. Then click Create election. Click Sign & Submit in the Concordium Wallet for Web.

  5. Click Vote now. You can vote and send the link to any other voters. When you click Cast vote you must click Sign & submit in the Concordium Wallet for Web.

  6. Click Results to see the election results. Note that your vote may not appear instantaneously after voting, as the vote transaction waits for confirmation. Give it a few seconds and the vote should appear.

In the first part, you will learn about the voting smart contract.

In the second part, you will download the Concordium Wallet for Web and set up a basic web frontend locally.

Warning

This tutorial assumes the reader has basic knowledge of what a blockchain and a smart contract is, and some experience with Rust and web frontend development. Consider reading the simpler Counter smart contract tutorial first.

To start the tutorial click here.

Was this article helpful?