BohemAuth enables brands and manufacturers to create tamper-proof, verified product listings using Flare's Data Connector (FDC) and zero-knowledge proofs while connecting to external verification databases.
This is the BohemAuth main repository which is built during Encode X Flare Hackathon, consisting of the following components:
server: The main server applicationapp: The client applicationcontracts: The smart contracts powered by Flarecircuits: The zero-knowledge proof circuits written using Noir
- Flare's Data Connector Implementation in accordance with Prisma Schema - server/utils/fdc.js
- Using FDC Proof to register products on BohemAuth Contract - server/utils/Queue.js
- Using FDC Proof to redeem a listing - server/controllers/listingController.js
- Verification of Web2 Data through FDC (AddProduct) - contracts/contracts/BohemAuth.sol
- NFT Minting through FDC Proof and ZK-Proof (RedeemProduct) - contracts/contracts/BohemAuthNFT.sol
- BohemAuth Contract - 0xa4E6692C0AA19Fc75265267a771188eCA57C3C49
- BohemAuth NFT Contract - 0x95F1Adb21c4eF3E9a81FEEE6188A6afA727389f7
- Noir Zk-proof Verifier - 0xBf2D2E15d7C73e67126328eAA7D3a95e414442aB
Pre-requisites:
# Install dependencies
cd app
npm install
# fill environments
cp .env.local.example .env.local# Start development server
npm run dev
# Build production frontend & start server
npm run build
npm run startPre-requisites:
# Install dependencies
cd server
npm install
# fill environments
cp .env.example .env# Start the server
npm run startPre-requisites:
# Install dependencies
cd contracts
npm install
# fill environments
cp .env.example .env# Compile all the contracts
npx hardhat compile
# Deploy on Flare Testnet, Check hardhat.config.js to check or add supported chains
npx hardhat run --network flareTestnet scripts/deploy.jsPre-requisites:
# Executing deploy_prove circuit
cd circuits/shamir_prove
nargo execute
# Checking constraints
nargo info
# Testing circuits
nargo check
# Generate zk-proof
nargo prove
# generate Solidity Verifier
nargo codegen-verifier- Fork the repository
- Create your feature branch (git checkout -b feature/AmazingFeature)
- Commit your changes (git commit -m 'Add some AmazingFeature')
- Push to the branch (git push origin feature/AmazingFeature)
- Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.