A simple example implementing a property trading game.
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.
What things you need to install the software and how to install them
- Windows, Linux or Mac OS X
- NodeJS 5.0+ recommended.
- ganache
- MetaMask (Recommended) or
- Ethereum Mist
A step by step series of examples that tell you have to get a development env running
-
Install the prerequisites above
-
Clone the git repository.
git clone https://[email protected]/hustle24/the-block.git
-
Start ganache
-
Configure the MetaMask client to use the Ganache blockchain. See how-to here
-
From the command line terminal, navigate to the the-block directory.
-
Start the Dapp.
npm run dev
-
From a new command line terminal, navigate to the the-block directory.
-
Open the truffle console.
truffle console
- Deploy the contract.
truffle(development)> migrate
- For testing purposes, generate 10 initial property contracts.
truffle(development)> TheBlock.deployed().then(function (instance) {instance.genesis();});
- 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):
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.
TODO
TODO
TODO
TODO
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
- Bruce Smalls
- Johnathan Howard
This project is licensed under the TBD License - see the LICENSE.md file for details
- TODO