This is a basic decentralized voting application, built for Ethereum, which highlights key features of a Decentralized application such as the Smart Contracts.
This application is based on the fantastic tutorial here. We encourage you to read this article, since it covers the concepts in a nice way.
NodeJS
andnpm
- A Web Browser
- Run
npm install
in the directory to install the required packages.
We'll be running the app on an in-memory blockchain (sort of blockchain simulator)
- Run the
start_eth_sim.sh
script to start the ganache-cli(in-memory blockchain)
bash start_eth_sim.sh
- Run the
compile_and_load.js
node script to compile the solidity code and deploy it to the local blockchain. The address of the deployed code and the ABI(Application Binary Interface) which basically contains all the methods available in the compiled contract and stores them to theparams.json
file.
node compile_and_load.js
- You can now interact with the application using the web page. You can serve the
index.html
using apps like Web Server for Chrome or simple open it in a browser.