Code Monkey home page Code Monkey logo

qzoneblockpet's Introduction

区块链宠物demo

目录结构

  • app : 网页服务器
  • build : 合约编译生成目录,不要手动修改
  • contracts : 合约目录
  • migrations : truffle部署配置文件,新的合约需要部署需要修改里面的配置文件
  • test : 合约的测试文件
  • truffle.js : 区块链网络配置文件,目前配的是testrpc默认测试环境

依赖

使用npm install xxx安装

  • nodejs : 在官网下载二进制安装包,或者用brew/apt-get安装
  • web3 : 使用npm安装,以太坊提供的js接口以rpc方式访问区块链数据和合约
  • truffle : 第三方开源的DApp打包工具
  • express : node.js服务器开发框架
  • ethereumjs-testrpc : 以太坊提供的区块链测试环境
  • truffle-contract : 基于web3.js封装的更易用接口

运行方式

  1. $ testrpc 启动区块链测试环境
  2. $ truffle compile 编译智能合约
  3. $ truffle migrate --reset 部署所有智能合约
  4. $ cd app
  5. $ npm start 启动服务器
  6. 浏览器访问localhost:8080,目前提供的接口详见INTERFACE.md

qzoneblockpet's People

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.