项目作者: faisal-hameed

项目描述 :
Blockchain based smart property marketplace
高级语言: JavaScript
项目地址: git://github.com/faisal-hameed/SmartPropertyDApp.git
创建时间: 2019-04-26T19:47:10Z
项目社区:https://github.com/faisal-hameed/SmartPropertyDApp

开源协议:

下载


Real Estate Marketplace (ERC-721 based tokens on Ethereum platform)

ERC-721 based property tokens which can be traded on Markeplace.

Tools Used

  1. Remix - Solidity IDE
  2. Visual Studio Code
  3. Truffle Framework
  4. Ganache - One Click Blockchain
  5. Open Zeppelin
  6. Interactive zero knowledge 3-colorability demonstration
  7. Docker
  8. ZoKrates
  9. OpenSea
  10. MyEtherWallet
  11. Zero Knowledge Proof (Zokrates)

Getting started with project

In order to start develpment of SmartProperty token, you need to run npm install in project folder after cloning the repo.

ZoKrates Process (zkSNARKs)

This is a 5 step process:

  1. Compile Program
  2. Trusted Setup
  3. Compute-Witness
  4. Generate-Proof
  5. Export-Verifier
  1. docker run -v <path-to-zokrates-code>:/home/zokrates/code -ti zokrates/zokrates:0.3.0 /bin/bash
  2. cd code/square
  3. ~/zokrates compile -i square.code
  4. ~/zokrates setup [--proving-scheme pghr13]
  5. ~/zokrates compute-witness -a 2 4
  6. ~/zokrates generate-proof
  7. ~/zokrates export-verifier

Now copy verifier.sol in contracts folder and update solidity version

Testing Contracts

Run below command to test your contracts
truffle test
Tests

Migrating on Ethereum network

Configuration for deployment on rinkeby network is added in truffle-config.js file.
Run below command for deployment.
truffle migrate --network rinkeby

Contract Addresses

ERC-721 Token
https://rinkeby.etherscan.io/address/0x5b257bf2f057a5c20bbcb51e082ce21b05379170
SolnSquare Verifier
https://rinkeby.etherscan.io/address/0x9771b281eAbe2D9688F9bE6E9Df6d88887fd7C39
Square Verifier
https://rinkeby.etherscan.io/address/0x4f5985b25058816FE66778eb8603BA0e3aB2B0ea

Contracts ABI

Run truffle compile to compile contracts, it will generate contracts ABI.
Contracts ABI can be found in build folder.

ERC-721 Token
eth-contracts\build\contracts\CustomERC721Token.json
SolnSquare Verifier
eth-contracts\build\contracts\SolnSquareVerifier.json
Square Verifier
eth-contracts\build\contracts\SquareVerifier.json

Deployment

OpenSea Marketplace

Token is listed on OpenSea market place
https://rinkeby.opensea.io/category/bahriatownpropertiesv2

OpenSea-1
OpenSea-2