GithubHelp home page GithubHelp logo

sweaty-chair / blockopoly-dapp Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 15.6 MB

A complete web dApp for land jackpot buying.

Home Page: http://app.block42.world

License: MIT License

JavaScript 92.54% HTML 0.19% CSS 0.45% Solidity 6.81% Shell 0.01%
web3js etherum dapp nodejs

blockopoly-dapp's Introduction

Block42

Blockopoly Web DApp

Build Status

A complete web DApp for land jackpot buying.

There's 42 lands in total and ONE land is released each week. A land is split into 42 plots and all players can join 1 of 4 teams and bid on one or more plots with ethers. Each team has different reward divided rules. (More detail of each team will be finalized)

The bidding process will be just like eBay, where a bidder place a maximum bid and the current bidding price of the plot is automatically adjusted every time another bidder placing a bid. At the end of the week, the team with most bided plots wins the land. The owner of the land will be assigned to the player who having the most total bids within that team. A portion of the bid ethers go back to rewarding the winning team and the rest will be deposited into the final jackpot. How the team get rewards depends on team rule. (E.g. 50% of the bid ethers distributed back to all bidders in winning team, proportionally to their bided total) The winning team and contributed bidders are saved into the land's description permanently.

After all 42 lands are sold, the game enters free-trade period for another week. Land owners can freely trade their lands to another with agreed prices. A small percentage fee will be charged and deposited into the final jackpot. At the end of the free-trade week, the owner of most lands take the final jackpot ethers. (In case the number of lands are equal for 2 players, the player with the most total bidding price wins)

The ownership of the land is a ERC721 token and will be owned by the owner in life time. Owners of the lands can customize and create building of the land, which will be part of Block42 world and will receive income from the interaction with Block42 players.

Blockopoly DApp screenshot

Please note that this is still in prototype and under heavy development. The final product may be subject to a number of quality assurance tests to verify conformance with specifications.

Getting Started

Prerequisites

Install local dependencies

npm install

Setup enviroment

Mneonmic is used to generate the same wallets every time for easier testing. For security reason, you have to put in your own mneonmic from either Metamask or Geneche. Rename .env.example to .env, put your Mnenonmic and Infura API Key (if you deploy to testnet).

Blockchain smart contract development

Run the Truffle development console

truffle develop

Compile and migrate the smart contracts in Truffle console

compile
migrate

Test smart contracts

// If inside the development console.
test
// If outside the development console..
truffle test

React.js frontend development

Run the webpack server for front-end hot reloading (outside the development console

// Serves the front-end on http://localhost:3000
npm run start

Jest is included for testing React components. Compile your contracts before running Jest, or you may receive some file not found errors

npm run test

To build the application for production, use the build command. A production build will be in the build_webpack folder

npm run build

(Optional) This project utilizes gh-pages to deploy to GitHub Pages for demo purpose.

npm run deploy

Deployed demo

Terminology For Dummies

  • Truffle - A development framework for Ethereum for writing, deploying and testing smart contract solidity scripts
  • Web3.js - A JavaScript library for communicating with Ethereum network
  • React.js - A JavaScript library for building frontend user interfaces
  • Node.js - A JavaScript runtime for building scalable network applications

More Info

Helper Links

TODO

  • Add better graphic for MetaMask install instruction
  • Add CoverAlls badge Coverage Status

blockopoly-dapp's People

Contributors

dependabot[bot] avatar sweatyc avatar

Watchers

 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.