Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/v4 contracts #14

Conversation

Dozie2001
Copy link
Contributor

@Dozie2001 Dozie2001 commented Jul 17, 2024

Description

This PR refactors the semaphore extension contracts to use the v4 @semaphore-protocol/contracts and moves them to the extensions repo

It removes the need for tree depth in Groups

Related Issue(s)

Closes #353

Other information

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have run yarn style without getting any errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@Dozie2001 Dozie2001 requested a review from a team as a code owner July 17, 2024 10:37
Copy link

vercel bot commented Jul 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
semaphore-benchmarks ❌ Failed (Inspect) Aug 7, 2024 8:09pm

@Dozie2001 Dozie2001 marked this pull request as draft July 17, 2024 10:38
@Dozie2001 Dozie2001 marked this pull request as ready for review July 17, 2024 10:44
Copy link
Member

@cedoor cedoor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @Dozie2001, thanks for this PR!

First round of review. I haven't seen the code yet but let's start with this config stuff and documentation.

packages/contracts/.yarn/releases/yarn-4.1.0.cjs Outdated Show resolved Hide resolved
packages/contracts/.gitignore Outdated Show resolved Hide resolved
packages/contracts/README.md Outdated Show resolved Hide resolved
packages/contracts/README.md Outdated Show resolved Hide resolved
packages/contracts/README.md Outdated Show resolved Hide resolved
packages/contracts/contracts/package.json Outdated Show resolved Hide resolved
packages/contracts/contracts/package.json Outdated Show resolved Hide resolved
packages/contracts/package.json Outdated Show resolved Hide resolved
packages/contracts/package.json Outdated Show resolved Hide resolved
packages/contracts/package.json Outdated Show resolved Hide resolved
A sym link of contracts/contracts/README.md to contracts/README.md
Copy link
Member

@cedoor cedoor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments on config stuff and review on Voting contract.

packages/contracts/contracts/README.md Outdated Show resolved Hide resolved
packages/contracts/contracts/README.md Outdated Show resolved Hide resolved
packages/contracts/contracts/package.json Outdated Show resolved Hide resolved
packages/contracts/package.json Outdated Show resolved Hide resolved
packages/contracts/package.json Outdated Show resolved Hide resolved
packages/contracts/contracts/SemaphoreVoting.sol Outdated Show resolved Hide resolved
packages/contracts/contracts/SemaphoreVoting.sol Outdated Show resolved Hide resolved
packages/contracts/contracts/SemaphoreVoting.sol Outdated Show resolved Hide resolved
packages/contracts/contracts/SemaphoreVoting.sol Outdated Show resolved Hide resolved
packages/contracts/contracts/SemaphoreVoting.sol Outdated Show resolved Hide resolved
packages/contracts/.eslintrc.json Outdated Show resolved Hide resolved
packages/contracts/contracts/README.md Outdated Show resolved Hide resolved
packages/contracts/contracts/SemaphoreVoting.sol Outdated Show resolved Hide resolved
packages/contracts/contracts/SemaphoreVoting.sol Outdated Show resolved Hide resolved
packages/contracts/contracts/SemaphoreWhistleblowing.sol Outdated Show resolved Hide resolved
packages/contracts/contracts/SemaphoreWhistleblowing.sol Outdated Show resolved Hide resolved
packages/contracts/contracts/README.md Outdated Show resolved Hide resolved
packages/contracts/contracts/SemaphoreWhistleblowing.sol Outdated Show resolved Hide resolved
packages/contracts/package.json Outdated Show resolved Hide resolved
packages/contracts/contracts/package.json Outdated Show resolved Hide resolved
packages/contracts/contracts/SemaphoreWhistleblowing.sol Outdated Show resolved Hide resolved
packages/contracts/contracts/SemaphoreWhistleblowing.sol Outdated Show resolved Hide resolved
packages/contracts/contracts/SemaphoreWhistleblowing.sol Outdated Show resolved Hide resolved
packages/contracts/contracts/SemaphoreVoting.sol Outdated Show resolved Hide resolved
packages/contracts/contracts/README.md Outdated Show resolved Hide resolved
packages/contracts/contracts/SemaphoreVoting.sol Outdated Show resolved Hide resolved
packages/contracts/contracts/SemaphoreWhistleblowing.sol Outdated Show resolved Hide resolved
packages/contracts/contracts/package.json Outdated Show resolved Hide resolved
Copy link
Member

@cedoor cedoor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are still some issues with config files but we'll fix them after merging. I think the PR is ready.

Thanks a lot @Dozie2001 🙏🏽

@cedoor cedoor changed the base branch from main to chore/contract-extensions August 8, 2024 10:02
@cedoor cedoor merged commit fa9a0da into semaphore-protocol:chore/contract-extensions Aug 8, 2024
1 of 4 checks passed
cedoor added a commit that referenced this pull request Aug 29, 2024
* Feat/v4 contracts (#14)

* feat(contracts)!: introduces Semaphore extension contracts with v4

This PR implements extension contracts using version 4

re semaphore-protocol/semaphore#353

* refactor(contracts): fixing the voters contracts

* docs(contracts): updated instructions on setting up contracts

* ci(contracts): scripts that deploy contracts and gets addresses

* test(contracts): added test for both whistleblowing and voting

* refactor(contracts): refactored contracts to use v4 and added license and README

Removed the need of merkletreesize whcih came with v3

* build(contracts): added dependencies and deploye contracts

N

* chore(contracts): corrected dependency

switch @semaphore-protocol/contracts from a dev dependecy to a dependency

* docs(contracts): refactored the docs

* chore(contracts): fixed documentation and configuration files

* docs(contracts): created a sym link to README

A sym link of contracts/contracts/README.md to contracts/README.md

* ci(contracts): added scripts to test and compile

* ci(contracts): fixed config files and solhint script

* docs(contracts): made README docs more general

* fix(contracts): fixed event errors

* refactor(contracts): changed the groups variable to semaphore since I am using the interface

re n

* refactor(contracts): removed unsused argument

* fix(contracts): refactored the contracts and removed unuses parameters

* docs(contracts): updated Documentation by removing groupId

re N

* refactor(contracts): removed inheritance from SemaphoreGroups

* refactor(contracts): removed SemaphoreGroups import

* fix(contracts): added proof Validation and fixed contracts deploy

* refactor(contracts): refactored code and removed bool value in saved nullifier

* refactor(contracts): removed nullifiers redudant mapping

* chore: include contracts in scripts

* fix(contracts): fix contract extensions (#16)

* chore: update dependencies

* docs: add contracts package to readme

* refactor(contracts): update visibility of some functions (#17)

---------

Co-authored-by: Chidozie DAVID <[email protected]>
Co-authored-by: Vivian Plasencia <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move the contracts extensions to an external repository
2 participants