@maci-protocol/testing 0.0.0-ci.a1bedc5 → 0.0.0-ci.a45d012
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/LICENSE +1 -2
- package/build/ts/__tests__/e2e.full.test.d.ts +2 -0
- package/build/ts/__tests__/e2e.full.test.d.ts.map +1 -0
- package/build/ts/__tests__/e2e.full.test.js +844 -0
- package/build/ts/__tests__/e2e.full.test.js.map +1 -0
- package/build/ts/__tests__/e2e.nonQv.test.js +410 -24
- package/build/ts/__tests__/e2e.nonQv.test.js.map +1 -1
- package/build/ts/__tests__/e2e.test.js +96 -107
- package/build/ts/__tests__/e2e.test.js.map +1 -1
- package/build/ts/__tests__/integration.test.js +32 -33
- package/build/ts/__tests__/integration.test.js.map +1 -1
- package/build/ts/__tests__/keyChange.test.js +36 -39
- package/build/ts/__tests__/keyChange.test.js.map +1 -1
- package/build/ts/__tests__/maciKeys.test.js +39 -39
- package/build/ts/__tests__/maciKeys.test.js.map +1 -1
- package/build/ts/__tests__/unit/joinPoll.test.js +92 -24
- package/build/ts/__tests__/unit/joinPoll.test.js.map +1 -1
- package/build/ts/__tests__/unit/poll.test.js +5 -5
- package/build/ts/__tests__/unit/poll.test.js.map +1 -1
- package/build/ts/__tests__/unit/publish.test.js +5 -5
- package/build/ts/__tests__/unit/publish.test.js.map +1 -1
- package/build/ts/__tests__/unit/signup.test.js +4 -4
- package/build/ts/__tests__/unit/signup.test.js.map +1 -1
- package/build/ts/__tests__/unit/utils.test.js +12 -12
- package/build/ts/__tests__/unit/utils.test.js.map +1 -1
- package/build/ts/constants.d.ts +49 -51
- package/build/ts/constants.d.ts.map +1 -1
- package/build/ts/constants.js +92 -71
- package/build/ts/constants.js.map +1 -1
- package/build/ts/testingClass.d.ts +7 -7
- package/build/ts/testingClass.d.ts.map +1 -1
- package/build/ts/testingClass.js +19 -20
- package/build/ts/testingClass.js.map +1 -1
- package/build/ts/types.d.ts +11 -11
- package/build/ts/types.d.ts.map +1 -1
- package/build/ts/utils.d.ts +3 -3
- package/build/ts/utils.d.ts.map +1 -1
- package/build/ts/utils.js +12 -12
- package/build/ts/utils.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -12
|
@@ -27,38 +27,38 @@ describe("e2e tests", function test() {
|
|
|
27
27
|
const useWasm = (0, sdk_1.isArm)();
|
|
28
28
|
this.timeout(900000);
|
|
29
29
|
let maciAddresses;
|
|
30
|
-
let
|
|
30
|
+
let verifyingKeysRegistryAddress;
|
|
31
31
|
let initialVoiceCreditProxyContractAddress;
|
|
32
32
|
let verifierContractAddress;
|
|
33
33
|
let signer;
|
|
34
34
|
const generateProofsArgs = {
|
|
35
35
|
outputDir: constants_1.testProofsDirPath,
|
|
36
36
|
tallyFile: constants_1.testTallyFilePath,
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
voteTallyZkey: constants_1.testTallyVotesZkeyPath,
|
|
38
|
+
messageProcessorZkey: constants_1.testProcessMessageZkeyPath,
|
|
39
39
|
pollId: 0n,
|
|
40
40
|
rapidsnark: constants_1.testRapidsnarkPath,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
messageProcessorWitnessGenerator: constants_1.testProcessMessagesWitnessPath,
|
|
42
|
+
messageProcessorWitnessDatFile: constants_1.testProcessMessagesWitnessDatPath,
|
|
43
|
+
voteTallyWitnessGenerator: constants_1.testTallyVotesWitnessPath,
|
|
44
|
+
voteTallyWitnessDatFile: constants_1.testTallyVotesWitnessDatPath,
|
|
45
45
|
coordinatorPrivateKey: constants_1.coordinatorPrivateKey,
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
messageProcessorWasm: constants_1.testProcessMessagesWasmPath,
|
|
47
|
+
voteTallyWasm: constants_1.testTallyVotesWasmPath,
|
|
48
48
|
useWasm,
|
|
49
|
-
|
|
49
|
+
mode: core_1.EMode.QV,
|
|
50
50
|
};
|
|
51
|
-
// before all tests we deploy the
|
|
51
|
+
// before all tests we deploy the verifying keys registry contract and set the verifying keys
|
|
52
52
|
before(async () => {
|
|
53
53
|
signer = await (0, sdk_1.getDefaultSigner)();
|
|
54
|
-
// we deploy the
|
|
55
|
-
|
|
54
|
+
// we deploy the verifying keys registry contract
|
|
55
|
+
verifyingKeysRegistryAddress = await (0, sdk_1.deployVerifyingKeysRegistryContract)({ signer });
|
|
56
56
|
const [initialVoiceCreditProxy] = await (0, sdk_1.deployConstantInitialVoiceCreditProxy)({ amount: constants_1.DEFAULT_INITIAL_VOICE_CREDITS }, signer, undefined, true);
|
|
57
57
|
initialVoiceCreditProxyContractAddress = await initialVoiceCreditProxy.getAddress();
|
|
58
58
|
const verifier = await (0, sdk_1.deployVerifier)(signer, true);
|
|
59
59
|
verifierContractAddress = await verifier.getAddress();
|
|
60
60
|
// we set the verifying keys
|
|
61
|
-
await (0, sdk_1.setVerifyingKeys)({ ...(await (0, constants_1.verifyingKeysArgs)(signer)),
|
|
61
|
+
await (0, sdk_1.setVerifyingKeys)({ ...(await (0, constants_1.verifyingKeysArgs)(signer)), verifyingKeysRegistryAddress });
|
|
62
62
|
});
|
|
63
63
|
describe("2 signups (1 after stateAq is merged and logs are fetched), 1 message", () => {
|
|
64
64
|
after(async () => {
|
|
@@ -86,7 +86,7 @@ describe("e2e tests", function test() {
|
|
|
86
86
|
relayers: [await signer.getAddress()],
|
|
87
87
|
maciAddress: maciAddresses.maciContractAddress,
|
|
88
88
|
verifierContractAddress,
|
|
89
|
-
|
|
89
|
+
verifyingKeysRegistryContractAddress: verifyingKeysRegistryAddress,
|
|
90
90
|
policyContractAddress: pollPolicyContractAddress,
|
|
91
91
|
initialVoiceCreditProxyContractAddress,
|
|
92
92
|
});
|
|
@@ -103,12 +103,11 @@ describe("e2e tests", function test() {
|
|
|
103
103
|
await (0, sdk_1.joinPoll)({
|
|
104
104
|
maciAddress: maciAddresses.maciContractAddress,
|
|
105
105
|
privateKey: user.privateKey.serialize(),
|
|
106
|
-
stateIndex: 1n,
|
|
107
106
|
pollId: 0n,
|
|
108
|
-
pollJoiningZkey: constants_1.
|
|
107
|
+
pollJoiningZkey: constants_1.testPollJoiningZkeyPath,
|
|
109
108
|
useWasm: true,
|
|
110
109
|
pollWasm: constants_1.testPollJoiningWasmPath,
|
|
111
|
-
|
|
110
|
+
pollWitnessGenerator: constants_1.testPollJoiningWitnessPath,
|
|
112
111
|
rapidsnark: constants_1.testRapidsnarkPath,
|
|
113
112
|
sgDataArg: constants_1.DEFAULT_SG_DATA,
|
|
114
113
|
ivcpDataArg: constants_1.DEFAULT_IVCP_DATA,
|
|
@@ -124,7 +123,7 @@ describe("e2e tests", function test() {
|
|
|
124
123
|
pollId: 0n,
|
|
125
124
|
newVoteWeight: 9n,
|
|
126
125
|
maciAddress: maciAddresses.maciContractAddress,
|
|
127
|
-
salt: (0, crypto_1.
|
|
126
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
128
127
|
privateKey: user.privateKey.serialize(),
|
|
129
128
|
signer,
|
|
130
129
|
});
|
|
@@ -177,7 +176,7 @@ describe("e2e tests", function test() {
|
|
|
177
176
|
relayers: [await signer.getAddress()],
|
|
178
177
|
maciAddress: maciAddresses.maciContractAddress,
|
|
179
178
|
verifierContractAddress,
|
|
180
|
-
|
|
179
|
+
verifyingKeysRegistryContractAddress: verifyingKeysRegistryAddress,
|
|
181
180
|
policyContractAddress: pollPolicyContractAddress,
|
|
182
181
|
initialVoiceCreditProxyContractAddress,
|
|
183
182
|
});
|
|
@@ -201,12 +200,11 @@ describe("e2e tests", function test() {
|
|
|
201
200
|
await (0, sdk_1.joinPoll)({
|
|
202
201
|
maciAddress: maciAddresses.maciContractAddress,
|
|
203
202
|
privateKey: users[i].privateKey.serialize(),
|
|
204
|
-
stateIndex: BigInt(i + 1),
|
|
205
203
|
pollId: 0n,
|
|
206
|
-
pollJoiningZkey: constants_1.
|
|
204
|
+
pollJoiningZkey: constants_1.testPollJoiningZkeyPath,
|
|
207
205
|
useWasm: true,
|
|
208
206
|
pollWasm: constants_1.testPollJoiningWasmPath,
|
|
209
|
-
|
|
207
|
+
pollWitnessGenerator: constants_1.testPollJoiningWitnessPath,
|
|
210
208
|
rapidsnark: constants_1.testRapidsnarkPath,
|
|
211
209
|
sgDataArg: constants_1.DEFAULT_SG_DATA,
|
|
212
210
|
ivcpDataArg: constants_1.DEFAULT_IVCP_DATA,
|
|
@@ -223,7 +221,7 @@ describe("e2e tests", function test() {
|
|
|
223
221
|
pollId: 0n,
|
|
224
222
|
newVoteWeight: 4n,
|
|
225
223
|
maciAddress: maciAddresses.maciContractAddress,
|
|
226
|
-
salt: (0, crypto_1.
|
|
224
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
227
225
|
privateKey: users[0].privateKey.serialize(),
|
|
228
226
|
signer,
|
|
229
227
|
});
|
|
@@ -235,7 +233,7 @@ describe("e2e tests", function test() {
|
|
|
235
233
|
pollId: 0n,
|
|
236
234
|
newVoteWeight: 3n,
|
|
237
235
|
maciAddress: maciAddresses.maciContractAddress,
|
|
238
|
-
salt: (0, crypto_1.
|
|
236
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
239
237
|
privateKey: users[0].privateKey.serialize(),
|
|
240
238
|
signer,
|
|
241
239
|
});
|
|
@@ -247,7 +245,7 @@ describe("e2e tests", function test() {
|
|
|
247
245
|
pollId: 0n,
|
|
248
246
|
newVoteWeight: 9n,
|
|
249
247
|
maciAddress: maciAddresses.maciContractAddress,
|
|
250
|
-
salt: (0, crypto_1.
|
|
248
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
251
249
|
privateKey: users[0].privateKey.serialize(),
|
|
252
250
|
signer,
|
|
253
251
|
});
|
|
@@ -259,7 +257,7 @@ describe("e2e tests", function test() {
|
|
|
259
257
|
pollId: 0n,
|
|
260
258
|
newVoteWeight: 9n,
|
|
261
259
|
maciAddress: maciAddresses.maciContractAddress,
|
|
262
|
-
salt: (0, crypto_1.
|
|
260
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
263
261
|
privateKey: users[1].privateKey.serialize(),
|
|
264
262
|
signer,
|
|
265
263
|
});
|
|
@@ -271,7 +269,7 @@ describe("e2e tests", function test() {
|
|
|
271
269
|
pollId: 0n,
|
|
272
270
|
newVoteWeight: 9n,
|
|
273
271
|
maciAddress: maciAddresses.maciContractAddress,
|
|
274
|
-
salt: (0, crypto_1.
|
|
272
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
275
273
|
privateKey: users[2].privateKey.serialize(),
|
|
276
274
|
signer,
|
|
277
275
|
});
|
|
@@ -283,7 +281,7 @@ describe("e2e tests", function test() {
|
|
|
283
281
|
pollId: 0n,
|
|
284
282
|
newVoteWeight: 3n,
|
|
285
283
|
maciAddress: maciAddresses.maciContractAddress,
|
|
286
|
-
salt: (0, crypto_1.
|
|
284
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
287
285
|
privateKey: users[3].privateKey.serialize(),
|
|
288
286
|
signer,
|
|
289
287
|
});
|
|
@@ -295,7 +293,7 @@ describe("e2e tests", function test() {
|
|
|
295
293
|
pollId: 0n,
|
|
296
294
|
newVoteWeight: 2n,
|
|
297
295
|
maciAddress: maciAddresses.maciContractAddress,
|
|
298
|
-
salt: (0, crypto_1.
|
|
296
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
299
297
|
privateKey: users[3].privateKey.serialize(),
|
|
300
298
|
signer,
|
|
301
299
|
});
|
|
@@ -307,7 +305,7 @@ describe("e2e tests", function test() {
|
|
|
307
305
|
pollId: 0n,
|
|
308
306
|
newVoteWeight: 9n,
|
|
309
307
|
maciAddress: maciAddresses.maciContractAddress,
|
|
310
|
-
salt: (0, crypto_1.
|
|
308
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
311
309
|
privateKey: users[3].privateKey.serialize(),
|
|
312
310
|
signer,
|
|
313
311
|
});
|
|
@@ -317,7 +315,7 @@ describe("e2e tests", function test() {
|
|
|
317
315
|
{
|
|
318
316
|
pollId: 0n,
|
|
319
317
|
voteOptionIndex: 1n,
|
|
320
|
-
salt: (0, crypto_1.
|
|
318
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
321
319
|
nonce: 2n,
|
|
322
320
|
privateKey: users[0].privateKey,
|
|
323
321
|
stateIndex: 1n,
|
|
@@ -329,7 +327,7 @@ describe("e2e tests", function test() {
|
|
|
329
327
|
{
|
|
330
328
|
pollId: 0n,
|
|
331
329
|
voteOptionIndex: 1n,
|
|
332
|
-
salt: (0, crypto_1.
|
|
330
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
333
331
|
nonce: 2n,
|
|
334
332
|
privateKey: users[0].privateKey,
|
|
335
333
|
stateIndex: 1n,
|
|
@@ -341,7 +339,7 @@ describe("e2e tests", function test() {
|
|
|
341
339
|
{
|
|
342
340
|
pollId: 0n,
|
|
343
341
|
voteOptionIndex: 1n,
|
|
344
|
-
salt: (0, crypto_1.
|
|
342
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
345
343
|
nonce: 1n,
|
|
346
344
|
privateKey: users[0].privateKey,
|
|
347
345
|
stateIndex: 1n,
|
|
@@ -353,7 +351,7 @@ describe("e2e tests", function test() {
|
|
|
353
351
|
{
|
|
354
352
|
pollId: 0n,
|
|
355
353
|
voteOptionIndex: 1n,
|
|
356
|
-
salt: (0, crypto_1.
|
|
354
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
357
355
|
nonce: 1n,
|
|
358
356
|
privateKey: users[1].privateKey,
|
|
359
357
|
stateIndex: 2n,
|
|
@@ -365,7 +363,7 @@ describe("e2e tests", function test() {
|
|
|
365
363
|
{
|
|
366
364
|
pollId: 0n,
|
|
367
365
|
voteOptionIndex: 1n,
|
|
368
|
-
salt: (0, crypto_1.
|
|
366
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
369
367
|
nonce: 1n,
|
|
370
368
|
privateKey: users[2].privateKey,
|
|
371
369
|
stateIndex: 3n,
|
|
@@ -377,7 +375,7 @@ describe("e2e tests", function test() {
|
|
|
377
375
|
{
|
|
378
376
|
pollId: 0n,
|
|
379
377
|
voteOptionIndex: 0n,
|
|
380
|
-
salt: (0, crypto_1.
|
|
378
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
381
379
|
nonce: 3n,
|
|
382
380
|
privateKey: users[3].privateKey,
|
|
383
381
|
stateIndex: 4n,
|
|
@@ -389,7 +387,7 @@ describe("e2e tests", function test() {
|
|
|
389
387
|
{
|
|
390
388
|
pollId: 0n,
|
|
391
389
|
voteOptionIndex: 0n,
|
|
392
|
-
salt: (0, crypto_1.
|
|
390
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
393
391
|
nonce: 2n,
|
|
394
392
|
privateKey: users[3].privateKey,
|
|
395
393
|
stateIndex: 4n,
|
|
@@ -401,7 +399,7 @@ describe("e2e tests", function test() {
|
|
|
401
399
|
{
|
|
402
400
|
pollId: 0n,
|
|
403
401
|
voteOptionIndex: 0n,
|
|
404
|
-
salt: (0, crypto_1.
|
|
402
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
405
403
|
nonce: 1n,
|
|
406
404
|
privateKey: users[3].privateKey,
|
|
407
405
|
stateIndex: 4n,
|
|
@@ -462,7 +460,7 @@ describe("e2e tests", function test() {
|
|
|
462
460
|
relayers: [await signer.getAddress()],
|
|
463
461
|
maciAddress: maciAddresses.maciContractAddress,
|
|
464
462
|
verifierContractAddress,
|
|
465
|
-
|
|
463
|
+
verifyingKeysRegistryContractAddress: verifyingKeysRegistryAddress,
|
|
466
464
|
policyContractAddress: pollPolicyContractAddress,
|
|
467
465
|
initialVoiceCreditProxyContractAddress,
|
|
468
466
|
});
|
|
@@ -483,12 +481,11 @@ describe("e2e tests", function test() {
|
|
|
483
481
|
await (0, sdk_1.joinPoll)({
|
|
484
482
|
maciAddress: maciAddresses.maciContractAddress,
|
|
485
483
|
privateKey: users[0].privateKey.serialize(),
|
|
486
|
-
stateIndex: 1n,
|
|
487
484
|
pollId: 0n,
|
|
488
|
-
pollJoiningZkey: constants_1.
|
|
485
|
+
pollJoiningZkey: constants_1.testPollJoiningZkeyPath,
|
|
489
486
|
useWasm: true,
|
|
490
487
|
pollWasm: constants_1.testPollJoiningWasmPath,
|
|
491
|
-
|
|
488
|
+
pollWitnessGenerator: constants_1.testPollJoiningWitnessPath,
|
|
492
489
|
rapidsnark: constants_1.testRapidsnarkPath,
|
|
493
490
|
sgDataArg: constants_1.DEFAULT_SG_DATA,
|
|
494
491
|
ivcpDataArg: constants_1.DEFAULT_IVCP_DATA,
|
|
@@ -501,7 +498,7 @@ describe("e2e tests", function test() {
|
|
|
501
498
|
.map(() => (0, sdk_1.generateVote)({
|
|
502
499
|
pollId: 0n,
|
|
503
500
|
voteOptionIndex: 0n,
|
|
504
|
-
salt: (0, crypto_1.
|
|
501
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
505
502
|
nonce: 1n,
|
|
506
503
|
privateKey: users[0].privateKey,
|
|
507
504
|
stateIndex: 1n,
|
|
@@ -528,7 +525,7 @@ describe("e2e tests", function test() {
|
|
|
528
525
|
pollId: 0n,
|
|
529
526
|
newVoteWeight: 9n,
|
|
530
527
|
maciAddress: maciAddresses.maciContractAddress,
|
|
531
|
-
salt: (0, crypto_1.
|
|
528
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
532
529
|
privateKey: users[0].privateKey.serialize(),
|
|
533
530
|
signer,
|
|
534
531
|
});
|
|
@@ -574,7 +571,7 @@ describe("e2e tests", function test() {
|
|
|
574
571
|
relayers: [await signer.getAddress()],
|
|
575
572
|
maciAddress: maciAddresses.maciContractAddress,
|
|
576
573
|
verifierContractAddress,
|
|
577
|
-
|
|
574
|
+
verifyingKeysRegistryContractAddress: verifyingKeysRegistryAddress,
|
|
578
575
|
policyContractAddress: pollPolicyContractAddress,
|
|
579
576
|
initialVoiceCreditProxyContractAddress,
|
|
580
577
|
});
|
|
@@ -598,12 +595,11 @@ describe("e2e tests", function test() {
|
|
|
598
595
|
await (0, sdk_1.joinPoll)({
|
|
599
596
|
maciAddress: maciAddresses.maciContractAddress,
|
|
600
597
|
privateKey: users[i].privateKey.serialize(),
|
|
601
|
-
stateIndex: BigInt(i + 1),
|
|
602
598
|
pollId: 0n,
|
|
603
|
-
pollJoiningZkey: constants_1.
|
|
599
|
+
pollJoiningZkey: constants_1.testPollJoiningZkeyPath,
|
|
604
600
|
useWasm: true,
|
|
605
601
|
pollWasm: constants_1.testPollJoiningWasmPath,
|
|
606
|
-
|
|
602
|
+
pollWitnessGenerator: constants_1.testPollJoiningWitnessPath,
|
|
607
603
|
rapidsnark: constants_1.testRapidsnarkPath,
|
|
608
604
|
sgDataArg: constants_1.DEFAULT_SG_DATA,
|
|
609
605
|
ivcpDataArg: constants_1.DEFAULT_IVCP_DATA,
|
|
@@ -623,7 +619,7 @@ describe("e2e tests", function test() {
|
|
|
623
619
|
nonce: 1n,
|
|
624
620
|
pollId: 0n,
|
|
625
621
|
newVoteWeight: 9n,
|
|
626
|
-
salt: (0, crypto_1.
|
|
622
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
627
623
|
privateKey: users[i].privateKey.serialize(),
|
|
628
624
|
signer,
|
|
629
625
|
});
|
|
@@ -667,7 +663,7 @@ describe("e2e tests", function test() {
|
|
|
667
663
|
relayers: [await signer.getAddress()],
|
|
668
664
|
maciAddress: maciAddresses.maciContractAddress,
|
|
669
665
|
verifierContractAddress,
|
|
670
|
-
|
|
666
|
+
verifyingKeysRegistryContractAddress: verifyingKeysRegistryAddress,
|
|
671
667
|
policyContractAddress: pollPolicyContractAddress,
|
|
672
668
|
initialVoiceCreditProxyContractAddress,
|
|
673
669
|
});
|
|
@@ -691,12 +687,11 @@ describe("e2e tests", function test() {
|
|
|
691
687
|
await (0, sdk_1.joinPoll)({
|
|
692
688
|
maciAddress: maciAddresses.maciContractAddress,
|
|
693
689
|
privateKey: users[i].privateKey.serialize(),
|
|
694
|
-
stateIndex: BigInt(i + 1),
|
|
695
690
|
pollId: 0n,
|
|
696
|
-
pollJoiningZkey: constants_1.
|
|
691
|
+
pollJoiningZkey: constants_1.testPollJoiningZkeyPath,
|
|
697
692
|
useWasm: true,
|
|
698
693
|
pollWasm: constants_1.testPollJoiningWasmPath,
|
|
699
|
-
|
|
694
|
+
pollWitnessGenerator: constants_1.testPollJoiningWitnessPath,
|
|
700
695
|
rapidsnark: constants_1.testRapidsnarkPath,
|
|
701
696
|
sgDataArg: constants_1.DEFAULT_SG_DATA,
|
|
702
697
|
ivcpDataArg: constants_1.DEFAULT_IVCP_DATA,
|
|
@@ -716,7 +711,7 @@ describe("e2e tests", function test() {
|
|
|
716
711
|
nonce: 1n,
|
|
717
712
|
pollId: 0n,
|
|
718
713
|
newVoteWeight: 9n,
|
|
719
|
-
salt: (0, crypto_1.
|
|
714
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
720
715
|
privateKey: users[i].privateKey.serialize(),
|
|
721
716
|
signer,
|
|
722
717
|
});
|
|
@@ -727,7 +722,7 @@ describe("e2e tests", function test() {
|
|
|
727
722
|
{
|
|
728
723
|
pollId: 0n,
|
|
729
724
|
voteOptionIndex: 1n,
|
|
730
|
-
salt: (0, crypto_1.
|
|
725
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
731
726
|
nonce: 2n,
|
|
732
727
|
privateKey: users[0].privateKey,
|
|
733
728
|
stateIndex: 1n,
|
|
@@ -739,7 +734,7 @@ describe("e2e tests", function test() {
|
|
|
739
734
|
{
|
|
740
735
|
pollId: 0n,
|
|
741
736
|
voteOptionIndex: 2n,
|
|
742
|
-
salt: (0, crypto_1.
|
|
737
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
743
738
|
nonce: 3n,
|
|
744
739
|
privateKey: users[2].privateKey,
|
|
745
740
|
stateIndex: 3n,
|
|
@@ -751,7 +746,7 @@ describe("e2e tests", function test() {
|
|
|
751
746
|
{
|
|
752
747
|
pollId: 0n,
|
|
753
748
|
voteOptionIndex: 3n,
|
|
754
|
-
salt: (0, crypto_1.
|
|
749
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
755
750
|
nonce: 3n,
|
|
756
751
|
privateKey: users[3].privateKey,
|
|
757
752
|
stateIndex: 4n,
|
|
@@ -812,7 +807,7 @@ describe("e2e tests", function test() {
|
|
|
812
807
|
relayers: [await signer.getAddress()],
|
|
813
808
|
maciAddress: maciAddresses.maciContractAddress,
|
|
814
809
|
verifierContractAddress,
|
|
815
|
-
|
|
810
|
+
verifyingKeysRegistryContractAddress: verifyingKeysRegistryAddress,
|
|
816
811
|
policyContractAddress: pollPolicyContractAddress,
|
|
817
812
|
initialVoiceCreditProxyContractAddress,
|
|
818
813
|
});
|
|
@@ -827,12 +822,11 @@ describe("e2e tests", function test() {
|
|
|
827
822
|
await (0, sdk_1.joinPoll)({
|
|
828
823
|
maciAddress: maciAddresses.maciContractAddress,
|
|
829
824
|
privateKey: users[0].privateKey.serialize(),
|
|
830
|
-
stateIndex: 1n,
|
|
831
825
|
pollId: 0n,
|
|
832
|
-
pollJoiningZkey: constants_1.
|
|
826
|
+
pollJoiningZkey: constants_1.testPollJoiningZkeyPath,
|
|
833
827
|
useWasm: true,
|
|
834
828
|
pollWasm: constants_1.testPollJoiningWasmPath,
|
|
835
|
-
|
|
829
|
+
pollWitnessGenerator: constants_1.testPollJoiningWitnessPath,
|
|
836
830
|
rapidsnark: constants_1.testRapidsnarkPath,
|
|
837
831
|
sgDataArg: constants_1.DEFAULT_SG_DATA,
|
|
838
832
|
ivcpDataArg: constants_1.DEFAULT_IVCP_DATA,
|
|
@@ -847,7 +841,7 @@ describe("e2e tests", function test() {
|
|
|
847
841
|
pollId: 0n,
|
|
848
842
|
newVoteWeight: 9n,
|
|
849
843
|
maciAddress: maciAddresses.maciContractAddress,
|
|
850
|
-
salt: (0, crypto_1.
|
|
844
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
851
845
|
privateKey: users[0].privateKey.serialize(),
|
|
852
846
|
signer,
|
|
853
847
|
});
|
|
@@ -867,12 +861,11 @@ describe("e2e tests", function test() {
|
|
|
867
861
|
await (0, sdk_1.joinPoll)({
|
|
868
862
|
maciAddress: maciAddresses.maciContractAddress,
|
|
869
863
|
privateKey: users[1].privateKey.serialize(),
|
|
870
|
-
stateIndex: 2n,
|
|
871
864
|
pollId: 0n,
|
|
872
|
-
pollJoiningZkey: constants_1.
|
|
865
|
+
pollJoiningZkey: constants_1.testPollJoiningZkeyPath,
|
|
873
866
|
useWasm: true,
|
|
874
867
|
pollWasm: constants_1.testPollJoiningWasmPath,
|
|
875
|
-
|
|
868
|
+
pollWitnessGenerator: constants_1.testPollJoiningWitnessPath,
|
|
876
869
|
rapidsnark: constants_1.testRapidsnarkPath,
|
|
877
870
|
sgDataArg: constants_1.DEFAULT_SG_DATA,
|
|
878
871
|
ivcpDataArg: constants_1.DEFAULT_IVCP_DATA,
|
|
@@ -882,7 +875,7 @@ describe("e2e tests", function test() {
|
|
|
882
875
|
{
|
|
883
876
|
pollId: 0n,
|
|
884
877
|
voteOptionIndex: 0n,
|
|
885
|
-
salt: (0, crypto_1.
|
|
878
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
886
879
|
nonce: 1n,
|
|
887
880
|
privateKey: users[1].privateKey,
|
|
888
881
|
stateIndex: 2n,
|
|
@@ -930,7 +923,7 @@ describe("e2e tests", function test() {
|
|
|
930
923
|
relayers: [await signer.getAddress()],
|
|
931
924
|
maciAddress: maciAddresses.maciContractAddress,
|
|
932
925
|
verifierContractAddress,
|
|
933
|
-
|
|
926
|
+
verifyingKeysRegistryContractAddress: verifyingKeysRegistryAddress,
|
|
934
927
|
policyContractAddress: pollPolicyContractAddress,
|
|
935
928
|
initialVoiceCreditProxyContractAddress,
|
|
936
929
|
});
|
|
@@ -954,12 +947,11 @@ describe("e2e tests", function test() {
|
|
|
954
947
|
await (0, sdk_1.joinPoll)({
|
|
955
948
|
maciAddress: maciAddresses.maciContractAddress,
|
|
956
949
|
privateKey: users[3].privateKey.serialize(),
|
|
957
|
-
stateIndex: 4n,
|
|
958
950
|
pollId: 1n,
|
|
959
|
-
pollJoiningZkey: constants_1.
|
|
951
|
+
pollJoiningZkey: constants_1.testPollJoiningZkeyPath,
|
|
960
952
|
useWasm: true,
|
|
961
953
|
pollWasm: constants_1.testPollJoiningWasmPath,
|
|
962
|
-
|
|
954
|
+
pollWitnessGenerator: constants_1.testPollJoiningWitnessPath,
|
|
963
955
|
rapidsnark: constants_1.testRapidsnarkPath,
|
|
964
956
|
sgDataArg: constants_1.DEFAULT_SG_DATA,
|
|
965
957
|
ivcpDataArg: constants_1.DEFAULT_IVCP_DATA,
|
|
@@ -969,12 +961,11 @@ describe("e2e tests", function test() {
|
|
|
969
961
|
await (0, sdk_1.joinPoll)({
|
|
970
962
|
maciAddress: maciAddresses.maciContractAddress,
|
|
971
963
|
privateKey: users[4].privateKey.serialize(),
|
|
972
|
-
stateIndex: 5n,
|
|
973
964
|
pollId: 1n,
|
|
974
|
-
pollJoiningZkey: constants_1.
|
|
965
|
+
pollJoiningZkey: constants_1.testPollJoiningZkeyPath,
|
|
975
966
|
useWasm: true,
|
|
976
967
|
pollWasm: constants_1.testPollJoiningWasmPath,
|
|
977
|
-
|
|
968
|
+
pollWitnessGenerator: constants_1.testPollJoiningWitnessPath,
|
|
978
969
|
rapidsnark: constants_1.testRapidsnarkPath,
|
|
979
970
|
sgDataArg: constants_1.DEFAULT_SG_DATA,
|
|
980
971
|
ivcpDataArg: constants_1.DEFAULT_IVCP_DATA,
|
|
@@ -986,7 +977,7 @@ describe("e2e tests", function test() {
|
|
|
986
977
|
{
|
|
987
978
|
pollId: 1n,
|
|
988
979
|
voteOptionIndex: 1n,
|
|
989
|
-
salt: (0, crypto_1.
|
|
980
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
990
981
|
nonce: 1n,
|
|
991
982
|
privateKey: users[0].privateKey,
|
|
992
983
|
stateIndex: 1n,
|
|
@@ -998,7 +989,7 @@ describe("e2e tests", function test() {
|
|
|
998
989
|
{
|
|
999
990
|
pollId: 1n,
|
|
1000
991
|
voteOptionIndex: 0n,
|
|
1001
|
-
salt: (0, crypto_1.
|
|
992
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
1002
993
|
nonce: 1n,
|
|
1003
994
|
privateKey: users[1].privateKey,
|
|
1004
995
|
stateIndex: 1n,
|
|
@@ -1028,7 +1019,7 @@ describe("e2e tests", function test() {
|
|
|
1028
1019
|
pollId: 1n,
|
|
1029
1020
|
newVoteWeight: 7n,
|
|
1030
1021
|
maciAddress: maciAddresses.maciContractAddress,
|
|
1031
|
-
salt: (0, crypto_1.
|
|
1022
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
1032
1023
|
privateKey: users[0].privateKey.serialize(),
|
|
1033
1024
|
signer,
|
|
1034
1025
|
});
|
|
@@ -1042,7 +1033,7 @@ describe("e2e tests", function test() {
|
|
|
1042
1033
|
pollId: 1n,
|
|
1043
1034
|
newVoteWeight: 7n,
|
|
1044
1035
|
maciAddress: maciAddresses.maciContractAddress,
|
|
1045
|
-
salt: (0, crypto_1.
|
|
1036
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
1046
1037
|
privateKey: users[1].privateKey.serialize(),
|
|
1047
1038
|
signer,
|
|
1048
1039
|
});
|
|
@@ -1098,7 +1089,7 @@ describe("e2e tests", function test() {
|
|
|
1098
1089
|
relayers: [await signer.getAddress()],
|
|
1099
1090
|
maciAddress: maciAddresses.maciContractAddress,
|
|
1100
1091
|
verifierContractAddress,
|
|
1101
|
-
|
|
1092
|
+
verifyingKeysRegistryContractAddress: verifyingKeysRegistryAddress,
|
|
1102
1093
|
policyContractAddress: pollPolicyContractAddress,
|
|
1103
1094
|
initialVoiceCreditProxyContractAddress,
|
|
1104
1095
|
});
|
|
@@ -1128,12 +1119,11 @@ describe("e2e tests", function test() {
|
|
|
1128
1119
|
await (0, sdk_1.joinPoll)({
|
|
1129
1120
|
maciAddress: maciAddresses.maciContractAddress,
|
|
1130
1121
|
privateKey: users[i].privateKey.serialize(),
|
|
1131
|
-
stateIndex: BigInt(i + 1),
|
|
1132
1122
|
pollId: 0n,
|
|
1133
|
-
pollJoiningZkey: constants_1.
|
|
1123
|
+
pollJoiningZkey: constants_1.testPollJoiningZkeyPath,
|
|
1134
1124
|
useWasm: true,
|
|
1135
1125
|
pollWasm: constants_1.testPollJoiningWasmPath,
|
|
1136
|
-
|
|
1126
|
+
pollWitnessGenerator: constants_1.testPollJoiningWitnessPath,
|
|
1137
1127
|
rapidsnark: constants_1.testRapidsnarkPath,
|
|
1138
1128
|
sgDataArg: constants_1.DEFAULT_SG_DATA,
|
|
1139
1129
|
ivcpDataArg: constants_1.DEFAULT_IVCP_DATA,
|
|
@@ -1159,7 +1149,7 @@ describe("e2e tests", function test() {
|
|
|
1159
1149
|
pollId: 0n,
|
|
1160
1150
|
newVoteWeight: 9n,
|
|
1161
1151
|
maciAddress: maciAddresses.maciContractAddress,
|
|
1162
|
-
salt: (0, crypto_1.
|
|
1152
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
1163
1153
|
privateKey: users[0].privateKey.serialize(),
|
|
1164
1154
|
signer,
|
|
1165
1155
|
});
|
|
@@ -1167,7 +1157,7 @@ describe("e2e tests", function test() {
|
|
|
1167
1157
|
{
|
|
1168
1158
|
pollId: 0n,
|
|
1169
1159
|
voteOptionIndex: 0n,
|
|
1170
|
-
salt: (0, crypto_1.
|
|
1160
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
1171
1161
|
nonce: 1n,
|
|
1172
1162
|
privateKey: users[0].privateKey,
|
|
1173
1163
|
stateIndex: 1n,
|
|
@@ -1216,7 +1206,7 @@ describe("e2e tests", function test() {
|
|
|
1216
1206
|
relayers: [await signer.getAddress()],
|
|
1217
1207
|
maciAddress: maciAddresses.maciContractAddress,
|
|
1218
1208
|
verifierContractAddress,
|
|
1219
|
-
|
|
1209
|
+
verifyingKeysRegistryContractAddress: verifyingKeysRegistryAddress,
|
|
1220
1210
|
policyContractAddress: pollPolicyContractAddress,
|
|
1221
1211
|
initialVoiceCreditProxyContractAddress,
|
|
1222
1212
|
});
|
|
@@ -1233,7 +1223,7 @@ describe("e2e tests", function test() {
|
|
|
1233
1223
|
relayers: [await signer.getAddress()],
|
|
1234
1224
|
maciAddress: maciAddresses.maciContractAddress,
|
|
1235
1225
|
verifierContractAddress,
|
|
1236
|
-
|
|
1226
|
+
verifyingKeysRegistryContractAddress: verifyingKeysRegistryAddress,
|
|
1237
1227
|
policyContractAddress: pollPolicyContractAddress,
|
|
1238
1228
|
initialVoiceCreditProxyContractAddress,
|
|
1239
1229
|
});
|
|
@@ -1241,18 +1231,18 @@ describe("e2e tests", function test() {
|
|
|
1241
1231
|
});
|
|
1242
1232
|
it("join the second and third polls", async () => {
|
|
1243
1233
|
// eslint-disable-next-line @typescript-eslint/prefer-for-of
|
|
1244
|
-
for (let
|
|
1234
|
+
for (let pollId = 1; pollId <= 2; pollId += 1) {
|
|
1235
|
+
// eslint-disable-next-line @typescript-eslint/prefer-for-of
|
|
1245
1236
|
for (let i = 0; i < users.length; i += 1) {
|
|
1246
1237
|
// eslint-disable-next-line no-await-in-loop
|
|
1247
1238
|
await (0, sdk_1.joinPoll)({
|
|
1248
1239
|
maciAddress: maciAddresses.maciContractAddress,
|
|
1249
1240
|
privateKey: users[i].privateKey.serialize(),
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
pollJoiningZkey: constants_1.pollJoiningTestZkeyPath,
|
|
1241
|
+
pollId: BigInt(pollId),
|
|
1242
|
+
pollJoiningZkey: constants_1.testPollJoiningZkeyPath,
|
|
1253
1243
|
useWasm: true,
|
|
1254
1244
|
pollWasm: constants_1.testPollJoiningWasmPath,
|
|
1255
|
-
|
|
1245
|
+
pollWitnessGenerator: constants_1.testPollJoiningWitnessPath,
|
|
1256
1246
|
rapidsnark: constants_1.testRapidsnarkPath,
|
|
1257
1247
|
sgDataArg: constants_1.DEFAULT_SG_DATA,
|
|
1258
1248
|
ivcpDataArg: constants_1.DEFAULT_IVCP_DATA,
|
|
@@ -1261,7 +1251,7 @@ describe("e2e tests", function test() {
|
|
|
1261
1251
|
// eslint-disable-next-line no-await-in-loop
|
|
1262
1252
|
const { isJoined, pollStateIndex } = await (0, sdk_1.getJoinedUserData)({
|
|
1263
1253
|
maciAddress: maciAddresses.maciContractAddress,
|
|
1264
|
-
pollId: BigInt(
|
|
1254
|
+
pollId: BigInt(pollId),
|
|
1265
1255
|
pollPublicKey: users[i].publicKey.serialize(),
|
|
1266
1256
|
signer,
|
|
1267
1257
|
startBlock: 0,
|
|
@@ -1280,7 +1270,7 @@ describe("e2e tests", function test() {
|
|
|
1280
1270
|
pollId: 1n,
|
|
1281
1271
|
newVoteWeight: 9n,
|
|
1282
1272
|
maciAddress: maciAddresses.maciContractAddress,
|
|
1283
|
-
salt: (0, crypto_1.
|
|
1273
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
1284
1274
|
privateKey: users[0].privateKey.serialize(),
|
|
1285
1275
|
signer,
|
|
1286
1276
|
});
|
|
@@ -1292,7 +1282,7 @@ describe("e2e tests", function test() {
|
|
|
1292
1282
|
pollId: 1n,
|
|
1293
1283
|
newVoteWeight: 1n,
|
|
1294
1284
|
maciAddress: maciAddresses.maciContractAddress,
|
|
1295
|
-
salt: (0, crypto_1.
|
|
1285
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
1296
1286
|
privateKey: users[1].privateKey.serialize(),
|
|
1297
1287
|
signer,
|
|
1298
1288
|
});
|
|
@@ -1304,7 +1294,7 @@ describe("e2e tests", function test() {
|
|
|
1304
1294
|
pollId: 1n,
|
|
1305
1295
|
newVoteWeight: 3n,
|
|
1306
1296
|
maciAddress: maciAddresses.maciContractAddress,
|
|
1307
|
-
salt: (0, crypto_1.
|
|
1297
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
1308
1298
|
privateKey: users[2].privateKey.serialize(),
|
|
1309
1299
|
signer,
|
|
1310
1300
|
});
|
|
@@ -1314,7 +1304,7 @@ describe("e2e tests", function test() {
|
|
|
1314
1304
|
{
|
|
1315
1305
|
pollId: 1n,
|
|
1316
1306
|
voteOptionIndex: 0n,
|
|
1317
|
-
salt: (0, crypto_1.
|
|
1307
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
1318
1308
|
nonce: 1n,
|
|
1319
1309
|
privateKey: users[0].privateKey,
|
|
1320
1310
|
stateIndex: 1n,
|
|
@@ -1340,7 +1330,7 @@ describe("e2e tests", function test() {
|
|
|
1340
1330
|
{
|
|
1341
1331
|
pollId: 2n,
|
|
1342
1332
|
voteOptionIndex: 7n,
|
|
1343
|
-
salt: (0, crypto_1.
|
|
1333
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
1344
1334
|
nonce: 1n,
|
|
1345
1335
|
privateKey: users[4].privateKey,
|
|
1346
1336
|
stateIndex: 4n,
|
|
@@ -1352,7 +1342,7 @@ describe("e2e tests", function test() {
|
|
|
1352
1342
|
{
|
|
1353
1343
|
pollId: 2n,
|
|
1354
1344
|
voteOptionIndex: 5n,
|
|
1355
|
-
salt: (0, crypto_1.
|
|
1345
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
1356
1346
|
nonce: 1n,
|
|
1357
1347
|
privateKey: users[5].privateKey,
|
|
1358
1348
|
stateIndex: 5n,
|
|
@@ -1382,7 +1372,7 @@ describe("e2e tests", function test() {
|
|
|
1382
1372
|
pollId: 2n,
|
|
1383
1373
|
newVoteWeight: 3n,
|
|
1384
1374
|
maciAddress: maciAddresses.maciContractAddress,
|
|
1385
|
-
salt: (0, crypto_1.
|
|
1375
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
1386
1376
|
privateKey: users[3].privateKey.serialize(),
|
|
1387
1377
|
signer,
|
|
1388
1378
|
});
|
|
@@ -1394,7 +1384,7 @@ describe("e2e tests", function test() {
|
|
|
1394
1384
|
pollId: 2n,
|
|
1395
1385
|
newVoteWeight: 2n,
|
|
1396
1386
|
maciAddress: maciAddresses.maciContractAddress,
|
|
1397
|
-
salt: (0, crypto_1.
|
|
1387
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
1398
1388
|
privateKey: users[4].privateKey.serialize(),
|
|
1399
1389
|
signer,
|
|
1400
1390
|
});
|
|
@@ -1406,7 +1396,7 @@ describe("e2e tests", function test() {
|
|
|
1406
1396
|
pollId: 2n,
|
|
1407
1397
|
newVoteWeight: 9n,
|
|
1408
1398
|
maciAddress: maciAddresses.maciContractAddress,
|
|
1409
|
-
salt: (0, crypto_1.
|
|
1399
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
1410
1400
|
privateKey: users[5].privateKey.serialize(),
|
|
1411
1401
|
signer,
|
|
1412
1402
|
});
|
|
@@ -1490,7 +1480,7 @@ describe("e2e tests", function test() {
|
|
|
1490
1480
|
relayers: [await signer.getAddress()],
|
|
1491
1481
|
maciAddress: maciAddresses.maciContractAddress,
|
|
1492
1482
|
verifierContractAddress,
|
|
1493
|
-
|
|
1483
|
+
verifyingKeysRegistryContractAddress: verifyingKeysRegistryAddress,
|
|
1494
1484
|
policyContractAddress: pollPolicyContractAddress,
|
|
1495
1485
|
initialVoiceCreditProxyContractAddress,
|
|
1496
1486
|
});
|
|
@@ -1508,12 +1498,11 @@ describe("e2e tests", function test() {
|
|
|
1508
1498
|
await (0, sdk_1.joinPoll)({
|
|
1509
1499
|
maciAddress: maciAddresses.maciContractAddress,
|
|
1510
1500
|
privateKey: user.privateKey.serialize(),
|
|
1511
|
-
stateIndex: 1n,
|
|
1512
1501
|
pollId: 0n,
|
|
1513
|
-
pollJoiningZkey: constants_1.
|
|
1502
|
+
pollJoiningZkey: constants_1.testPollJoiningZkeyPath,
|
|
1514
1503
|
useWasm: true,
|
|
1515
1504
|
pollWasm: constants_1.testPollJoiningWasmPath,
|
|
1516
|
-
|
|
1505
|
+
pollWitnessGenerator: constants_1.testPollJoiningWitnessPath,
|
|
1517
1506
|
rapidsnark: constants_1.testRapidsnarkPath,
|
|
1518
1507
|
sgDataArg: constants_1.DEFAULT_SG_DATA,
|
|
1519
1508
|
ivcpDataArg: constants_1.DEFAULT_IVCP_DATA,
|
|
@@ -1529,7 +1518,7 @@ describe("e2e tests", function test() {
|
|
|
1529
1518
|
pollId: 0n,
|
|
1530
1519
|
newVoteWeight: 3n,
|
|
1531
1520
|
maciAddress: maciAddresses.maciContractAddress,
|
|
1532
|
-
salt: (0, crypto_1.
|
|
1521
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
1533
1522
|
privateKey: user.privateKey.serialize(),
|
|
1534
1523
|
signer,
|
|
1535
1524
|
});
|
|
@@ -1539,7 +1528,7 @@ describe("e2e tests", function test() {
|
|
|
1539
1528
|
{
|
|
1540
1529
|
pollId: 0n,
|
|
1541
1530
|
voteOptionIndex: 5n,
|
|
1542
|
-
salt: (0, crypto_1.
|
|
1531
|
+
salt: (0, crypto_1.generateRandomSalt)(),
|
|
1543
1532
|
nonce: 1n,
|
|
1544
1533
|
privateKey: user.privateKey,
|
|
1545
1534
|
stateIndex: 1n,
|