diff --git a/packages/contracts/contracts/SemaphoreVoting.sol b/packages/contracts/contracts/SemaphoreVoting.sol index 996bafb..9da7163 100644 --- a/packages/contracts/contracts/SemaphoreVoting.sol +++ b/packages/contracts/contracts/SemaphoreVoting.sol @@ -87,6 +87,10 @@ contract SemaphoreVoting is ISemaphoreVoting { /// @dev See {ISemaphoreVoting-endPoll}. function endPoll(uint256 pollId, uint256 decryptionKey) public override onlyCoordinator(pollId) { + if (polls[pollId].state != PollState.Ongoing) { + revert SemaphoreVoting__PollIsNotOngoing(); + } + polls[pollId].state = PollState.Ended; emit PollEnded(pollId, msg.sender, decryptionKey); diff --git a/packages/contracts/contracts/SemaphoreWhistleblowing.sol b/packages/contracts/contracts/SemaphoreWhistleblowing.sol index 00fe578..dd7a5ca 100644 --- a/packages/contracts/contracts/SemaphoreWhistleblowing.sol +++ b/packages/contracts/contracts/SemaphoreWhistleblowing.sol @@ -30,8 +30,8 @@ contract SemaphoreWhistleblowing is ISemaphoreWhistleblowing { } /// @dev See {ISemaphoreWhistleblowing-createEntity}. - function createEntity(address editor) external { - uint256 groupId = semaphore.createGroup(editor); + function createEntity(address editor) external override { + uint256 groupId = semaphore.createGroup(); entities[groupId] = editor; emit EntityCreated(groupId, editor); } @@ -46,7 +46,7 @@ contract SemaphoreWhistleblowing is ISemaphoreWhistleblowing { uint256 entityId, uint256 identityCommitment, uint256[] calldata proofSiblings - ) external onlyEditor(entityId) { + ) external override onlyEditor(entityId) { semaphore.removeMember(entityId, identityCommitment, proofSiblings); } @@ -58,7 +58,7 @@ contract SemaphoreWhistleblowing is ISemaphoreWhistleblowing { uint256 merkleTreeDepth, uint256 merkleTreeRoot, uint256[8] calldata proof - ) external { + ) external override { ISemaphore.SemaphoreProof memory semaphoreProof = ISemaphore.SemaphoreProof({ merkleTreeDepth: merkleTreeDepth, merkleTreeRoot: merkleTreeRoot, diff --git a/packages/contracts/contracts/interfaces/ISemaphoreWhistleblowing.sol b/packages/contracts/contracts/interfaces/ISemaphoreWhistleblowing.sol index 9f2cc88..0f7fd67 100644 --- a/packages/contracts/contracts/interfaces/ISemaphoreWhistleblowing.sol +++ b/packages/contracts/contracts/interfaces/ISemaphoreWhistleblowing.sol @@ -28,12 +28,10 @@ interface ISemaphoreWhistleblowing { /// @param entityId: Id of the entity. /// @param identityCommitment: Identity commitment of the group member. /// @param proofSiblings: Array of the sibling nodes of the proof of membership. - /// @param proofPathIndices: Path of the proof of membership. function removeWhistleblower( uint256 entityId, uint256 identityCommitment, - uint256[] calldata proofSiblings, - uint8[] calldata proofPathIndices + uint256[] calldata proofSiblings ) external; /// @dev Allows whistleblowers to publish leaks anonymously. diff --git a/packages/contracts/hardhat.config.ts b/packages/contracts/hardhat.config.ts index 43b8089..2106aac 100644 --- a/packages/contracts/hardhat.config.ts +++ b/packages/contracts/hardhat.config.ts @@ -5,6 +5,7 @@ import "dotenv/config" import { HardhatUserConfig } from "hardhat/config" import "./tasks/deploy-semaphore-voting" import "./tasks/deploy-semaphore-whistle-blowing" +import "./tasks/accounts" const config: HardhatUserConfig = { solidity: "0.8.23", diff --git a/packages/contracts/package.json b/packages/contracts/package.json index e8df6e6..f5adf55 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -11,6 +11,8 @@ "deploy:semaphore-whistleblowing": "hardhat deploy:semaphore-whistleblowing", "verify": "hardhat verify", "test": "hardhat test", + "test:report-gas": "REPORT_GAS=true hardhat test", + "test:coverage": "hardhat coverage", "lint": "solhint 'contracts/**/*.sol'" }, "devDependencies": { @@ -19,9 +21,9 @@ "@nomicfoundation/hardhat-network-helpers": "^1.0.0", "@nomicfoundation/hardhat-toolbox": "^4.0.0", "@nomicfoundation/hardhat-verify": "^2.0.0", - "@semaphore-protocol/core": "4.0.0-beta.16", - "@semaphore-protocol/hardhat": "4.0.0-beta.16", - "@semaphore-protocol/utils": "4.0.0-beta.16", + "@semaphore-protocol/core": "4.0.1", + "@semaphore-protocol/hardhat": "4.0.1", + "@semaphore-protocol/utils": "4.0.1", "@typechain/ethers-v6": "^0.5.0", "@typechain/hardhat": "^9.0.0", "@types/chai": "^4.2.0", @@ -43,7 +45,7 @@ "hardhat-gas-reporter": "^1.0.8", "prettier": "^3.2.5", "prettier-plugin-solidity": "^1.3.1", - "solhint": "^4.1.1", + "solhint": "^5.0.3", "solidity-coverage": "^0.8.1", "ts-node": "^10.9.2", "typechain": "^8.3.0", diff --git a/packages/contracts/test/SemaphoreVoting.ts b/packages/contracts/test/SemaphoreVoting.ts index 2b517af..883581c 100644 --- a/packages/contracts/test/SemaphoreVoting.ts +++ b/packages/contracts/test/SemaphoreVoting.ts @@ -3,16 +3,22 @@ import { ethers, run } from "hardhat" import { Signer } from "ethers" import { loadFixture } from "@nomicfoundation/hardhat-toolbox/network-helpers" import { Group, Identity, generateProof } from "@semaphore-protocol/core" -import { BigNumber } from "@ethersproject/bignumber" // @ts-ignore import { SemaphoreVoting } from "../typechain-types" describe("SemaphoreVoting", () => { async function deploySemaphoreVotingFixture() { - const semaphoreVoting = await run("deploy:semaphore-voting", { + const { semaphore } = await run("deploy:semaphore", { logs: false }) + const semaphoreVoting = await run("deploy:semaphore-voting", { + logs: false, + semaphore: await semaphore.getAddress() + }) + + const semaphoreContract = semaphore + const SemaphoreVotingContract: SemaphoreVoting = semaphoreVoting const accounts = await run("accounts", { logs: false }) @@ -21,13 +27,22 @@ describe("SemaphoreVoting", () => { const coordinator = accounts[0] const voter = accounts[1] const identity = new Identity() - const groupId = BigNumber.from(0) - const group = new Group(groupId) + const group = new Group() group.addMember(identity.commitment) const vote = ethers.keccak256(ethers.toUtf8Bytes("vote")) - const proof = await generateProof(identity, group, 0, vote) - - return { SemaphoreVotingContract, coordinator, voter, identity, group, vote, proof, accountAddresses } + const proof = await generateProof(identity, group, vote, 0) + + return { + SemaphoreVotingContract, + coordinator, + voter, + identity, + group, + vote, + proof, + accountAddresses, + semaphoreContract + } } describe("# createPoll", () => { @@ -35,7 +50,7 @@ describe("SemaphoreVoting", () => { const { SemaphoreVotingContract, coordinator } = await loadFixture(deploySemaphoreVotingFixture) const pollId = 0 - const transaction = await SemaphoreVotingContract.createPoll(pollId, coordinator.address) + const transaction = await SemaphoreVotingContract.createPoll(coordinator.address) await expect(transaction) .to.emit(SemaphoreVotingContract, "PollCreated") @@ -45,28 +60,46 @@ describe("SemaphoreVoting", () => { describe("# addVoter", () => { it("Should add a voter to a poll", async () => { - const { SemaphoreVotingContract, coordinator, identity } = await loadFixture(deploySemaphoreVotingFixture) + const { SemaphoreVotingContract, coordinator, identity, group, semaphoreContract } = + await loadFixture(deploySemaphoreVotingFixture) const pollId = 0 - await SemaphoreVotingContract.createPoll(pollId, coordinator.address) + await SemaphoreVotingContract.createPoll(coordinator.address) const transaction = await SemaphoreVotingContract.addVoter(pollId, identity.commitment) - await expect(transaction).to.emit(SemaphoreVotingContract, "MemberAdded") + await expect(transaction) + .to.emit(semaphoreContract, "MemberAdded") + .withArgs(pollId, 0, identity.commitment, group.root) }) it("Should not add a voter to a poll that has already been started", async () => { const { SemaphoreVotingContract, coordinator, identity } = await loadFixture(deploySemaphoreVotingFixture) const pollId = 0 - await SemaphoreVotingContract.createPoll(pollId, coordinator.address) + await SemaphoreVotingContract.createPoll(coordinator.address) await SemaphoreVotingContract.startPoll(pollId, 0) const transaction = SemaphoreVotingContract.addVoter(pollId, identity.commitment) await expect(transaction).to.be.revertedWithCustomError( SemaphoreVotingContract, - "Semaphore__PollHasAlreadyBeenStarted" + "SemaphoreVoting__PollHasAlreadyBeenStarted" + ) + }) + + it("Should not add a voter to a poll if the coordinator is not correct", async () => { + const { SemaphoreVotingContract, coordinator, identity, voter } = + await loadFixture(deploySemaphoreVotingFixture) + + const pollId = 0 + await SemaphoreVotingContract.createPoll(coordinator.address) + + const transaction = SemaphoreVotingContract.connect(voter).addVoter(pollId, identity.commitment) + + await expect(transaction).to.be.revertedWithCustomError( + SemaphoreVotingContract, + "SemaphoreVoting__CallerIsNotThePollCoordinator" ) }) }) @@ -76,7 +109,7 @@ describe("SemaphoreVoting", () => { const { SemaphoreVotingContract, coordinator } = await loadFixture(deploySemaphoreVotingFixture) const pollId = 0 - await SemaphoreVotingContract.createPoll(pollId, coordinator.address) + await SemaphoreVotingContract.createPoll(coordinator.address) const transaction = await SemaphoreVotingContract.startPoll(pollId, 0) @@ -87,62 +120,106 @@ describe("SemaphoreVoting", () => { const { SemaphoreVotingContract, coordinator } = await loadFixture(deploySemaphoreVotingFixture) const pollId = 0 - await SemaphoreVotingContract.createPoll(pollId, coordinator.address) + await SemaphoreVotingContract.createPoll(coordinator.address) await SemaphoreVotingContract.startPoll(pollId, 0) const transaction = SemaphoreVotingContract.startPoll(pollId, 0) await expect(transaction).to.be.revertedWithCustomError( SemaphoreVotingContract, - "Semaphore__PollHasAlreadyBeenStarted" + "SemaphoreVoting__PollHasAlreadyBeenStarted" + ) + }) + + it("Should not start a poll if the caller is not poll coordinator", async () => { + const { SemaphoreVotingContract, voter } = await loadFixture(deploySemaphoreVotingFixture) + + const pollId = 0 + await SemaphoreVotingContract.createPoll(voter.address) + const transaction = SemaphoreVotingContract.startPoll(pollId, 0) + + await expect(transaction).to.be.revertedWithCustomError( + SemaphoreVotingContract, + "SemaphoreVoting__CallerIsNotThePollCoordinator" ) }) }) describe("# castVote", () => { it("Should allow a voter to cast a vote", async () => { - const { SemaphoreVotingContract, coordinator, identity, vote, proof } = + const { SemaphoreVotingContract, coordinator, identity, vote, proof, group } = await loadFixture(deploySemaphoreVotingFixture) const pollId = 0 - await SemaphoreVotingContract.createPoll(pollId, coordinator.address) + await SemaphoreVotingContract.createPoll(coordinator.address) await SemaphoreVotingContract.addVoter(pollId, identity.commitment) await SemaphoreVotingContract.startPoll(pollId, 0) - const transaction = await SemaphoreVotingContract.castVote(vote, proof.nullifier, pollId, proof.proof) + const transaction = await SemaphoreVotingContract.castVote( + vote, + pollId, + proof.merkleTreeDepth, + proof.nullifier, + group.root, + proof.points + ) await expect(transaction).to.emit(SemaphoreVotingContract, "VoteAdded") }) it("Should not allow a voter to cast a vote twice", async () => { - const { SemaphoreVotingContract, coordinator, identity, vote, proof } = + const { SemaphoreVotingContract, coordinator, identity, vote, proof, group, semaphoreContract } = await loadFixture(deploySemaphoreVotingFixture) const pollId = 0 - await SemaphoreVotingContract.createPoll(pollId, coordinator.address) + await SemaphoreVotingContract.createPoll(coordinator.address) await SemaphoreVotingContract.addVoter(pollId, identity.commitment) await SemaphoreVotingContract.startPoll(pollId, 0) - await SemaphoreVotingContract.castVote(vote, proof.nullifier, pollId, proof.proof) + await SemaphoreVotingContract.castVote( + vote, + pollId, + proof.merkleTreeDepth, + proof.nullifier, + group.root, + proof.points + ) - const transaction = SemaphoreVotingContract.castVote(vote, proof.nullifier, pollId, proof.proof) + const transaction = SemaphoreVotingContract.castVote( + vote, + pollId, + group.depth, + proof.nullifier, + group.root, + proof.points + ) await expect(transaction).to.be.revertedWithCustomError( - SemaphoreVotingContract, + semaphoreContract, "Semaphore__YouAreUsingTheSameNullifierTwice" ) }) it("Should not allow a voter to cast a vote in a poll that is not ongoing", async () => { - const { SemaphoreVotingContract, coordinator, identity, vote, proof } = + const { SemaphoreVotingContract, coordinator, identity, vote, proof, group } = await loadFixture(deploySemaphoreVotingFixture) const pollId = 0 - await SemaphoreVotingContract.createPoll(pollId, coordinator.address) + await SemaphoreVotingContract.createPoll(coordinator.address) await SemaphoreVotingContract.addVoter(pollId, identity.commitment) - const transaction = SemaphoreVotingContract.castVote(vote, proof.nullifier, pollId, proof.proof) + const transaction = SemaphoreVotingContract.castVote( + vote, + pollId, + group.depth, + proof.nullifier, + group.root, + proof.points + ) - await expect(transaction).to.be.revertedWithCustomError(SemaphoreVoting, "Semaphore__PollIsNotOngoing") + await expect(transaction).to.be.revertedWithCustomError( + SemaphoreVotingContract, + "SemaphoreVoting__PollIsNotOngoing" + ) }) }) @@ -151,7 +228,7 @@ describe("SemaphoreVoting", () => { const { SemaphoreVotingContract, coordinator } = await loadFixture(deploySemaphoreVotingFixture) const pollId = 0 - await SemaphoreVotingContract.createPoll(pollId, coordinator.address) + await SemaphoreVotingContract.createPoll(coordinator.address) await SemaphoreVotingContract.startPoll(pollId, 0) const transaction = await SemaphoreVotingContract.endPoll(pollId, 0) @@ -163,13 +240,28 @@ describe("SemaphoreVoting", () => { const { SemaphoreVotingContract, coordinator } = await loadFixture(deploySemaphoreVotingFixture) const pollId = 0 - await SemaphoreVotingContract.createPoll(pollId, coordinator.address) + await SemaphoreVotingContract.createPoll(coordinator.address) const transaction = SemaphoreVotingContract.endPoll(pollId, 0) await expect(transaction).to.be.revertedWithCustomError( SemaphoreVotingContract, - "Semaphore__PollIsNotOngoing" + "SemaphoreVoting__PollIsNotOngoing" + ) + }) + + it("Should not end a poll if the coordinator is not correct", async () => { + const { SemaphoreVotingContract, coordinator, voter } = await loadFixture(deploySemaphoreVotingFixture) + + const pollId = 0 + await SemaphoreVotingContract.createPoll(coordinator.address) + await SemaphoreVotingContract.startPoll(pollId, 0) + + const transaction = SemaphoreVotingContract.connect(voter).endPoll(pollId, 0) + + await expect(transaction).to.be.revertedWithCustomError( + SemaphoreVotingContract, + "SemaphoreVoting__CallerIsNotThePollCoordinator" ) }) }) diff --git a/packages/contracts/test/SemaphoreWhistleblowing.ts b/packages/contracts/test/SemaphoreWhistleblowing.ts index eefbae2..afb20e6 100644 --- a/packages/contracts/test/SemaphoreWhistleblowing.ts +++ b/packages/contracts/test/SemaphoreWhistleblowing.ts @@ -3,16 +3,22 @@ import { ethers, run } from "hardhat" import { loadFixture } from "@nomicfoundation/hardhat-toolbox/network-helpers" import { Group, Identity, generateProof } from "@semaphore-protocol/core" import { Signer } from "ethers" -import { BigNumber } from "@ethersproject/bignumber" // @ts-ignore import { SemaphoreWhistleblowing } from "../typechain-types" describe("SemaphoreWhistleblowing", () => { async function deploySemaphoreWhistleblowingFixture() { - const semaphoreWhistleblowing = await run("deploy:semaphore-whistleblowing", { + const { semaphore } = await run("deploy:semaphore", { logs: false }) + const semaphoreWhistleblowing = await run("deploy:semaphore-whistleblowing", { + logs: false, + semaphore: await semaphore.getAddress() + }) + + const semaphoreContract = semaphore + const semaphoreWhistleblowingContract: SemaphoreWhistleblowing = semaphoreWhistleblowing const accounts = await run("accounts", { logs: false }) @@ -21,11 +27,10 @@ describe("SemaphoreWhistleblowing", () => { const coordinator = accounts[0] const whistleblower = accounts[1] const identity = new Identity() - const groupId = BigNumber.from(0) - const group = new Group(groupId) + const group = new Group() group.addMember(identity.commitment) const leak = ethers.keccak256(ethers.toUtf8Bytes("leak")) - const proof = await generateProof(identity, group, 0, leak) + const proof = await generateProof(identity, group, leak, 0) return { semaphoreWhistleblowingContract, @@ -35,7 +40,8 @@ describe("SemaphoreWhistleblowing", () => { group, leak, proof, - accountAddresses + accountAddresses, + semaphoreContract } } @@ -46,7 +52,7 @@ describe("SemaphoreWhistleblowing", () => { ) const entityId = 0 - const transaction = await semaphoreWhistleblowingContract.createEntity(entityId, coordinator.address) + const transaction = await semaphoreWhistleblowingContract.createEntity(coordinator.address) await expect(transaction) .to.emit(semaphoreWhistleblowingContract, "EntityCreated") @@ -56,16 +62,16 @@ describe("SemaphoreWhistleblowing", () => { describe("# addWhistleblower", () => { it("Should add a whistleblower to an entity", async () => { - const { semaphoreWhistleblowingContract, coordinator, identity } = await loadFixture( + const { semaphoreWhistleblowingContract, coordinator, identity, semaphoreContract } = await loadFixture( deploySemaphoreWhistleblowingFixture ) const entityId = 0 - await semaphoreWhistleblowingContract.createEntity(entityId, coordinator.address) + await semaphoreWhistleblowingContract.createEntity(coordinator.getAddress()) const transaction = await semaphoreWhistleblowingContract.addWhistleblower(entityId, identity.commitment) - await expect(transaction).to.emit(semaphoreWhistleblowingContract, "MemberAdded") + await expect(transaction).to.emit(semaphoreContract, "MemberAdded") }) it("Should not add a whistleblower to an entity if the caller is not the editor", async () => { @@ -74,7 +80,7 @@ describe("SemaphoreWhistleblowing", () => { ) const entityId = 0 - await semaphoreWhistleblowingContract.createEntity(entityId, coordinator.address) + await semaphoreWhistleblowingContract.createEntity(coordinator.address) const transaction = semaphoreWhistleblowingContract .connect(whistleblower) @@ -82,19 +88,19 @@ describe("SemaphoreWhistleblowing", () => { await expect(transaction).to.be.revertedWithCustomError( semaphoreWhistleblowingContract, - "Semaphore__CallerIsNotTheEditor" + "SemaphoreWhistleblowing__CallerIsNotTheEditor" ) }) }) describe("# removeWhistleblower", () => { it("Should remove a whistleblower from an entity", async () => { - const { semaphoreWhistleblowingContract, coordinator, identity } = await loadFixture( + const { semaphoreWhistleblowingContract, coordinator, identity, semaphoreContract } = await loadFixture( deploySemaphoreWhistleblowingFixture ) const entityId = 0 - await semaphoreWhistleblowingContract.createEntity(entityId, coordinator.address) + await semaphoreWhistleblowingContract.createEntity(coordinator.address) await semaphoreWhistleblowingContract.addWhistleblower(entityId, identity.commitment) const transaction = await semaphoreWhistleblowingContract.removeWhistleblower( @@ -103,7 +109,7 @@ describe("SemaphoreWhistleblowing", () => { [] ) - await expect(transaction).to.emit(semaphoreWhistleblowingContract, "MemberRemoved") + await expect(transaction).to.emit(semaphoreContract, "MemberRemoved") }) it("Should not remove a whistleblower from an entity if the caller is not the editor", async () => { @@ -112,7 +118,7 @@ describe("SemaphoreWhistleblowing", () => { ) const entityId = 0 - await semaphoreWhistleblowingContract.createEntity(entityId, coordinator.address) + await semaphoreWhistleblowingContract.createEntity(coordinator.address) await semaphoreWhistleblowingContract.addWhistleblower(entityId, identity.commitment) const transaction = semaphoreWhistleblowingContract @@ -121,7 +127,7 @@ describe("SemaphoreWhistleblowing", () => { await expect(transaction).to.be.revertedWithCustomError( semaphoreWhistleblowingContract, - "Semaphore__CallerIsNotTheEditor" + "SemaphoreWhistleblowing__CallerIsNotTheEditor" ) }) }) @@ -133,38 +139,42 @@ describe("SemaphoreWhistleblowing", () => { ) const entityId = 0 - await semaphoreWhistleblowingContract.createEntity(entityId, coordinator.address) + await semaphoreWhistleblowingContract.createEntity(coordinator.address) await semaphoreWhistleblowingContract.addWhistleblower(entityId, identity.commitment) const transaction = await semaphoreWhistleblowingContract.publishLeak( leak, proof.nullifier, entityId, - proof.proof + proof.merkleTreeDepth, + proof.merkleTreeRoot, + proof.points ) await expect(transaction).to.emit(semaphoreWhistleblowingContract, "LeakPublished").withArgs(entityId, leak) }) it("Should not allow a whistleblower to publish a leak with an invalid proof", async () => { - const { semaphoreWhistleblowingContract, coordinator, identity, leak, proof } = await loadFixture( - deploySemaphoreWhistleblowingFixture - ) + const { semaphoreWhistleblowingContract, coordinator, identity, leak, proof, semaphoreContract } = + await loadFixture(deploySemaphoreWhistleblowingFixture) const entityId = 0 - await semaphoreWhistleblowingContract.createEntity(entityId, coordinator.address) + await semaphoreWhistleblowingContract.createEntity(coordinator.address) await semaphoreWhistleblowingContract.addWhistleblower(entityId, identity.commitment) - const invalidProof = proof.map((p) => p.add(1)) + const invalidProof = proof.points + invalidProof[0] = "1234" const transaction = semaphoreWhistleblowingContract.publishLeak( leak, proof.nullifier, entityId, + proof.merkleTreeDepth, + proof.merkleTreeRoot, invalidProof ) - await expect(transaction).to.be.revertedWith("Invalid proof") + await expect(transaction).to.be.revertedWithCustomError(semaphoreContract, "Semaphore__InvalidProof") }) }) }) diff --git a/yarn.lock b/yarn.lock index 9628614..f49169e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3844,15 +3844,6 @@ __metadata: languageName: unknown linkType: soft -"@semaphore-protocol/contracts@npm:4.0.0-beta.16": - version: 4.0.0-beta.16 - resolution: "@semaphore-protocol/contracts@npm:4.0.0-beta.16" - dependencies: - "@zk-kit/lean-imt.sol": "npm:2.0.0" - checksum: 10/0ffa86c7bacef09b861d22aa9ebed51b0bf0d30b5f1d8c73cd0451b8e0e01b5c890020cbbba8ea5abd0004f7410a58da2b2aa33cf1180509908db31785ff4a6b - languageName: node - linkType: hard - "@semaphore-protocol/contracts@npm:4.0.1": version: 4.0.1 resolution: "@semaphore-protocol/contracts@npm:4.0.1" @@ -3873,14 +3864,14 @@ __metadata: languageName: node linkType: hard -"@semaphore-protocol/core@npm:4.0.0-beta.16": - version: 4.0.0-beta.16 - resolution: "@semaphore-protocol/core@npm:4.0.0-beta.16" +"@semaphore-protocol/core@npm:4.0.1": + version: 4.0.1 + resolution: "@semaphore-protocol/core@npm:4.0.1" dependencies: - "@semaphore-protocol/group": "npm:4.0.0-beta.16" - "@semaphore-protocol/identity": "npm:4.0.0-beta.16" - "@semaphore-protocol/proof": "npm:4.0.0-beta.16" - checksum: 10/e98ba8781e4da53d02e4ecb06f70fbdafed814f849db9cdb0fccf8441fa51eababb94f01e02744a2c024e0730a8639a4a55ce0ec5d9b02208998a2305557fa91 + "@semaphore-protocol/group": "npm:4.0.1" + "@semaphore-protocol/identity": "npm:4.0.1" + "@semaphore-protocol/proof": "npm:4.0.1" + checksum: 10/990960e6b4de91c2d5296f10992e97fed94590f5c494a0c217ff0981017ae1cbff1c833b37467dfd0160250e72e592e769e460b5f49ea1d85072d51f5d21ca68 languageName: node linkType: hard @@ -3906,27 +3897,27 @@ __metadata: languageName: node linkType: hard -"@semaphore-protocol/group@npm:4.0.0-beta.16": - version: 4.0.0-beta.16 - resolution: "@semaphore-protocol/group@npm:4.0.0-beta.16" +"@semaphore-protocol/group@npm:4.0.1": + version: 4.0.1 + resolution: "@semaphore-protocol/group@npm:4.0.1" dependencies: "@zk-kit/lean-imt": "npm:2.0.1" "@zk-kit/utils": "npm:1.0.0" - checksum: 10/3e2ca07faf6cb3bd6e5bcc068df2e155825cb203183baca533d35d3c04c534a80c4ec24f530e7c701aee03119c71ca5b39fe737cfb3afbc81cbce550a94a3052 + checksum: 10/8ba680bfb930228bd1904a8f3b11de8c0df0f81ba893dffc91dcbef6c20072b7ee6836598de4ba968363a3c163615b30cc32cffd82f67c717572c523f8f00245 languageName: node linkType: hard -"@semaphore-protocol/hardhat@npm:4.0.0-beta.16": - version: 4.0.0-beta.16 - resolution: "@semaphore-protocol/hardhat@npm:4.0.0-beta.16" +"@semaphore-protocol/hardhat@npm:4.0.1": + version: 4.0.1 + resolution: "@semaphore-protocol/hardhat@npm:4.0.1" dependencies: "@nomicfoundation/hardhat-ethers": "npm:^3.0.0" - "@semaphore-protocol/contracts": "npm:4.0.0-beta.16" + "@semaphore-protocol/contracts": "npm:4.0.1" ethers: "npm:^6.4.0" hardhat-dependency-compiler: "npm:^1.1.3" peerDependencies: hardhat: ^2.19.4 - checksum: 10/e9d600f532e0a98929393a1aaf3fb53ea268d7faea105aa47b17fc56694c7fc810c09bf77a15c89def952b48d5aef6aaf5823e634cf5b3151216cc1e0fa05330 + checksum: 10/edaf94b20db5b4fb6cae0fb2b15aa242b9404153119f9df75432677d5a44cb1e28c88409400682bc0ec933750cea4bb9034479f57056ca154d222ecaaebf581f languageName: node linkType: hard @@ -3955,18 +3946,6 @@ __metadata: languageName: node linkType: hard -"@semaphore-protocol/identity@npm:4.0.0-beta.16": - version: 4.0.0-beta.16 - resolution: "@semaphore-protocol/identity@npm:4.0.0-beta.16" - dependencies: - "@zk-kit/baby-jubjub": "npm:1.0.1" - "@zk-kit/eddsa-poseidon": "npm:1.0.2" - "@zk-kit/utils": "npm:1.2.0" - poseidon-lite: "npm:0.2.0" - checksum: 10/f8e64c191bf6ef7f76c2e59b2404638638ab3004e2121107d9b3418684d88e6b16fc5904b78e1a451c66200c26eff5d884312bdd63e8636c0ba89da5a7278827 - languageName: node - linkType: hard - "@semaphore-protocol/identity@npm:4.0.0-beta.7": version: 4.0.0-beta.7 resolution: "@semaphore-protocol/identity@npm:4.0.0-beta.7" @@ -3979,6 +3958,18 @@ __metadata: languageName: node linkType: hard +"@semaphore-protocol/identity@npm:4.0.1": + version: 4.0.1 + resolution: "@semaphore-protocol/identity@npm:4.0.1" + dependencies: + "@zk-kit/baby-jubjub": "npm:1.0.1" + "@zk-kit/eddsa-poseidon": "npm:1.0.2" + "@zk-kit/utils": "npm:1.2.0" + poseidon-lite: "npm:0.2.0" + checksum: 10/3fd2e05c1f73137563912dfde26a01342b9c8976bf4510744f6f4a388ebb39efb7c5db247f8ba83e1dca736476504c21bb8200c9d91eb80dfd9f59d8ec08a330 + languageName: node + linkType: hard + "@semaphore-protocol/proof@npm:3.15.2": version: 3.15.2 resolution: "@semaphore-protocol/proof@npm:3.15.2" @@ -4012,19 +4003,19 @@ __metadata: languageName: node linkType: hard -"@semaphore-protocol/proof@npm:4.0.0-beta.16": - version: 4.0.0-beta.16 - resolution: "@semaphore-protocol/proof@npm:4.0.0-beta.16" +"@semaphore-protocol/proof@npm:4.0.1": + version: 4.0.1 + resolution: "@semaphore-protocol/proof@npm:4.0.1" dependencies: - "@semaphore-protocol/utils": "npm:4.0.0-beta.16" + "@semaphore-protocol/utils": "npm:4.0.1" "@zk-kit/artifacts": "npm:1.8.0" "@zk-kit/utils": "npm:1.0.0" ethers: "npm:6.10.0" snarkjs: "npm:0.7.4" peerDependencies: - "@semaphore-protocol/group": 4.0.0-beta.16 - "@semaphore-protocol/identity": 4.0.0-beta.16 - checksum: 10/667d08c03e8e0519f9eb51e4ceb219b6b4ea8acf12f40ee4da6f5c6cc34f16c70648746221948474b8c29da46a7566c8974f0b2133a553920fa4d0b58881b4db + "@semaphore-protocol/group": 4.0.1 + "@semaphore-protocol/identity": 4.0.1 + checksum: 10/95d911613f90309014cc928c5396ecc3fb3fb7568d9c4f845e4f0d67fc06f03f23a52f25ce481ef9b3c21ddf4355c3e9059f79527bcae2112377b977a2d34bcf languageName: node linkType: hard @@ -4037,12 +4028,12 @@ __metadata: languageName: node linkType: hard -"@semaphore-protocol/utils@npm:4.0.0-beta.16": - version: 4.0.0-beta.16 - resolution: "@semaphore-protocol/utils@npm:4.0.0-beta.16" +"@semaphore-protocol/utils@npm:4.0.1": + version: 4.0.1 + resolution: "@semaphore-protocol/utils@npm:4.0.1" dependencies: ethers: "npm:^6.11.1" - checksum: 10/f6d0bb53a9552580b5196cf6dd86d79a9e83b25d7644e46a1edbf1cbd9d21e1f432c87365a6cb0fe13bd54f3bb576539b014381842d4913d1c9ed1d2dd61b35b + checksum: 10/4287d27861708631c40bb2da4531b0de45455d6fd938c9530a8f4a0d62e4a7c9018253681b329bc26a8487b32035d23521953ad14eb019869572ba4d5cf40166 languageName: node linkType: hard @@ -6997,9 +6988,9 @@ __metadata: "@nomicfoundation/hardhat-toolbox": "npm:^4.0.0" "@nomicfoundation/hardhat-verify": "npm:^2.0.0" "@semaphore-protocol/contracts": "npm:4.0.1" - "@semaphore-protocol/core": "npm:4.0.0-beta.16" - "@semaphore-protocol/hardhat": "npm:4.0.0-beta.16" - "@semaphore-protocol/utils": "npm:4.0.0-beta.16" + "@semaphore-protocol/core": "npm:4.0.1" + "@semaphore-protocol/hardhat": "npm:4.0.1" + "@semaphore-protocol/utils": "npm:4.0.1" "@typechain/ethers-v6": "npm:^0.5.0" "@typechain/hardhat": "npm:^9.0.0" "@types/chai": "npm:^4.2.0" @@ -7021,7 +7012,7 @@ __metadata: hardhat-gas-reporter: "npm:^1.0.8" prettier: "npm:^3.2.5" prettier-plugin-solidity: "npm:^1.3.1" - solhint: "npm:^4.1.1" + solhint: "npm:^5.0.3" solhint-plugin-prettier: "npm:^0.1.0" solidity-coverage: "npm:^0.8.1" ts-node: "npm:^10.9.2" @@ -14143,9 +14134,9 @@ __metadata: languageName: node linkType: hard -"solhint@npm:^4.1.1": - version: 4.5.4 - resolution: "solhint@npm:4.5.4" +"solhint@npm:^5.0.3": + version: 5.0.3 + resolution: "solhint@npm:5.0.3" dependencies: "@solidity-parser/parser": "npm:^0.18.0" ajv: "npm:^6.12.6" @@ -14171,7 +14162,7 @@ __metadata: optional: true bin: solhint: solhint.js - checksum: 10/0d839f4c81b83ec2fa9db5003971623b4ca6895348d55874bd9189c4af06c8c5328789410a2859496b7cbdee0ed0321694d63d83f5c94955f4d00bc15e317e41 + checksum: 10/87bc03fce019a3b3443a37a1bdaaabcec9a19730175d306b1c21109dcc612a520eb710ab746850505494b509156dd3bcf21d77fdb176abd57d4d4e6ca76cd85e languageName: node linkType: hard