poh-semaphore-group-contracts
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Proof of Humanity Semaphore group - Contracts

This repository contains the smart contract of the Proof of Humanity Semaphore group.

The contract only store the root hash of the Semaphore group managed off chain.

The management is operated by an EOA contained in a dedicated server. See the backend repository for more informations.

At every update of the root hash, the group informations are published on IPFS.

Disclaimer: this project is a personal initiative and is not official in whatsoever way.

Necessary related informations

There is a need to understand the Proof of Humanity and Semaphore projects in order to make sense of this repository.

Usage

The smart contracts and the deployment results are available as an NPM package

Using npm

npm install poh-semaphore-group-contracts

Or using yarn

yarn add poh-semaphore-group-contracts

The deployed contracts can be used in any JavaScript codebase

import { contractStore } from 'poh-semaphore-group-contracts';

const networks = <const>{ goerli: 5 };

const { abi, address } = contractStore.getContract(networks.goerli, "POH_GROUP");

For now, only Goerli is available.

The smarts contracts can be used in Solidity by direct import

...
import 'poh-semaphore-group-contracts/contracts/PoHGroup.sol';
...

Development

Setup

Nvm

Use configured node and npm versions

nvm use

Nvm installation instructions may be found here;

Dependencies

Install dependencies

npm install

Compile the smart contracts

npm run compile

Tests

Run all the tests

npm run test

Obtain the test coverage

npm run test:cover

Deploy and verify

Deploy on Goerli

npm run deploy:goerli

See deploy/01_deploy_poh-group.ts for additional informations about the deployment script.

Verify on Goerli

npm run verify:goerli

Package Sidebar

Install

npm i poh-semaphore-group-contracts

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

9.81 MB

Total Files

113

Last publish

Collaborators

  • vincentgenod