Git Product home page Git Product logo

truffle-voting-dapp-ropsten's Introduction

Voting example DApp on Truffle Framework.

This is a DApp example on Ethereum Ropsten testnet using Truffle Framework. It is deployed in Heroku: https://voting-dapp-ropsten.herokuapp.com

We develop a DApp where the users can create proposals and vote them. Of course, they can vote once per proposal with the options in support, against or absence.

For Spanish speaking readers, you can read more about this tutorial.

Preconditions to development

This dapp is based on the official tutorial to get start with Truffle Framework: http://truffleframework.com/tutorials/pet-shop and official tutorial to deploy on ropsten network: http://truffleframework.com/tutorials/using-infura-custom-provider. So, I strongly recommend to read it before.

You need to pay attention to configure MetaMask and make sure you have enough ether in your account to do the deployment and use the dapp.

Deployment on Heroku

  • git clone https://github.com/bukosabino/truffle-voting-dapp-ropsten.git
  • cd truffle-voting-dapp
  • npm install -g truffle
  • npm install
  • truffle compile
  • Configure settings variables to ropsten in truffle.js file:
    • var infura_apikey = "you need to register in Infura for an Access Token.";
    • var mnemonic = "< twelve words you can find in metamask/settings/reveal seed words >";
    • var address = "ropsten address with ether";
  • truffle migrate --reset --network ropsten
    • Note: If you receive an error Error: Exceeds block gas limit, you may need to manually set the gas limit for your contract. See the Truffle Configuration documentation for details.
  • git push heroku master

Deployment on local

You need delete bs-config.js file (only useful to heroku deployment).

  • git clone https://github.com/bukosabino/truffle-voting-dapp-ropsten.git
  • cd truffle-voting-dapp
  • npm install -g truffle
  • npm install
  • truffle compile
  • Configure settings variables to ropsten in truffle.js file:
    • var infura_apikey = "you need to register in Infura for an Access Token.";
    • var mnemonic = "< twelve words you can find in metamask/settings/reveal seed words >";
    • var address = "ropsten address with ether";
  • truffle migrate --reset --network ropsten
    • Note: If you receive an error Error: Exceeds block gas limit, you may need to manually set the gas limit for your contract. See the Truffle Configuration documentation for details.
  • npm run test

TODO:

  • Init and end dates to proposals.
  • Anonymous users.

Credits:

Developed by Bukosabino at Lecrin Technologies - http://lecrintech.com

We are glad to receive any contribution, idea or feedback.

Donation Address

  • ETH: 0x96d6e3823b655602cc643996c1ada8b6b532f0c0
  • DASH: XrXUic1huVaFfSqDygveADwNAbdutz41VG

truffle-voting-dapp-ropsten's People

Contributors

bukosabino avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  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.