Build your zkp app with typescript, hardhat, circom, and snarkjs!

Overview

Zk app boilerplate

Pre requisites

Getting started

  1. Clone or fork this template repository.
    git clone https://github.com/wanseob/zkp-app-boilerplate
  2. Install packages
    yarn
  3. Build: this compiles the circuits and exports artifacts. Then compiles the contracts and generate typescript clients.
    yarn build
  4. Run a demo app using a localhost private network.
    yarn demo

Run tests

  1. Test contracts

    yarn workspace contracts test
  2. Test your circuits

    yarn workspace circuits test
  3. Test your app

    yarn workspace app test

Example: EdDSA signature rollup

Let's compress EdDSA signatures into one zk proof! Go to tutorial!

To check the complete codes, visit the tutorial branch.

You might also like...

A Bed and Breakfast dApp run on Ethereum. Includes a token + schedule system (Solidity) and full front-end (React + ethers.js) built with Hardhat.

A Bed and Breakfast dApp run on Ethereum. Includes a token + schedule system (Solidity) and full front-end (React + ethers.js) built with Hardhat.

Hotel ETH - Watch Demo Video Hotel ETH A (fictional) Bed-and-Breakfast run on Ethereum Come Book a Room on Kovan or Rinkeby Networks View the Demo ยป C

Aug 20, 2022

Solidity starter combining foundry and hardhat because both are great and I can't live without either...

Combination Pizza Hut & Taco Bell Foundry && HardHat starter template. Motivation I like them both. With this set-up we get: Unit tests written in sol

Aug 23, 2022

An NFT Marketplace built with NextJS, Hardhat and Solidity

An NFT Marketplace built with NextJS, Hardhat and Solidity

๐Ÿ–ผ๏ธ NFT Marketplace This is a fullstack DApp NFT Marketplace built as a study project to learn more about blockchain and smart contract development. M

Dec 31, 2022

In this repository, I try to perform a mainnet fork and then simulate popular smart contract exploits on various DEFI Protocols using Hardhat Framework.

defiHacks_via_Hardhat 1. Alchemix Access Control Bug Any user could have called setWhitelist() to give an attacker the ability to call the harvest fun

Dec 27, 2022

Kittos is NFT Marketplace built with Next Js, Hardhat, Solidity, Arweave + Bundlr Client and All The CSS Magic with TailwindCSS. ๐Ÿ˜บ

Kittos is NFT Marketplace built with Next Js, Hardhat, Solidity, Arweave + Bundlr Client and All The CSS Magic with TailwindCSS. ๐Ÿ˜บ

Kittos NFT Marketplace ๐Ÿ˜บ Built with Next Js, Hardhat, Solidity, Arweave, Bundlr and Tailwind CSS. Functionalities New Listed Assets Mint NFT Buy NFT

Dec 24, 2022

Hardhat plugin to track gas on the transaction level

Hardhat plugin to track gas on the transaction level

hardhat-gas-trackooor Hardhat plugin to track gas on the transaction level. Example report Installation npm install hardhat-gas-trackooor --save-dev A

Jan 3, 2023

Hardhat plugin for integration with hethers.js

hardhat-hethers Hardhat plugin for integration with hethers.js. What This plugin brings to Hardhat the Hedera library hethers.js, which allows you to

Sep 21, 2022

Use Hardhat & Foundry in the same project

Hardhat Foundry Starter This is a solidity starter template which lets you use both, Hardhat and Foundry. Why use both the tools? Foundry has some awe

Aug 23, 2022

Introductory fullstack ethereum dapp using: solidity, hardhat, react.js, ethers.js

