poh-semaphore-group-contracts v1.0.0
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-contractsOr using yarn
yarn add poh-semaphore-group-contractsThe 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 useNvm installation instructions may be found here;
Dependencies
Install dependencies
npm installCompile the smart contracts
npm run compileTests
Run all the tests
npm run testObtain the test coverage
npm run test:coverDeploy and verify
Deploy on Goerli
npm run deploy:goerliSee deploy/01_deploy_poh-group.ts for additional informations about the deployment script.
Verify on Goerli
npm run verify:goerli3 years ago