Skip to content
This repository was archived by the owner on May 4, 2022. It is now read-only.

BlockPoll/web

Repository files navigation


BlockPoll Web Application

BlockPoll is a blockchain-based polling application where users can create polls, cast votes on polls, view poll results and share polls. It is built on Solana Blockchain.

This is a pure web3 application - meaning there is no intermediate database involved. All of the poll data is stored on blockchain.

Website

The application is live and hosted at https://blockpoll.io

Solana on-chain program (smart contract)

The on-chain program source code is available on GitHub.

Wallet integration

BlockPoll allows users to connect with multiple wallets - Eg: Solflare, Sollet, Phantom, etc. Users will have to connect their wallet for following operations:

  • Create Poll
  • Cast Vote on poll

Build and Run

Requires NodeJs.

Install dependencies

$ yarn install

Start development server

$ yarn dev

Environment variables

The application requires following environment variables:

  • NEXT_PUBLIC_PROGRAM_ID - BlockPoll on-chain program address.

Create a new file .env.local in application root and add NEXT_PUBLIC_PROGRAM_ID=<blockpoll_program_address> to it.

Eg: NEXT_PUBLIC_PROGRAM_ID=EoDZ9sR4bW1AE1Qme3UA1Yn1n6SWSDUzeawyYeBzkxbY

That's it!

Important

Please DO NOT use GnS5xMqf5NaY7HgbwFneyLNktT8NNNKi4rA2JEmnYdzi program address for local development. You may use the following addresses (or deploy your own) when developing locally:

  • EoDZ9sR4bW1AE1Qme3UA1Yn1n6SWSDUzeawyYeBzkxbY

Program code and deployment instructions are available on GitHub


Author

Authored by Rijul Gulati

Contributions

All kinds of contributions are welcome. Feel free to create an issue or raise a pull request

Sponsors

for infrastructure

License

MIT