Intro to Fullstack Ethereum Development Check out deployed dapp here! (Make sure you're connected to the Rinkeby Testnet) This article will help you e

Dec 21, 2022
Comments
  • chore:fix: restrict node engine versions

    chore:fix: restrict node engine versions

    I ran into the following error when running yarn demo with node versions higher than 17.0.0:

    Error HH604: Error running JSON-RPC server: error:0308010C:digital envelope routines::unsupported
    

    It looks like it is due to Node 17.0.0 starting to use OpenSSL3 https://github.com/webpack/webpack/issues/14532#issuecomment-947807590

    It can be solved for instance by:

    • restricting the node engine versions in top level package.json
    • or using the --openssl-legacy-provider NODE_OPTIONS flag as suggested here

    I suggest the first solution because

    • I think unless one is familiar with the flag --openssl-legacy-provider, it will raise questions when one sees it used in a script
    • we would need to add this flag to all the scripts that need it
    • using engines in package.json is probably a more common way to avoid such compatibility issues.

    Test plan

    • on main branch:
      • yarn demo using NodeJS version >= 17.0.0: you'll see the error message mentioned above
      • yarn demo using NodeJS >= 16.0.0 < 17.0.0: script will execute without issues
    • on this branch: You'll be warned that you must use a node version between 16.0.0 and 17.0.0 to run the script
      The engine "node" is incompatible with this module. Expected version ">=16 <17". Got "18.9.0"
      

    (I didn't test with versions lower than 16.0.0)

    opened by r1oga 0
Owner
Wanseob Lim
Wanseob Lim
Build your zkp app with typescript, hardhat, circom, and snarkjs!

Zk app boilerplate Pre requisites Install rust and circom2 Getting started Clone or fork this template repository. git clone https://github.com/wanseo

Privacy & Scaling Explorations (formerly known as appliedzkp) 35 May 29, 2022
Foundry-Hardhat plugins: Use Foundry for Hardhat projects

This repo contains hardhat plugins to use foundry tools in hardhat environments. Installation See in each plugin anvil forge foundryup Documentation F

Foundry 77 Nov 3, 2022
Been interested, studying, and developing blockchain security with a Zero Knowledge Proof (ZKP) and create a prototype on the current issue with Philippine's upcoming election. ๐Ÿ“ฅ

Implementation of Zero Knowledge Proofs in Cryptographic Voting ?? Reference: Cryptographic Voting โ€“ A Gentle Introduction Overview ????โ€?? The main i

Karl Joseph Saycon 2 Apr 11, 2022
Shield is a development framework for circom developers. The core reason is to provide libraries, plugins, and testing tools to ensure code quality and security.

SHIELD Shield is a development framework for circom developers but we plan it to other languages such as CAIRO, SNARKYJS etc. The core reason is to pr

Xord 41 Dec 22, 2022
Build a Full Stack Marketplace on Ethereum with React, Solidity, Hardhat, and Ethers.js

Building a Digital Marketplace on Ethereum The technologies used in this workshop are React, Next.js, Tailwind CSS, HardHat, Solidity, and Ethers. Get

Nader Dabit 114 Nov 15, 2022
A web3 starter project using Typescript, Hardhat, ethers.js and @web3-react

Starter React Typescript Ethers.js Hardhat Project This repo contains a Hardhat and React Dapp starter project. The React Dapp in the frontend dir of

ChainShot 39 Dec 31, 2022
A fully-fledged Hardhat project template based on TypeScript.

Fully-Fledged Hardhat Project Template Based on TypeScript Installation It is recommended to install Yarn through the npm package manager, which comes

Pascal Marco Caversaccio 75 Dec 21, 2022
Decentralized twitter using Solidity, Ethereum, hardhat, ethers, IPFS, Next.JS, TypeScript, TailwindCSS.

DWITTER: Decentralized Twitter Check out the deployed version of this app at https://dwtr.wajeshubham.in Transactions on Ethereum are slow. Therefore,

Shubham Waje 12 Sep 2, 2022
A Typescript Hardhat-based template to develop evm-based smart contracts with all the tooling you need.

EVM-based Smart Contract Scaffold A Typescript Hardhat-based template to develop evm-based smart contracts with all the tooling you need. Features Use

Flair 8 Oct 24, 2022
In this project I have build a To Do List app that you can list, add, delete and manage your daily tasks better. Build with HTML, CSS, JS, ES6, JSON

ToDo List This project is build by javascript web packages which can add and remove daily tasks. Built With Html Css Javascript Sublime Text Author ??

Sahar Saba Amiri 7 Oct 25, 2022