Skip to content

Decentralized house listing service - Building ERC-721 Non-Fungible Tokens

Notifications You must be signed in to change notification settings

janvanessen/house-listing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Udacity Blockchain Capstone

Introduction

The capstone will build upon the knowledge you have gained in the course in order to build a decentralized housing product. You will use zk-SNARKs to create a verification system which can prove you have title to the property without revealing that specific information on the property

Versions

  • Truffle v5.1.14-nodeLTS.0 (core: 5.1.13)
  • Solidity - 0.5.7 (solc-js)
  • Node v10.16.0
  • Web3.js v1.2.1

Setup

  • Install node packages: npm install
  • Start Ganache

Tests

  • Go to contracts folder: cd eth-contracts
  • Run tests: truffle test

Contract Addresses on Rinkeby

Contract ABIs

HouseListing Token

OpenSea MarketPlace Storefront

OpenSea MarketPlace - Sold Items

Stack

Zokrates

Setup

  1. Install docker
  2. Run ZoKrates docker container:

docker run -v PATH_TO_PROJECT/zokrates/code:/home/zokrates/code -ti zokrates/zokrates /bin/bash

Implement zkSnarks

  1. Compile Program Compile the program written in ZoKrates DSL
  • cd code/square
  • ~/zokrates compile -i square.cod
  1. Trusted Setup Now take the 'flattened' code, which is a circuit and go through a 'trusted setup' Repeat this process, every-time the program.code changes Two keys are generated - 'proving.key' and 'verification.key

~/zokrates setup

  1. Compute-Witness Having gone through the 'trusted setup' let's compute our 'witness' who knows the answer and it generates a witness file with computation steps

~/zokrates compute-witness -a 3 9

  1. Generate-Proof Next step is to 'generate our proof' based on the above 'witness' A proof.json file is generated in this step

~/zokrates generate-proof

  1. Export-Verifier

Last but never the least, let's generate our 'verifier' smart contract

~/zokrates export-verifier

Project Resources

About

Decentralized house listing service - Building ERC-721 Non-Fungible Tokens

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published