A decentralized housing product.
Contract address of Verifier.sol: https://ropsten.etherscan.io/address/0xd2eb4347daa8e2eb14d176bb7fe90b25dfdd7836
Contract address of Real Estate Listing: https://rinkeby.etherscan.io/token/0x074148e8df9f30f99c1705f846d72d2a350f160c
The contract ABIs are located in the corresponding .json files under the folder build/contracts
Marketplace: https://rinkeby.opensea.io/category/realestatelistingv4
These instructions will get you a copy of the Blockchain-Capstone.app and lets you run the client on the local machine and deploys your own contract to the test network rinkeby.
-
Clone this repository:
$ git clone https://github.com/Userrick/Blockchain-Capstone
-
Got to Blockchain-Capstone/server/ and install all requisite npm packages (as listed in
package.json
):$ npm install
-
Create a new file in Blockchain-Capstone/server/ with the name secrets.js:
$ touch secrets.js
-
Copy the following into it (attention to https://):
const secrets = { mnemonic: "YOUR-SEED-WORDS-FROM-METAMASK-ACCOUNT", ENDPOINT: "https://YOUR-INFURA-ENDPOINT_KEY", privateKey: "YOUR-PRIVATE-KEY-OF-METAMASK-ACCOUNT-USED-FOR-REGISTRATING-DEFAULT-ORACLES-AND-ALSO-RESPOND-TO-ORACLE-REQUEST" } module.exports = secrets;
-
Edit the config.js file in Blockchain-Capstone/server/ to your needs
Make sure to use the same address as for deploying your smart contract! Make sure to submit always a new solution by open a new terminal and connecting with docker to zokrates in the code folder
$ docker run -v $PWD:/home/zokrates/code -ti zokrates/zokrates /bin/bash $ cd code $ ../zokrates compute-witness -a 2 4 $ ../zokrate generate-proof
Make sure to change the tokenId in the config folder every time before minting a new one!
-
Now launch your contracts to the network by following these commands in the directors eth-contracts:
$ truffle compile $ truffle migrate --reset --network rinkeby
-
Now launch the server by the following command in a new terminal and wait until every token is mint.
$ npm run dev
Now you should be able to interact with your contract at LOCALHOST via METAMASK on the rinkeby test network.
If you encounter some issues let me know!
Enjoy!
-
Install ganache-cli
$ npm install -g ganache-cli
-
Open a seperate terminal window and run ganache-cli:
ganache-cli
-
Run the tests:
truffle test
- Ethereum - Ethereum is a decentralized platform that runs smart contracts
- Truffle Framework - Truffle is the most popular development framework for Ethereum with a mission to make your life a whole lot easier.
- truffle-hdwallet-provider - HD Wallet-enabled Web3 provider. Use it to sign transactions for addresses derived from a 12-word mnemonic.
- NODE + NPM
- Truffle v5.0.22 (core: 5.0.22)
- Solidity v0.5.8 (solc-js)
- Node v12.4.0
- Web3.js v1.0.0-beta.37
Starter code was provided by Udacity