Skip to content

privacy-scaling-explorations/zk-kit.solidity

Repository files navigation

ZK-Kit logo Solidity

Github license GitHub Main Workflow Coveralls Code style prettier Commitizen friendly

ZK-Kit is a set of libraries (algorithms or utility functions) that can be reused in different projects and zero-knowledge protocols, making it easier for developers to access user-friendly, tested, and documented code for common tasks. ZK-Kit provides different repositories for each language - this one contains Solidity code only.

๐Ÿ—‚๏ธ Repositories

๐Ÿ“ฆ Packages

Package Version Downloads Audited
@zk-kit/imt.sol NPM version Downloads โŒ
@zk-kit/lean-imt.sol NPM version Downloads โœ”๏ธ
@zk-kit/lazy-imt.sol NPM version Downloads โŒ
@zk-kit/excubiae NPM version Downloads โŒ

๐Ÿ‘ฅ Ways to contribute

  • ๐Ÿ”ง Work on open issues
  • ๐Ÿ“ฆ Suggest new packages
  • ๐Ÿš€ Share ideas for new features
  • ๐Ÿ› Create a report if you find any bugs in the code

๐Ÿ›  Install

Clone this repository:

git clone https://github.com/privacy-scaling-explorations/zk-kit.solidity.git

and install the dependencies:

cd zk-kit.solidity && yarn

๐Ÿ“œ Usage

Code formatting

Run Prettier to check formatting rules:

yarn format

or to automatically format the code:

yarn format:write

Linting

yarn lint

Will lint all the packages with solhint

Static Analysis

yarn slither

Will perform a static analysis of all the contracts with slither to identify potential vulnerabilities.
You'll need to install slither beforehand.

Conventional commits

ZK-Kit uses conventional commits. A command line utility to commit using the correct syntax can be used by running:

yarn commit

It will also automatically check that the modified files comply with ESLint and Prettier rules.

Testing

Test the code:

yarn test

Build

Compile all contracts:

yarn compile

Releases

  1. Bump a new version of the package with:
yarn version:bump <package-name> <version>
# e.g. yarn version:bump imt.sol 2.0.0

This step creates a commit and a git tag.

  1. Push the changes to main:
git push origin main
  1. Push the new git tag:
git push origin <package-name>-<version>
# e.g. git push origin imt.sol-v2.0.0

After pushing the new git tag, a workflow will be triggered and will publish the package on npm and release a new version on Github with its changelogs automatically.

About

A monorepo of reusable contracts for zero-knowledge technologies.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published