Giter Club home page Giter Club logo

decentrilizedvoting's Introduction

Project Description

This is decentralized voting web application. People can vote the favorite cryptocurrencies.

Project Setup

Prerequisite

nodejs, npm, ganache-cli, metamask chrome plugin are installed

start ganache (make sure using teh default port 8545)

$ ganache-cli

copy one of the private key and in metamask click "Import Account" and paste the private key

Execute the following command in the root of project

$ npm install

$ truffle compile

$ truffle migrate

$ npm run dev

Then use http://127.0.0.1:8080/

Enter one of "Bitcoin", "Ethereum", "EOS" can click vote. The data will write to the blockchain. Refresh the page to see the result. In the metamask, make sure "localhost 8545" is selected as the network. Make sure the gas is at least 5 wei.

Testing

run the following command in the project directory

$ truffle test tests/TestVoting.sol

Security Tools / Common Attacks

Pitfalls in Race Condition Solutions¶ Since race conditions can occur across multiple functions, and even multiple contracts, any solution aimed at preventing reentry will not be sufficient.

decentrilizedvoting's People

Contributors

xichenn avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.