@semaphore-protocol/cli-template-contracts-hardhat 4.0.0-alpha.4 → 4.0.0-alpha.5
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.
- package/package.json +6 -6
- 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.
|
|
3
|
+
"version": "4.0.0-alpha.5",
|
|
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.
|
|
39
|
-
"@semaphore-protocol/hardhat": "4.0.0-alpha.
|
|
40
|
-
"@semaphore-protocol/identity": "4.0.0-alpha.
|
|
41
|
-
"@semaphore-protocol/proof": "4.0.0-alpha.
|
|
38
|
+
"@semaphore-protocol/group": "4.0.0-alpha.5",
|
|
39
|
+
"@semaphore-protocol/hardhat": "4.0.0-alpha.5",
|
|
40
|
+
"@semaphore-protocol/identity": "4.0.0-alpha.5",
|
|
41
|
+
"@semaphore-protocol/proof": "4.0.0-alpha.5",
|
|
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.
|
|
58
|
+
"@semaphore-protocol/contracts": "4.0.0-alpha.5"
|
|
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 "../
|
|
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
|
|
48
|
+
const proof = await generateProof(users[1], group, feedback, groupId)
|
|
49
49
|
|
|
50
50
|
const transaction = feedbackContract.sendFeedback(
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
proof.merkleTreeDepth,
|
|
52
|
+
proof.merkleTreeRoot,
|
|
53
|
+
proof.nullifier,
|
|
54
54
|
feedback,
|
|
55
|
-
|
|
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
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
proof.merkleTreeDepth,
|
|
63
|
+
proof.merkleTreeRoot,
|
|
64
|
+
proof.nullifier,
|
|
65
|
+
proof.message,
|
|
66
66
|
groupId,
|
|
67
|
-
|
|
67
|
+
proof.points
|
|
68
68
|
)
|
|
69
69
|
})
|
|
70
70
|
})
|