Real Estate Marketplace (ERC-721 based tokens on Ethereum platform)
ERC-721 based property tokens which can be traded on Markeplace.
Tools Used
- Remix - Solidity IDE
- Visual Studio Code
- Truffle Framework
- Ganache - One Click Blockchain
- Open Zeppelin
- Interactive zero knowledge 3-colorability demonstration
- Docker
- ZoKrates
- OpenSea
- MyEtherWallet
- 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:
- Compile Program
- Trusted Setup
- Compute-Witness
- Generate-Proof
- Export-Verifier
docker run -v <path-to-zokrates-code>:/home/zokrates/code -ti zokrates/zokrates:0.3.0 /bin/bash
cd code/square
~/zokrates compile -i square.code
~/zokrates setup [--proving-scheme pghr13]
~/zokrates compute-witness -a 2 4
~/zokrates generate-proof
~/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
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
OpenSea Marketplace
Token is listed on OpenSea market place
https://rinkeby.opensea.io/category/bahriatownpropertiesv2