Skip to content

MohammedAlSafwan/008-real-estate-marketplace

Repository files navigation

Udacity Blockchain Capstone

The capstone will build upon the knowledge you have gained in the course in order to build a decentralized housing product.

Version

"openzeppelin-solidity": "2.2.0",
"@truffle/hdwallet-provider": "^2.0.10",
"buffer": "^6.0.3",
"ipfs": "^0.63.5",
"solc": "0.5.2",
"truffle": "^5.5.21",
"web3": "^1.7.4"

Contract Addresses, Contract Abi's, OpenSea MarketPlace Storefront link's.

Contract Addresses

  1. CustomERC721Token
  2. SquareVerifier
  3. SolnSquareVerifier

Tests

TestERC721Mintable.js

Inside eth-contracts

Test minting functionality of tokens and transfer of tokens.

truffle test ./test/TestERC721Mintable.js

TestSquareVerifier.js

Verifies zkSnarks is successfully implemented.

truffle test ./test/TestSquareVerifier.js

TestSolnSquareVerifier.js

Test minting with zkSnarks.

truffle test ./test/TestSolnSquareVerifier.js
All 11 tests should pass

Contract ABI's

  1. CustomERC721Token: eth-contracts/build/contracts/CustomERC721Token.json
  2. SquareVerifier: eth-contracts/build/contracts/SquareVerifier.json
  3. SolnSquareVerifier: eth-contracts/build/contracts/SolnSquareVerifier.json

Zokrates

  • Completes the Zokrates proof in square.code by adding the variable names in square.code
    zokrates compile -i square.code \ 
    && zokrates setup \
    && zokrates compute-witness -a 2 4 \
    && zokrates generate-proof \
    && zokrates export-verifier
  • Completes test contract in SolnSquareVerifier.sol
  • Writes and passes the test cases in 'TestSolnSquareVerifier.js'

10 Tokens Minted


OpenSea Marketplace

How to tutiorial

How to deploy to Rinkeby network

truffle migrate --network rinkeby

How to create a new Zokrates solution

~/zokrates compute-witness -a {num_1} {num_1 * num_1}
~/zokrates generate-proof
  • get proof.json and witness file

Deployment Log


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published