GithubHelp home page GithubHelp logo

jhowardjr / the-block Goto Github PK

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

A simple example implementing a property trading game. Using several Ethereum blockchain development tools.

License: Other

JavaScript 99.01% HTML 0.99%

the-block's Introduction

The Block

A simple example implementing a property trading game.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

What things you need to install the software and how to install them

Browser Requirement

Installing

A step by step series of examples that tell you have to get a development env running

  1. Install the prerequisites above

  2. Clone the git repository.

git clone https://[email protected]/hustle24/the-block.git
  1. Start ganache

  2. Configure the MetaMask client to use the Ganache blockchain. See how-to here

  3. From the command line terminal, navigate to the the-block directory.

  4. Start the Dapp.

npm run dev
  1. From a new command line terminal, navigate to the the-block directory.

  2. Open the truffle console.

truffle console
  1. Deploy the contract.
truffle(development)> migrate
  1. For testing purposes, generate 10 initial property contracts.
truffle(development)> TheBlock.deployed().then(function (instance) {instance.genesis();});
  1. In Chrome, with the MetaMask plugin enabled, go to http://localhost:3000/
  • If successful, the following will be display (The auction section will be different):

Screenshot

How does it work

Running the genesis() function above creates 10 contracts on the blockchain. Each contract is represented with an address that looks like 0x2d3fdb70870a072fddc3b9d64b163d2b11d2dc29. Removing the first two character 0x there are 40 remain hexadecimal values. Each hexadecimal digit can be used to make decisions 40^16 combinations. In this example, using 2d3fdb70870a072fddc3b9d64b163d2b11d2dc29, the type of property is selected based on the '2' in the first position and a simple image color manipulation is done using the 'd' in the second position. Based on the user unlocking other features of the contract more elements or transformations of the photo can occur. Imagine they unlocked the "house" feature we could use the 'd' in the second position to choose from 16 different house to place and use the adjacent '3' in the third position to transform the pattern of the house. This example could be expanded to many different operations. Imagine also users could trade ownership on the contract before all the options are exhausted or even resell the contract once they are tired of upgrading an existing property. The big question is how do we gamify unlocking these options in a way that is fun.

Running the tests

TODO

Break down into end to end tests

TODO

And coding style tests

TODO

Deployment

TODO

Built With

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

  • Bruce Smalls
  • Johnathan Howard

License

This project is licensed under the TBD License - see the LICENSE.md file for details

Acknowledgments

  • TODO

the-block's People

Contributors

jhowardjr avatar

Watchers

James Cloos 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.