@semaphore-protocol/cli-template-contracts-hardhat 4.0.0-alpha.4 → 4.0.0-alpha.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +6 -6
  2. package/test/Feedback.ts +11 -11
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@semaphore-protocol/cli-template-contracts-hardhat",
3
- "version": "4.0.0-alpha.4",
3
+ "version": "4.0.0-alpha.6",
4
4
  "description": "Semaphore Hardhat template.",
5
5
  "license": "Unlicense",
6
6
  "files": [
@@ -35,10 +35,10 @@
35
35
  "@nomicfoundation/hardhat-network-helpers": "^1.0.0",
36
36
  "@nomicfoundation/hardhat-toolbox": "^4.0.0",
37
37
  "@nomicfoundation/hardhat-verify": "^2.0.0",
38
- "@semaphore-protocol/group": "4.0.0-alpha.4",
39
- "@semaphore-protocol/hardhat": "4.0.0-alpha.4",
40
- "@semaphore-protocol/identity": "4.0.0-alpha.4",
41
- "@semaphore-protocol/proof": "4.0.0-alpha.4",
38
+ "@semaphore-protocol/group": "4.0.0-alpha.6",
39
+ "@semaphore-protocol/hardhat": "4.0.0-alpha.6",
40
+ "@semaphore-protocol/identity": "4.0.0-alpha.6",
41
+ "@semaphore-protocol/proof": "4.0.0-alpha.6",
42
42
  "@typechain/ethers-v6": "^0.5.0",
43
43
  "@typechain/hardhat": "^9.0.0",
44
44
  "@types/chai": "^4.2.0",
@@ -55,7 +55,7 @@
55
55
  "typescript": "^5.3.3"
56
56
  },
57
57
  "dependencies": {
58
- "@semaphore-protocol/contracts": "4.0.0-alpha.4"
58
+ "@semaphore-protocol/contracts": "4.0.0-alpha.6"
59
59
  },
60
60
  "config": {
61
61
  "solidity": {
package/test/Feedback.ts CHANGED
@@ -5,7 +5,7 @@ import { expect } from "chai"
5
5
  import { encodeBytes32String } from "ethers"
6
6
  import { run } from "hardhat"
7
7
  // @ts-ignore: typechain folder will be generated after contracts compilation
8
- import { Feedback } from "../build/typechain"
8
+ import { Feedback } from "../typechain-types"
9
9
 
10
10
  describe("Feedback", () => {
11
11
  let feedbackContract: Feedback
@@ -45,26 +45,26 @@ describe("Feedback", () => {
45
45
  it("Should allow users to send feedback anonymously", async () => {
46
46
  const feedback = encodeBytes32String("Hello World")
47
47
 
48
- const fullProof = await generateProof(users[1], group, feedback, groupId)
48
+ const proof = await generateProof(users[1], group, feedback, groupId)
49
49
 
50
50
  const transaction = feedbackContract.sendFeedback(
51
- fullProof.merkleTreeDepth,
52
- fullProof.merkleTreeRoot,
53
- fullProof.nullifier,
51
+ proof.merkleTreeDepth,
52
+ proof.merkleTreeRoot,
53
+ proof.nullifier,
54
54
  feedback,
55
- fullProof.points
55
+ proof.points
56
56
  )
57
57
 
58
58
  await expect(transaction)
59
59
  .to.emit(semaphoreContract, "ProofValidated")
60
60
  .withArgs(
61
61
  groupId,
62
- fullProof.merkleTreeDepth,
63
- fullProof.merkleTreeRoot,
64
- fullProof.nullifier,
65
- fullProof.message,
62
+ proof.merkleTreeDepth,
63
+ proof.merkleTreeRoot,
64
+ proof.nullifier,
65
+ proof.message,
66
66
  groupId,
67
- fullProof.points
67
+ proof.points
68
68
  )
69
69
  })
70
70
  })