Giter Site home page Giter Site logo

vote-system's Introduction

vote

block chain app

使用说明

  1. 使用npm安装依赖,其中web3需要python2的支持
    npm install
  2. 使用remix编译contract/vote.sol,在geth或其他支持web3的客户端上发布合约.
  3. 将得到的合约地址填入plugins/web3.js的下述代码中
     web3.eth.getAccounts().then((data) => {
         web3.from = data[0]
         //将这里的第二个参数改为 你得到的地址
         web3.ballotmanagerContract = new web3.eth.Contract(abi, '0x9342ba7ea1b1833e4070130252549a02021c1087')
     })
  4. 开始挖矿
  5. 运行服务器,服务器只提供页面渲染服务,数据均由web3提供,即数据均保存在区块链上
     //开发者模式
     npm run dev
     //非开发者模式
     $ npm run build
     $ npm start
     //生成静态项目
     npm run generate
  6. 在浏览器中输入127.0.0.1:8080可查看运行效果
  7. 不提供注册,需自行在geth客户端中新建账户。

vote-system's People

Contributors

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