Skip to content

beauwilliams/Solidity-Hardhat-Circom-SnarkJs-Example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solidity-Hardhat-Circom-SnarkJs-Example

TODO: Document

TODO: Add basic circuit to do a proof of something interesting

OVERVIEW

Includes deployment configurations, testing framework, contract upgrades pattern, gas usage report, security analysys audit, test coverage report.. did I also mention it's blazingly fast 😏

GET STARTED

This project uses a task runner called just, for convenience

Available recipes:
    default
    install *PACKAGES
    update
    compile
    deploy-localhost
    deploy-testnet
    verify-testnet
    test
    lint
    start
    format
    audit
    print-audit
    print-gas-usage
    print-deployments
    clean

Running tests and audits

  • Run the unit tests with just test
  • Statically analyse code for vulnerabilities with just audit

Starting a new project from this template

  • Clean the workspace (to start a new project, removing example code and scripts) using just clean
  • Create your solidity code in /contracts, tests in /test and deploy/verify scripts in /scripts

FAQ

Error compiling contracts on freshly cloned repo

Error HH12: Trying to use a non-local installation of Hardhat, which is not supported. Please install Hardhat locally using npm or Yarn, and try again.

Run npm i to fix this error which will install hardhat

Performance optimizations

For faster runs of your tests and scripts, consider skipping ts-node's type checking by setting the environment variable TS_NODE_TRANSPILE_ONLY to 1 in hardhat's environment. For more details see the documentation.

Husky

ERROR ON COMMIT -> husky > pre-commit hook failed (add --no-verify to bypass) RESOLUTION -> Remove errors from your smart contracts, found running npm run lint, or commit using --no-amend flag to temporarily bypass.

Error running audit task

Ensure Slither is installed and in your $PATH

DEMO

demo

TODO

  • Fix prettier plugin sol hint not working nvim (Remove prettier plugin from sol hint.son to fix)

About

Solidity-Hardhat-Circom-SnarkJs-Example

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published