@maci-protocol/cli 0.0.0-ci.1e276ed → 0.0.0-ci.20a1c68
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/package.json +8 -8
- package/build/ts/index.d.ts.map +1 -1
- package/build/ts/index.js +296 -248
- package/build/ts/index.js.map +1 -1
- package/build/ts/utils/constants.d.ts +2 -0
- package/build/ts/utils/constants.d.ts.map +1 -1
- package/build/ts/utils/constants.js +7 -1
- package/build/ts/utils/constants.js.map +1 -1
- package/build/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +12 -12
package/build/ts/index.js
CHANGED
|
@@ -45,6 +45,7 @@ const fs_1 = __importDefault(require("fs"));
|
|
|
45
45
|
const path_1 = __importDefault(require("path"));
|
|
46
46
|
require("./cliInit");
|
|
47
47
|
const utils_1 = require("./utils");
|
|
48
|
+
const constants_1 = require("./utils/constants");
|
|
48
49
|
const defaults_1 = require("./utils/defaults");
|
|
49
50
|
// set the description version and name of the cli tool
|
|
50
51
|
const { description, version, name } = JSON.parse(fs_1.default.readFileSync(path_1.default.resolve(__dirname, "..", "package.json"), "utf8"));
|
|
@@ -60,25 +61,33 @@ program
|
|
|
60
61
|
.option("--poseidonT5Address <poseidonT5Address>", "PoseidonT5 contract address")
|
|
61
62
|
.option("--poseidonT6Address <poseidonT6Address>", "PoseidonT6 contract address")
|
|
62
63
|
.option("-g, --signupPolicyAddress <signupPolicyAddress>", "the signup policy contract address")
|
|
64
|
+
.option("--freeForAllCheckerFactoryAddress <freeForAllCheckerFactoryAddress>", "the free for all checker factory address (optional, using for deployment optimization)")
|
|
65
|
+
.option("--freeForAllPolicyFactoryAddress <freeForAllPolicyFactoryAddress>", "the free for all policy factory address (optional, using for deployment optimization)")
|
|
63
66
|
.requiredOption("--signupPolicyContractName <signupPolicyContractName>", "the signup policy contract name")
|
|
64
67
|
.option("-q, --quiet <quiet>", "whether to print values to the console", (value) => value === "true", false)
|
|
65
68
|
.option("-r, --rpc-provider <provider>", "the rpc provider URL")
|
|
66
69
|
.requiredOption("-s, --stateTreeDepth <stateTreeDepth>", "the state tree depth", parseInt)
|
|
67
|
-
.action(async (
|
|
70
|
+
.action(async (args) => {
|
|
68
71
|
try {
|
|
69
72
|
const signer = await getSigner();
|
|
70
|
-
(0, utils_1.banner)(
|
|
73
|
+
(0, utils_1.banner)(args.quiet);
|
|
71
74
|
const network = await signer.provider?.getNetwork();
|
|
72
75
|
const [poseidonT3, poseidonT4, poseidonT5, poseidonT6] = (0, utils_1.readContractAddresses)({
|
|
73
76
|
contractNames: [sdk_1.EContracts.PoseidonT3, sdk_1.EContracts.PoseidonT4, sdk_1.EContracts.PoseidonT5, sdk_1.EContracts.PoseidonT6],
|
|
74
77
|
network: network?.name,
|
|
75
78
|
});
|
|
76
79
|
let [signupPolicyContractAddress] = (0, utils_1.readContractAddresses)({
|
|
77
|
-
contractNames: [
|
|
80
|
+
contractNames: [args.signupPolicyContractName.toString()],
|
|
78
81
|
network: network?.name,
|
|
79
82
|
});
|
|
80
83
|
if (!signupPolicyContractAddress) {
|
|
81
|
-
const
|
|
84
|
+
const checkerFactory = args.freeForAllCheckerFactoryAddress
|
|
85
|
+
? sdk_1.FreeForAllCheckerFactory__factory.connect(args.freeForAllCheckerFactoryAddress, signer)
|
|
86
|
+
: undefined;
|
|
87
|
+
const policyFactory = args.freeForAllPolicyFactoryAddress
|
|
88
|
+
? sdk_1.FreeForAllPolicyFactory__factory.connect(args.freeForAllPolicyFactoryAddress, signer)
|
|
89
|
+
: undefined;
|
|
90
|
+
const [contract] = await (0, sdk_1.deployFreeForAllSignUpPolicy)({ checker: checkerFactory, policy: policyFactory }, signer, true);
|
|
82
91
|
signupPolicyContractAddress = await contract.getAddress();
|
|
83
92
|
}
|
|
84
93
|
// deploy a verifier contract
|
|
@@ -94,13 +103,13 @@ program
|
|
|
94
103
|
poseidonT6,
|
|
95
104
|
},
|
|
96
105
|
signer,
|
|
97
|
-
stateTreeDepth:
|
|
106
|
+
stateTreeDepth: args.stateTreeDepth,
|
|
98
107
|
});
|
|
99
|
-
const emptyBallotRoots = (0, sdk_1.
|
|
108
|
+
const emptyBallotRoots = (0, sdk_1.generateEmptyBallotRoots)(args.stateTreeDepth);
|
|
100
109
|
// save to the JSON File
|
|
101
110
|
await (0, utils_1.storeContractAddresses)({
|
|
102
111
|
data: {
|
|
103
|
-
[
|
|
112
|
+
[args.signupPolicyContractName]: { address: signupPolicyContractAddress, args: [] },
|
|
104
113
|
[sdk_1.EContracts.Verifier]: { address: verifierContractAddress, args: [] },
|
|
105
114
|
[sdk_1.EContracts.MACI]: {
|
|
106
115
|
address: maciContractAddress,
|
|
@@ -109,7 +118,7 @@ program
|
|
|
109
118
|
messageProcessorFactoryContractAddress,
|
|
110
119
|
tallyFactoryContractAddress,
|
|
111
120
|
signupPolicyContractAddress,
|
|
112
|
-
|
|
121
|
+
args.stateTreeDepth,
|
|
113
122
|
emptyBallotRoots.map((root) => root.toString()),
|
|
114
123
|
],
|
|
115
124
|
},
|
|
@@ -123,7 +132,7 @@ program
|
|
|
123
132
|
},
|
|
124
133
|
signer,
|
|
125
134
|
});
|
|
126
|
-
(0, sdk_1.logGreen)({ quiet:
|
|
135
|
+
(0, sdk_1.logGreen)({ quiet: args.quiet, text: (0, sdk_1.success)(`MACI deployed at: ${maciContractAddress}`) });
|
|
127
136
|
}
|
|
128
137
|
catch (error) {
|
|
129
138
|
program.error(error.message, { exitCode: 1 });
|
|
@@ -132,75 +141,81 @@ program
|
|
|
132
141
|
program
|
|
133
142
|
.command("checkVerifyingKeys")
|
|
134
143
|
.description("check that the verifying keys in the contract match the local ones")
|
|
135
|
-
.option("-
|
|
144
|
+
.option("-m, --mode <mode>", "Voting mode (qv, non-qv, full)", (value) => constants_1.MODE_NAME_TO_ENUM[value], sdk_1.EMode.QV)
|
|
136
145
|
.option("-q, --quiet <quiet>", "whether to print values to the console", (value) => value === "true", false)
|
|
137
146
|
.option("-r, --rpc-provider <provider>", "the rpc provider URL")
|
|
138
|
-
.option("-k, --vk-contract <vkContract>", "the
|
|
147
|
+
.option("-k, --vk-contract <vkContract>", "the VerifyingKeysRegistry contract address")
|
|
139
148
|
.requiredOption("-s, --state-tree-depth <stateTreeDepth>", "the state tree depth", parseInt)
|
|
140
|
-
.requiredOption("-i, --
|
|
149
|
+
.requiredOption("-i, --tally-processing-state-tree-depth <tallyProcessingStateTreeDepth>", "the intermediate state tree depth", parseInt)
|
|
141
150
|
.requiredOption("-v, --vote-option-tree-depth <voteOptionTreeDepth>", "the vote option tree depth", parseInt)
|
|
142
|
-
.requiredOption("-b, --
|
|
143
|
-
.requiredOption("-p, --
|
|
144
|
-
.requiredOption("-t, --tally-
|
|
151
|
+
.requiredOption("-b, --message-batch-size <messageBatchSize>", "the message batch size", parseInt)
|
|
152
|
+
.requiredOption("-p, --message-processor-zkey <messageProcessorZkeyPath>", "the message processor zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)")
|
|
153
|
+
.requiredOption("-t, --vote-tally-zkey <voteTallyZkeyPath>", "the vote tally zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)")
|
|
145
154
|
.requiredOption("--poll-joining-zkey <pollJoiningZkey>", "the poll joining zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)")
|
|
146
155
|
.requiredOption("--poll-joined-zkey <pollJoinedZkey>", "the poll joined zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)")
|
|
147
|
-
.action(async (
|
|
156
|
+
.action(async (args) => {
|
|
148
157
|
try {
|
|
149
158
|
const signer = await getSigner();
|
|
150
159
|
const network = await signer.provider?.getNetwork();
|
|
151
|
-
const [
|
|
152
|
-
contractNames: [sdk_1.EContracts.
|
|
160
|
+
const [contractAddress] = (0, utils_1.readContractAddresses)({
|
|
161
|
+
contractNames: [sdk_1.EContracts.VerifyingKeysRegistry],
|
|
153
162
|
network: network?.name,
|
|
154
|
-
defaultAddresses: [
|
|
163
|
+
defaultAddresses: [args.vkContract],
|
|
155
164
|
});
|
|
156
|
-
(0, sdk_1.logYellow)({ quiet:
|
|
165
|
+
(0, sdk_1.logYellow)({ quiet: args.quiet, text: (0, sdk_1.info)("Retrieving verifying keys from the contract...") });
|
|
157
166
|
await (0, sdk_1.checkVerifyingKeys)({
|
|
158
|
-
stateTreeDepth:
|
|
159
|
-
|
|
160
|
-
voteOptionTreeDepth:
|
|
161
|
-
messageBatchSize:
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
pollJoiningZkeyPath:
|
|
165
|
-
pollJoinedZkeyPath:
|
|
166
|
-
|
|
167
|
-
|
|
167
|
+
stateTreeDepth: args.stateTreeDepth,
|
|
168
|
+
tallyProcessingStateTreeDepth: args.tallyProcessingStateTreeDepth,
|
|
169
|
+
voteOptionTreeDepth: args.voteOptionTreeDepth,
|
|
170
|
+
messageBatchSize: args.messageBatchSize,
|
|
171
|
+
messageProcessorZkeyPath: args.messageProcessorZkey,
|
|
172
|
+
voteTallyZkeyPath: args.voteTallyZkey,
|
|
173
|
+
pollJoiningZkeyPath: args.pollJoiningZkey,
|
|
174
|
+
pollJoinedZkeyPath: args.pollJoinedZkey,
|
|
175
|
+
verifyingKeysRegistry: contractAddress,
|
|
176
|
+
mode: args.mode,
|
|
168
177
|
signer,
|
|
169
178
|
});
|
|
170
|
-
(0, sdk_1.logGreen)({ quiet:
|
|
179
|
+
(0, sdk_1.logGreen)({ quiet: args.quiet, text: (0, sdk_1.success)("Verifying keys match") });
|
|
171
180
|
}
|
|
172
181
|
catch (error) {
|
|
173
182
|
program.error(error.message, { exitCode: 1 });
|
|
174
183
|
}
|
|
175
184
|
});
|
|
176
185
|
program
|
|
177
|
-
.command("
|
|
186
|
+
.command("generateMaciPubKey")
|
|
178
187
|
.description("generate a new MACI public key")
|
|
179
|
-
.requiredOption("-k, --
|
|
188
|
+
.requiredOption("-k, --private-key <privateKey>", "the private key")
|
|
180
189
|
.option("-q, --quiet <quiet>", "whether to print values to the console", (value) => value === "true", false)
|
|
181
190
|
.option("-r, --rpc-provider <provider>", "the rpc provider URL")
|
|
182
|
-
.action((
|
|
183
|
-
const publicKey = (0, sdk_1.generateMaciPublicKey)(
|
|
184
|
-
(0, sdk_1.logGreen)({ quiet:
|
|
191
|
+
.action((args) => {
|
|
192
|
+
const publicKey = (0, sdk_1.generateMaciPublicKey)(args.privateKey);
|
|
193
|
+
(0, sdk_1.logGreen)({ quiet: args.quiet, text: (0, sdk_1.success)(`Public key: ${publicKey}`) });
|
|
185
194
|
});
|
|
186
195
|
program
|
|
187
|
-
.command("
|
|
196
|
+
.command("generateMaciKeyPair")
|
|
188
197
|
.description("generate a new MACI key pair")
|
|
189
198
|
.option("-s, --seed <seed>", "seed value for keypair", (value) => (value ? BigInt(value) : undefined), undefined)
|
|
190
199
|
.option("-q, --quiet <quiet>", "whether to print values to the console", (value) => value === "true", false)
|
|
191
|
-
.action((
|
|
192
|
-
const { publicKey, privateKey } = (0, sdk_1.generateKeypair)({ seed:
|
|
193
|
-
(0, sdk_1.logGreen)({ quiet:
|
|
194
|
-
(0, sdk_1.logGreen)({ quiet:
|
|
200
|
+
.action((args) => {
|
|
201
|
+
const { publicKey, privateKey, publicKeyAsContractParam } = (0, sdk_1.generateKeypair)({ seed: args.seed });
|
|
202
|
+
(0, sdk_1.logGreen)({ quiet: args.quiet, text: (0, sdk_1.success)(`Public key: ${publicKey}`) });
|
|
203
|
+
(0, sdk_1.logGreen)({ quiet: args.quiet, text: (0, sdk_1.success)(`Private key: ${privateKey}`) });
|
|
204
|
+
(0, sdk_1.logGreen)({
|
|
205
|
+
quiet: args.quiet,
|
|
206
|
+
text: (0, sdk_1.success)(`Public key as contract param:
|
|
207
|
+
X: ${publicKeyAsContractParam.x}
|
|
208
|
+
Y: ${publicKeyAsContractParam.y}`),
|
|
209
|
+
});
|
|
195
210
|
});
|
|
196
211
|
program
|
|
197
|
-
.command("
|
|
212
|
+
.command("deployVerifyingKeysRegistry")
|
|
198
213
|
.description("deploy a new verification key registry contract")
|
|
199
214
|
.option("-q, --quiet <quiet>", "whether to print values to the console", (value) => value === "true", false)
|
|
200
215
|
.option("-r, --rpc-provider <provider>", "the rpc provider URL")
|
|
201
|
-
.action(async (
|
|
216
|
+
.action(async (args) => {
|
|
202
217
|
try {
|
|
203
|
-
(0, utils_1.banner)(
|
|
218
|
+
(0, utils_1.banner)(args.quiet);
|
|
204
219
|
const signer = await getSigner();
|
|
205
220
|
// assume that the vkRegistry contract is the first one to be deployed
|
|
206
221
|
const isContractAddressesStoreExists = fs_1.default.existsSync(utils_1.contractAddressesStorePath);
|
|
@@ -209,12 +224,15 @@ program
|
|
|
209
224
|
(0, utils_1.resetContractAddresses)(network?.name);
|
|
210
225
|
}
|
|
211
226
|
// deploy and store the address
|
|
212
|
-
const
|
|
227
|
+
const verifyingKeysRegistryAddress = await (0, sdk_1.deployVerifyingKeysRegistryContract)({ signer });
|
|
213
228
|
await (0, utils_1.storeContractAddresses)({
|
|
214
|
-
data: { [sdk_1.EContracts.
|
|
229
|
+
data: { [sdk_1.EContracts.VerifyingKeysRegistry]: { address: verifyingKeysRegistryAddress, args: [] } },
|
|
215
230
|
signer,
|
|
216
231
|
});
|
|
217
|
-
(0, sdk_1.logGreen)({
|
|
232
|
+
(0, sdk_1.logGreen)({
|
|
233
|
+
quiet: args.quiet,
|
|
234
|
+
text: (0, sdk_1.success)(`VerifyingKeysRegistry deployed at: ${verifyingKeysRegistryAddress}`),
|
|
235
|
+
});
|
|
218
236
|
}
|
|
219
237
|
catch (error) {
|
|
220
238
|
program.error(error.message, { exitCode: 1 });
|
|
@@ -241,36 +259,37 @@ program
|
|
|
241
259
|
program
|
|
242
260
|
.command("deployPoll")
|
|
243
261
|
.description("deploy a new poll")
|
|
244
|
-
.option("-k, --
|
|
245
|
-
.requiredOption("
|
|
246
|
-
.requiredOption("
|
|
247
|
-
.requiredOption("-i, --
|
|
248
|
-
.requiredOption("-b, --
|
|
262
|
+
.option("-k, --verifyingKeysRegistryAddress <verifyingKeysRegistryAddress>", "the vk registry contract address")
|
|
263
|
+
.requiredOption("--start <pollStartDate>", "the poll start date", parseInt)
|
|
264
|
+
.requiredOption("--end <pollEndDate>", "the poll end date", parseInt)
|
|
265
|
+
.requiredOption("-i, --tally-processing-state-tree-depth <tallyProcessingStateTreeDepth>", "the int state tree depth", parseInt)
|
|
266
|
+
.requiredOption("-b, --message-batch-size <messageBatchSize>", "the message batch size", parseInt)
|
|
267
|
+
.requiredOption("-s, --state-tree-depth <stateTreeDepth>", "the state tree depth", parseInt)
|
|
249
268
|
.requiredOption("-v, --vote-option-tree-depth <voteOptionTreeDepth>", "the vote option tree depth", parseInt)
|
|
250
|
-
.requiredOption("-p, --
|
|
251
|
-
.option("-
|
|
269
|
+
.requiredOption("-p, --public-key <publicKey>", "the coordinator public key")
|
|
270
|
+
.option("-m, --mode <mode>", "Voting mode (qv, non-qv, full)", (value) => constants_1.MODE_NAME_TO_ENUM[value], sdk_1.EMode.QV)
|
|
252
271
|
.option("-x, --maci-address <maciAddress>", "the MACI contract address")
|
|
253
|
-
.option("
|
|
272
|
+
.option("--relayers <relayers>", "the relayer addresses", (value) => value.split(",").map((item) => item.trim()))
|
|
254
273
|
.option("-q, --quiet <quiet>", "whether to print values to the console", (value) => value === "true", false)
|
|
255
274
|
.option("-r, --rpc-provider <provider>", "the rpc provider URL")
|
|
256
275
|
.option("-o, --vote-options <voteOptions>", "the number of vote options", parseInt)
|
|
257
276
|
.option("--initial-voice-credits <initialVoiceCredits>", "the initial voice credits", parseInt)
|
|
258
277
|
.option("--initial-voice-credits-proxy <initialVoiceCreditsProxy>", "the initial voice credits proxy address")
|
|
259
278
|
.option("--signup-policy <signupPolicy>", "the signup policy contract address")
|
|
260
|
-
.action(async (
|
|
279
|
+
.action(async (args) => {
|
|
261
280
|
try {
|
|
262
|
-
(0, utils_1.banner)(
|
|
281
|
+
(0, utils_1.banner)(args.quiet);
|
|
263
282
|
const signer = await getSigner();
|
|
264
283
|
const network = await signer.provider?.getNetwork();
|
|
265
|
-
const [
|
|
284
|
+
const [verifyingKeysRegistryAddress, maciAddress, initialVoiceCreditProxyAddress, verifierContractAddress] = (0, utils_1.readContractAddresses)({
|
|
266
285
|
contractNames: [
|
|
267
|
-
sdk_1.EContracts.
|
|
286
|
+
sdk_1.EContracts.VerifyingKeysRegistry,
|
|
268
287
|
sdk_1.EContracts.MACI,
|
|
269
288
|
sdk_1.EContracts.ConstantInitialVoiceCreditProxy,
|
|
270
289
|
sdk_1.EContracts.Verifier,
|
|
271
290
|
],
|
|
272
291
|
network: network?.name,
|
|
273
|
-
defaultAddresses: [
|
|
292
|
+
defaultAddresses: [args.verifyingKeysRegistryAddress, args.maciAddress, args.initialVoiceCreditsProxy],
|
|
274
293
|
});
|
|
275
294
|
const maciContract = sdk_1.MACI__factory.connect(maciAddress, signer);
|
|
276
295
|
const nextPollId = await maciContract.nextPollId();
|
|
@@ -280,39 +299,40 @@ program
|
|
|
280
299
|
contractNames: [policyContractName.toString()],
|
|
281
300
|
keys: [nextPollId.toString()],
|
|
282
301
|
network: network?.name,
|
|
283
|
-
defaultAddresses: [
|
|
302
|
+
defaultAddresses: [args.signupPolicy],
|
|
284
303
|
});
|
|
285
304
|
const { pollId, pollContractAddress, tallyContractAddress, messageProcessorContractAddress, initialVoiceCreditProxyContractAddress, policyContractAddress, } = await (0, sdk_1.deployPoll)({
|
|
286
|
-
initialVoiceCredits:
|
|
287
|
-
pollStartTimestamp:
|
|
288
|
-
pollEndTimestamp:
|
|
289
|
-
|
|
290
|
-
messageBatchSize:
|
|
291
|
-
|
|
292
|
-
|
|
305
|
+
initialVoiceCredits: args.initialVoiceCredits || defaults_1.DEFAULT_INITIAL_VOICE_CREDITS,
|
|
306
|
+
pollStartTimestamp: args.start,
|
|
307
|
+
pollEndTimestamp: args.end,
|
|
308
|
+
tallyProcessingStateTreeDepth: args.tallyProcessingStateTreeDepth,
|
|
309
|
+
messageBatchSize: args.messageBatchSize,
|
|
310
|
+
stateTreeDepth: args.stateTreeDepth,
|
|
311
|
+
voteOptionTreeDepth: args.voteOptionTreeDepth,
|
|
312
|
+
coordinatorPublicKey: domainobjs_1.PublicKey.deserialize(args.publicKey),
|
|
293
313
|
maciAddress,
|
|
294
|
-
|
|
295
|
-
relayers:
|
|
296
|
-
mode:
|
|
314
|
+
verifyingKeysRegistryContractAddress: verifyingKeysRegistryAddress,
|
|
315
|
+
relayers: args.relayers ?? [ethers_1.ZeroAddress],
|
|
316
|
+
mode: args.mode,
|
|
297
317
|
signer,
|
|
298
|
-
voteOptions:
|
|
318
|
+
voteOptions: args.voteOptions ?? defaults_1.DEFAULT_VOTE_OPTIONS,
|
|
299
319
|
verifierContractAddress,
|
|
300
320
|
policyContractAddress: signupPolicyContractAddress,
|
|
301
321
|
initialVoiceCreditProxyContractAddress: initialVoiceCreditProxyAddress,
|
|
302
322
|
});
|
|
303
|
-
(0, sdk_1.logGreen)({ quiet:
|
|
304
|
-
(0, sdk_1.logGreen)({ quiet:
|
|
305
|
-
(0, sdk_1.logGreen)({ quiet:
|
|
323
|
+
(0, sdk_1.logGreen)({ quiet: args.quiet, text: (0, sdk_1.success)(`Poll ID: ${pollId}`) });
|
|
324
|
+
(0, sdk_1.logGreen)({ quiet: args.quiet, text: (0, sdk_1.success)(`Poll contract address: ${pollContractAddress}`) });
|
|
325
|
+
(0, sdk_1.logGreen)({ quiet: args.quiet, text: (0, sdk_1.success)(`Tally contract address: ${tallyContractAddress}`) });
|
|
306
326
|
(0, sdk_1.logGreen)({
|
|
307
|
-
quiet:
|
|
327
|
+
quiet: args.quiet,
|
|
308
328
|
text: (0, sdk_1.success)(`Message processor contract address: ${messageProcessorContractAddress}`),
|
|
309
329
|
});
|
|
310
330
|
(0, sdk_1.logGreen)({
|
|
311
|
-
quiet:
|
|
331
|
+
quiet: args.quiet,
|
|
312
332
|
text: (0, sdk_1.success)(`Initial voice credit proxy contract address: ${initialVoiceCreditProxyContractAddress}`),
|
|
313
333
|
});
|
|
314
334
|
(0, sdk_1.logGreen)({
|
|
315
|
-
quiet:
|
|
335
|
+
quiet: args.quiet,
|
|
316
336
|
text: (0, sdk_1.success)(`Signup policy contract address: ${policyContractAddress}`),
|
|
317
337
|
});
|
|
318
338
|
}
|
|
@@ -323,8 +343,7 @@ program
|
|
|
323
343
|
program
|
|
324
344
|
.command("joinPoll")
|
|
325
345
|
.description("join the poll")
|
|
326
|
-
.requiredOption("-k, --
|
|
327
|
-
.option("-i, --state-index <stateIndex>", "the user's state index", BigInt)
|
|
346
|
+
.requiredOption("-k, --private-key <privateKey>", "the private key")
|
|
328
347
|
.option("-s, --sg-data <sgData>", "the signup policy data")
|
|
329
348
|
.option("-v, --ivcp-data <ivcpData>", "the initial voice credit proxy data")
|
|
330
349
|
.option("-n, --new-voice-credit-balance <newVoiceCreditBalance>", "the voice credit balance of the user for the poll", BigInt)
|
|
@@ -340,38 +359,37 @@ program
|
|
|
340
359
|
.requiredOption("--poll-joining-zkey <pollZkeyPath>", "the poll join zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)")
|
|
341
360
|
.option("-w, --wasm", "whether to use the wasm binaries")
|
|
342
361
|
.option("-r, --rapidsnark <rapidsnark>", "the path to the rapidsnark binary")
|
|
343
|
-
.option("-g, --poll-
|
|
344
|
-
.action(async (
|
|
362
|
+
.option("-g, --poll-witness-generator <pollWitnessGenerator>", "the path to the poll witness generation binary")
|
|
363
|
+
.action(async (args) => {
|
|
345
364
|
try {
|
|
346
365
|
const signer = await getSigner();
|
|
347
366
|
const network = await signer.provider?.getNetwork();
|
|
348
367
|
const [maciAddress] = (0, utils_1.readContractAddresses)({
|
|
349
368
|
contractNames: [sdk_1.EContracts.MACI],
|
|
350
369
|
network: network?.name,
|
|
351
|
-
defaultAddresses: [
|
|
370
|
+
defaultAddresses: [args.maciAddress],
|
|
352
371
|
});
|
|
353
|
-
const privateKey =
|
|
372
|
+
const privateKey = args.privateKey || (await (0, utils_1.promptSensitiveValue)("Insert your MACI private key"));
|
|
354
373
|
const data = await (0, sdk_1.joinPoll)({
|
|
355
374
|
maciAddress,
|
|
356
375
|
privateKey,
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
pollId: cmdObj.pollId,
|
|
376
|
+
stateFile: args.stateFile,
|
|
377
|
+
pollId: args.pollId,
|
|
360
378
|
signer,
|
|
361
|
-
startBlock:
|
|
362
|
-
endBlock:
|
|
363
|
-
blocksPerBatch:
|
|
364
|
-
pollJoiningZkey:
|
|
365
|
-
pollWasm:
|
|
366
|
-
useWasm:
|
|
367
|
-
rapidsnark:
|
|
368
|
-
|
|
369
|
-
sgDataArg:
|
|
370
|
-
ivcpDataArg:
|
|
371
|
-
});
|
|
372
|
-
(0, sdk_1.logGreen)({ quiet:
|
|
373
|
-
(0, sdk_1.logGreen)({ quiet:
|
|
374
|
-
(0, sdk_1.logGreen)({ quiet:
|
|
379
|
+
startBlock: args.startBlock,
|
|
380
|
+
endBlock: args.endBlock,
|
|
381
|
+
blocksPerBatch: args.blocksPerBatch,
|
|
382
|
+
pollJoiningZkey: args.pollJoiningZkey,
|
|
383
|
+
pollWasm: args.pollWasm,
|
|
384
|
+
useWasm: args.wasm,
|
|
385
|
+
rapidsnark: args.rapidsnark,
|
|
386
|
+
pollWitnessGenerator: args.pollWitnessGenerator,
|
|
387
|
+
sgDataArg: args.sgData ?? utils_1.DEFAULT_SG_DATA,
|
|
388
|
+
ivcpDataArg: args.ivcpData ?? utils_1.DEFAULT_IVCP_DATA,
|
|
389
|
+
});
|
|
390
|
+
(0, sdk_1.logGreen)({ quiet: args.quiet, text: (0, sdk_1.info)(`User joined poll with nullifier: ${data.nullifier}`) });
|
|
391
|
+
(0, sdk_1.logGreen)({ quiet: args.quiet, text: (0, sdk_1.info)(`User joined poll with state index: ${data.pollStateIndex}`) });
|
|
392
|
+
(0, sdk_1.logGreen)({ quiet: args.quiet, text: (0, sdk_1.info)(`User joined poll with ${data.voiceCredits} voice credits`) });
|
|
375
393
|
}
|
|
376
394
|
catch (error) {
|
|
377
395
|
program.error(error.message, { exitCode: 1 });
|
|
@@ -381,47 +399,70 @@ program
|
|
|
381
399
|
.command("setVerifyingKeys")
|
|
382
400
|
.description("set the verifying keys")
|
|
383
401
|
.requiredOption("-s, --state-tree-depth <stateTreeDepth>", "the state tree depth", parseInt)
|
|
384
|
-
.requiredOption("-i, --
|
|
402
|
+
.requiredOption("-i, --tally-processing-state-tree-depth <tallyProcessingStateTreeDepth>", "the intermediate state tree depth", parseInt)
|
|
385
403
|
.requiredOption("-v, --vote-option-tree-depth <voteOptionTreeDepth>", "the vote option tree depth", parseInt)
|
|
386
|
-
.requiredOption("-b, --
|
|
404
|
+
.requiredOption("-b, --message-batch-size <messageBatchSize>", "the message batch size", parseInt)
|
|
405
|
+
.option("--poll-state-tree-depth <pollStateTreeDepth>", "the poll state tree depth", parseInt)
|
|
387
406
|
.option("--poll-joining-zkey <pollJoiningZkeyPath>", "the poll joining zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)")
|
|
388
407
|
.option("--poll-joined-zkey <pollJoinedZkeyPath>", "the poll joined zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)")
|
|
389
|
-
.option("--
|
|
390
|
-
.option("--tally-
|
|
391
|
-
.option("--
|
|
392
|
-
.option("--tally-
|
|
393
|
-
.option("
|
|
408
|
+
.option("--message-processor-zkey-qv <messageProcessorZkeyPathQv>", "the message processor qv zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)")
|
|
409
|
+
.option("--vote-tally-zkey-qv <voteTallyZkeyPathQv>", "the vote tally qv zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)")
|
|
410
|
+
.option("--message-processor-zkey-non-qv <messageProcessorZkeyPathNonQv>", "the message processor non-qv zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)")
|
|
411
|
+
.option("--vote-tally-zkey-non-qv <voteTallyZkeyPathNonQv>", "the vote tally non-qv zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)")
|
|
412
|
+
.option("--message-processor-zkey-full <messageProcessorZkeyPathFull>", "the message processor full zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)")
|
|
413
|
+
.option("--vote-tally-zkey-full <tallyVotesZkeyPathFull>", "the vote tally full zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)")
|
|
414
|
+
.option("-m, --modes <modes>", "Comma-separated list of voting modes (qv, non-qv, full)", (value) => value.split(",").map((v) => constants_1.MODE_NAME_TO_ENUM[v.trim()]), [sdk_1.EMode.QV])
|
|
394
415
|
.option("-k, --vk-registry <vkRegistry>", "the vk registry contract address")
|
|
395
416
|
.option("-q, --quiet <quiet>", "whether to print values to the console", (value) => value === "true", false)
|
|
396
417
|
.option("-r, --rpc-provider <provider>", "the rpc provider URL")
|
|
397
|
-
.action(async (
|
|
418
|
+
.action(async (args) => {
|
|
398
419
|
try {
|
|
399
420
|
const signer = await getSigner();
|
|
400
421
|
const network = await signer.provider?.getNetwork();
|
|
401
|
-
const [
|
|
402
|
-
contractNames: [sdk_1.EContracts.
|
|
422
|
+
const [verifyingKeysRegistryAddress] = (0, utils_1.readContractAddresses)({
|
|
423
|
+
contractNames: [sdk_1.EContracts.VerifyingKeysRegistry],
|
|
403
424
|
network: network?.name,
|
|
404
|
-
defaultAddresses: [
|
|
425
|
+
defaultAddresses: [args.vkRegistry],
|
|
405
426
|
});
|
|
406
|
-
const
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
427
|
+
const processKeys = {
|
|
428
|
+
[sdk_1.EMode.QV]: args.messageProcessorZkeyQv,
|
|
429
|
+
[sdk_1.EMode.NON_QV]: args.messageProcessorZkeyNonQv,
|
|
430
|
+
[sdk_1.EMode.FULL]: args.messageProcessorZkeyFull,
|
|
431
|
+
};
|
|
432
|
+
const tallyKeys = {
|
|
433
|
+
[sdk_1.EMode.QV]: args.voteTallyZkeyQv,
|
|
434
|
+
[sdk_1.EMode.NON_QV]: args.voteTallyZkeyNonQv,
|
|
435
|
+
[sdk_1.EMode.FULL]: args.voteTallyZkeyFull,
|
|
436
|
+
};
|
|
437
|
+
const { pollJoiningVerifyingKey, pollJoinedVerifyingKey } = await (0, sdk_1.extractAllVerifyingKeys)({
|
|
438
|
+
pollJoiningZkeyPath: args.pollJoiningZkey,
|
|
439
|
+
pollJoinedZkeyPath: args.pollJoinedZkey,
|
|
440
|
+
});
|
|
441
|
+
const keysResults = await Promise.all(args.modes.map((mode) => (0, sdk_1.extractAllVerifyingKeys)({
|
|
442
|
+
messageProcessorZkeyPath: processKeys[mode],
|
|
443
|
+
voteTallyZkeyPath: tallyKeys[mode],
|
|
444
|
+
})));
|
|
445
|
+
const processVerifyingKeys = [];
|
|
446
|
+
const tallyVerifyingKeys = [];
|
|
447
|
+
keysResults.forEach(({ processVerifyingKey, tallyVerifyingKey }, idx) => {
|
|
448
|
+
if (!processVerifyingKey || !tallyVerifyingKey) {
|
|
449
|
+
throw new Error(`Verifying keys for mode ${args.modes[idx]} are not valid`);
|
|
450
|
+
}
|
|
451
|
+
processVerifyingKeys.push(processVerifyingKey);
|
|
452
|
+
tallyVerifyingKeys.push(tallyVerifyingKey);
|
|
413
453
|
});
|
|
414
454
|
await (0, sdk_1.setVerifyingKeys)({
|
|
415
|
-
stateTreeDepth:
|
|
416
|
-
|
|
417
|
-
voteOptionTreeDepth:
|
|
418
|
-
messageBatchSize:
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
455
|
+
stateTreeDepth: args.stateTreeDepth,
|
|
456
|
+
tallyProcessingStateTreeDepth: args.tallyProcessingStateTreeDepth,
|
|
457
|
+
voteOptionTreeDepth: args.voteOptionTreeDepth,
|
|
458
|
+
messageBatchSize: args.messageBatchSize,
|
|
459
|
+
pollStateTreeDepth: args.pollStateTreeDepth || args.stateTreeDepth,
|
|
460
|
+
pollJoiningVerifyingKey: pollJoiningVerifyingKey,
|
|
461
|
+
pollJoinedVerifyingKey: pollJoinedVerifyingKey,
|
|
462
|
+
processMessagesVerifyingKeys: processVerifyingKeys,
|
|
463
|
+
tallyVotesVerifyingKeys: tallyVerifyingKeys,
|
|
464
|
+
verifyingKeysRegistryAddress,
|
|
465
|
+
modes: args.modes,
|
|
425
466
|
signer,
|
|
426
467
|
});
|
|
427
468
|
}
|
|
@@ -432,9 +473,9 @@ program
|
|
|
432
473
|
program
|
|
433
474
|
.command("publish")
|
|
434
475
|
.description("publish a new message to a MACI Poll contract")
|
|
435
|
-
.requiredOption("-p, --
|
|
476
|
+
.requiredOption("-p, --public-key <publicKey>", "the MACI public key which should replace the user's public key in the state tree")
|
|
436
477
|
.option("-x, --maci-address <maciAddress>", "the MACI contract address")
|
|
437
|
-
.option("-k, --
|
|
478
|
+
.option("-k, --private-key <privateKey>", "your serialized MACI private key")
|
|
438
479
|
.requiredOption("-i, --state-index <stateIndex>", "the user's state index", BigInt)
|
|
439
480
|
.requiredOption("-v, --vote-option-index <voteOptionIndex>", "the vote option index", BigInt)
|
|
440
481
|
.requiredOption("-n, --nonce <nonce>", "the message nonce", BigInt)
|
|
@@ -443,25 +484,25 @@ program
|
|
|
443
484
|
.requiredOption("-w, --new-vote-weight <newVoteWeight>", "the new vote weight", BigInt)
|
|
444
485
|
.option("-q, --quiet <quiet>", "whether to print values to the console", (value) => value === "true", false)
|
|
445
486
|
.option("-r, --rpc-provider <provider>", "the rpc provider URL")
|
|
446
|
-
.action(async (
|
|
487
|
+
.action(async (args) => {
|
|
447
488
|
try {
|
|
448
489
|
const signer = await getSigner();
|
|
449
490
|
const network = await signer.provider?.getNetwork();
|
|
450
491
|
const [maciAddress] = (0, utils_1.readContractAddresses)({
|
|
451
492
|
contractNames: [sdk_1.EContracts.MACI],
|
|
452
493
|
network: network?.name,
|
|
453
|
-
defaultAddresses: [
|
|
494
|
+
defaultAddresses: [args.maciAddress],
|
|
454
495
|
});
|
|
455
|
-
const privateKey =
|
|
496
|
+
const privateKey = args.privateKey || (await (0, utils_1.promptSensitiveValue)("Insert your MACI private key"));
|
|
456
497
|
await (0, sdk_1.publish)({
|
|
457
|
-
|
|
458
|
-
stateIndex:
|
|
459
|
-
voteOptionIndex:
|
|
460
|
-
nonce:
|
|
461
|
-
pollId:
|
|
462
|
-
newVoteWeight:
|
|
498
|
+
publicKey: args.publicKey,
|
|
499
|
+
stateIndex: args.stateIndex,
|
|
500
|
+
voteOptionIndex: args.voteOptionIndex,
|
|
501
|
+
nonce: args.nonce,
|
|
502
|
+
pollId: args.pollId,
|
|
503
|
+
newVoteWeight: args.newVoteWeight,
|
|
463
504
|
maciAddress,
|
|
464
|
-
salt:
|
|
505
|
+
salt: args.salt,
|
|
465
506
|
privateKey,
|
|
466
507
|
signer,
|
|
467
508
|
});
|
|
@@ -476,23 +517,23 @@ program
|
|
|
476
517
|
.option("-q, --quiet <quiet>", "whether to print values to the console", (value) => value === "true", false)
|
|
477
518
|
.option("-x, --maci-address <maciAddress>", "the MACI contract address")
|
|
478
519
|
.requiredOption("-p, --poll-id <pollId>", "the poll id", BigInt)
|
|
479
|
-
.action(async (
|
|
520
|
+
.action(async (args) => {
|
|
480
521
|
try {
|
|
481
522
|
const signer = await getSigner();
|
|
482
523
|
const network = await signer.provider?.getNetwork();
|
|
483
524
|
const [maciAddress] = (0, utils_1.readContractAddresses)({
|
|
484
525
|
contractNames: [sdk_1.EContracts.MACI],
|
|
485
526
|
network: network?.name,
|
|
486
|
-
defaultAddresses: [
|
|
527
|
+
defaultAddresses: [args.maciAddress],
|
|
487
528
|
});
|
|
488
529
|
const receipt = await (0, sdk_1.mergeSignups)({
|
|
489
|
-
pollId:
|
|
530
|
+
pollId: args.pollId,
|
|
490
531
|
maciAddress,
|
|
491
532
|
signer,
|
|
492
533
|
});
|
|
493
|
-
(0, sdk_1.logGreen)({ quiet:
|
|
534
|
+
(0, sdk_1.logGreen)({ quiet: args.quiet, text: (0, sdk_1.info)(`Transaction hash: ${receipt.hash}`) });
|
|
494
535
|
(0, sdk_1.logGreen)({
|
|
495
|
-
quiet:
|
|
536
|
+
quiet: args.quiet,
|
|
496
537
|
text: (0, sdk_1.success)(`Executed mergeSignups(); gas used: ${receipt.gasUsed.toString()}`),
|
|
497
538
|
});
|
|
498
539
|
}
|
|
@@ -506,37 +547,39 @@ program
|
|
|
506
547
|
.requiredOption("-s, --seconds <seconds>", "the number of seconds to fast-forward", parseInt)
|
|
507
548
|
.option("-q, --quiet <quiet>", "whether to print values to the console", (value) => value === "true", false)
|
|
508
549
|
.option("-r, --rpc-provider <provider>", "the rpc provider URL")
|
|
509
|
-
.action(async (
|
|
550
|
+
.action(async (args) => {
|
|
510
551
|
try {
|
|
511
|
-
(0, utils_1.banner)(
|
|
552
|
+
(0, utils_1.banner)(args.quiet);
|
|
512
553
|
const signer = await getSigner();
|
|
513
|
-
await (0, sdk_1.timeTravel)({ seconds:
|
|
514
|
-
(0, sdk_1.logGreen)({ quiet:
|
|
554
|
+
await (0, sdk_1.timeTravel)({ seconds: args.seconds, signer });
|
|
555
|
+
(0, sdk_1.logGreen)({ quiet: args.quiet, text: (0, sdk_1.success)(`Fast-forwarded ${args.seconds} seconds`) });
|
|
515
556
|
}
|
|
516
557
|
catch (error) {
|
|
517
558
|
program.error(error.message, { exitCode: 1 });
|
|
518
559
|
}
|
|
519
560
|
});
|
|
520
561
|
program
|
|
521
|
-
.command("
|
|
562
|
+
.command("extractVerifyingKeyToFile")
|
|
522
563
|
.description("extract vkey to json file")
|
|
523
564
|
.requiredOption("--poll-joining-zkey <pollJoiningZkey>", "the poll joining zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)")
|
|
524
565
|
.requiredOption("--poll-joined-zkey <pollJoinedZkey>", "the poll joined zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)")
|
|
525
|
-
.requiredOption("--
|
|
526
|
-
.requiredOption("--tally-
|
|
527
|
-
.requiredOption("--
|
|
528
|
-
.requiredOption("--
|
|
566
|
+
.requiredOption("--message-processor-zkey-qv <messageProcessorZkeyPathQv>", "the message processor qv zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)")
|
|
567
|
+
.requiredOption("--vote-tally-zkey-qv <voteTallyZkeyPathQv>", "the vote tally qv zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)")
|
|
568
|
+
.requiredOption("--message-processor-zkey-non-qv <messageProcessorZkeyPathNonQv>", "the message processor non-qv zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)")
|
|
569
|
+
.requiredOption("--message-processor-zkey-full <messageProcessorZkeyPathFull>", "the message processor full zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)")
|
|
570
|
+
.requiredOption("--vote-tally-zkey-non-qv <voteTallyZkeyPathNonQv>", "the vote tally non-qv zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)")
|
|
529
571
|
.requiredOption("-o, --output-file <outputFile>", "the output file path of extracted vkeys")
|
|
530
|
-
.action(async (
|
|
572
|
+
.action(async (args) => {
|
|
531
573
|
try {
|
|
532
|
-
await (0, sdk_1.
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
574
|
+
await (0, sdk_1.extractVerifyingKeyToFile)({
|
|
575
|
+
messageProcessorZkeyPathQv: args.messageProcessorZkeyQv,
|
|
576
|
+
messageProcessorZkeyPathFull: args.messageProcessorZkeyFull,
|
|
577
|
+
voteTallyZkeyPathQv: args.voteTallyZkeyQv,
|
|
578
|
+
messageProcessorZkeyPathNonQv: args.messageProcessorZkeyNonQv,
|
|
579
|
+
voteTallyZkeyPathNonQv: args.voteTallyZkeyNonQv,
|
|
580
|
+
pollJoiningZkeyPath: args.pollJoiningZkey,
|
|
581
|
+
pollJoinedZkeyPath: args.pollJoinedZkey,
|
|
582
|
+
outputFilePath: args.outputFile,
|
|
540
583
|
});
|
|
541
584
|
}
|
|
542
585
|
catch (error) {
|
|
@@ -546,28 +589,28 @@ program
|
|
|
546
589
|
program
|
|
547
590
|
.command("signup")
|
|
548
591
|
.description("Sign up to a MACI contract")
|
|
549
|
-
.requiredOption("-p, --
|
|
592
|
+
.requiredOption("-p, --public-key <publicKey>", "the MACI public key")
|
|
550
593
|
.option("-x, --maci-address <maciAddress>", "the MACI contract address")
|
|
551
594
|
.option("-s, --sg-data <sgData>", "the signup gateway data")
|
|
552
595
|
.option("-q, --quiet <quiet>", "whether to print values to the console", (value) => value === "true", false)
|
|
553
596
|
.option("-r, --rpc-provider <provider>", "the rpc provider URL")
|
|
554
|
-
.action(async (
|
|
597
|
+
.action(async (args) => {
|
|
555
598
|
try {
|
|
556
599
|
const signer = await getSigner();
|
|
557
600
|
const network = await signer.provider?.getNetwork();
|
|
558
601
|
const [maciAddress] = (0, utils_1.readContractAddresses)({
|
|
559
602
|
contractNames: [sdk_1.EContracts.MACI],
|
|
560
603
|
network: network?.name,
|
|
561
|
-
defaultAddresses: [
|
|
604
|
+
defaultAddresses: [args.maciAddress],
|
|
562
605
|
});
|
|
563
606
|
const data = await (0, sdk_1.signup)({
|
|
564
|
-
|
|
607
|
+
maciPublicKey: args.publicKey,
|
|
565
608
|
maciAddress,
|
|
566
|
-
sgData:
|
|
609
|
+
sgData: args.sgData ?? utils_1.DEFAULT_SG_DATA,
|
|
567
610
|
signer,
|
|
568
611
|
});
|
|
569
612
|
(0, sdk_1.logGreen)({
|
|
570
|
-
quiet:
|
|
613
|
+
quiet: args.quiet,
|
|
571
614
|
text: (0, sdk_1.success)(`State index: ${data.stateIndex.toString()}\n Transaction hash: ${data.transactionHash}`),
|
|
572
615
|
});
|
|
573
616
|
}
|
|
@@ -578,28 +621,28 @@ program
|
|
|
578
621
|
program
|
|
579
622
|
.command("isRegisteredUser")
|
|
580
623
|
.description("Checks if user is registered with their public key and get their data")
|
|
581
|
-
.requiredOption("-p, --
|
|
624
|
+
.requiredOption("-p, --public-key <publicKey>", "the MACI public key")
|
|
582
625
|
.option("-x, --maci-address <maciAddress>", "the MACI contract address")
|
|
583
626
|
.option("-q, --quiet <quiet>", "whether to print values to the console", (value) => value === "true", false)
|
|
584
|
-
.action(async (
|
|
627
|
+
.action(async (args) => {
|
|
585
628
|
try {
|
|
586
629
|
const signer = await getSigner();
|
|
587
630
|
const network = await signer.provider?.getNetwork();
|
|
588
631
|
const [maciAddress] = (0, utils_1.readContractAddresses)({
|
|
589
632
|
contractNames: [sdk_1.EContracts.MACI],
|
|
590
633
|
network: network?.name,
|
|
591
|
-
defaultAddresses: [
|
|
634
|
+
defaultAddresses: [args.maciAddress],
|
|
592
635
|
});
|
|
593
636
|
const data = await (0, sdk_1.getSignedupUserData)({
|
|
594
|
-
|
|
637
|
+
maciPublicKey: args.publicKey,
|
|
595
638
|
maciAddress,
|
|
596
639
|
signer,
|
|
597
640
|
});
|
|
598
641
|
if (data.isRegistered) {
|
|
599
|
-
(0, sdk_1.logGreen)({ quiet:
|
|
642
|
+
(0, sdk_1.logGreen)({ quiet: args.quiet, text: (0, sdk_1.success)(`State index: ${data.stateIndex?.toString()}`) });
|
|
600
643
|
}
|
|
601
644
|
else {
|
|
602
|
-
(0, sdk_1.logRed)({ quiet:
|
|
645
|
+
(0, sdk_1.logRed)({ quiet: args.quiet, text: "User is not registered" });
|
|
603
646
|
}
|
|
604
647
|
}
|
|
605
648
|
catch (error) {
|
|
@@ -609,32 +652,32 @@ program
|
|
|
609
652
|
program
|
|
610
653
|
.command("isJoinedUser")
|
|
611
654
|
.description("Checks if user is joined to the poll with public key")
|
|
612
|
-
.requiredOption("-p, --
|
|
655
|
+
.requiredOption("-p, --public-key <publicKey>", "the MACI public key")
|
|
613
656
|
.option("-x, --maci-address <maciAddress>", "the MACI contract address")
|
|
614
657
|
.requiredOption("-o, --poll-id <pollId>", "the poll id", BigInt)
|
|
615
658
|
.option("-q, --quiet <quiet>", "whether to print values to the console", (value) => value === "true", false)
|
|
616
659
|
.option("--start-block <startBlock>", "the block number to start looking for events from", parseInt)
|
|
617
660
|
.option("--end-block <endBlock>", "the block number to end looking for events from", parseInt)
|
|
618
661
|
.option("--blocks-per-batch <blockPerBatch>", "the number of blocks to process per batch", parseInt)
|
|
619
|
-
.action(async (
|
|
662
|
+
.action(async (args) => {
|
|
620
663
|
try {
|
|
621
664
|
const signer = await getSigner();
|
|
622
665
|
const network = await signer.provider?.getNetwork();
|
|
623
666
|
const [maciAddress] = (0, utils_1.readContractAddresses)({
|
|
624
667
|
contractNames: [sdk_1.EContracts.MACI],
|
|
625
668
|
network: network?.name,
|
|
626
|
-
defaultAddresses: [
|
|
669
|
+
defaultAddresses: [args.maciAddress],
|
|
627
670
|
});
|
|
628
671
|
const data = await (0, sdk_1.getJoinedUserData)({
|
|
629
|
-
|
|
630
|
-
startBlock:
|
|
672
|
+
pollPublicKey: args.publicKey,
|
|
673
|
+
startBlock: args.startBlock,
|
|
631
674
|
maciAddress,
|
|
632
|
-
pollId:
|
|
675
|
+
pollId: args.pollId,
|
|
633
676
|
signer,
|
|
634
677
|
});
|
|
635
678
|
if (data.isJoined) {
|
|
636
679
|
(0, sdk_1.logGreen)({
|
|
637
|
-
quiet:
|
|
680
|
+
quiet: args.quiet,
|
|
638
681
|
text: (0, sdk_1.success)([
|
|
639
682
|
`Poll state index: ${data.pollStateIndex?.toString()}, registered: ${data.isJoined}`,
|
|
640
683
|
`Voice credits: ${data.voiceCredits?.toString()}`,
|
|
@@ -642,7 +685,7 @@ program
|
|
|
642
685
|
});
|
|
643
686
|
}
|
|
644
687
|
else {
|
|
645
|
-
(0, sdk_1.logRed)({ quiet:
|
|
688
|
+
(0, sdk_1.logRed)({ quiet: args.quiet, text: "User has not joined the poll" });
|
|
646
689
|
}
|
|
647
690
|
}
|
|
648
691
|
catch (error) {
|
|
@@ -654,29 +697,34 @@ program
|
|
|
654
697
|
.description("Get deployed poll from MACI contract")
|
|
655
698
|
.option("-p, --poll <poll>", "the poll id")
|
|
656
699
|
.option("-x, --maci-address <maciAddress>", "the MACI contract address")
|
|
657
|
-
.action(async (
|
|
700
|
+
.action(async (args) => {
|
|
658
701
|
try {
|
|
659
702
|
const signer = await getSigner();
|
|
660
703
|
const network = await signer.provider?.getNetwork();
|
|
661
704
|
const [maciAddress] = (0, utils_1.readContractAddresses)({
|
|
662
705
|
contractNames: [sdk_1.EContracts.MACI],
|
|
663
706
|
network: network?.name,
|
|
664
|
-
defaultAddresses: [
|
|
707
|
+
defaultAddresses: [args.maciAddress],
|
|
665
708
|
});
|
|
666
709
|
const details = await (0, sdk_1.getPoll)({
|
|
667
|
-
pollId:
|
|
710
|
+
pollId: args.poll,
|
|
668
711
|
maciAddress,
|
|
669
712
|
signer,
|
|
670
713
|
});
|
|
714
|
+
const modeNames = {
|
|
715
|
+
[sdk_1.EMode.QV]: "Quadratic Voting",
|
|
716
|
+
[sdk_1.EMode.NON_QV]: "Non-Quadratic Voting",
|
|
717
|
+
[sdk_1.EMode.FULL]: "Full Credits Voting",
|
|
718
|
+
};
|
|
671
719
|
(0, sdk_1.logGreen)({
|
|
672
720
|
quiet: true,
|
|
673
721
|
text: (0, sdk_1.success)([
|
|
674
722
|
`ID: ${details.id}`,
|
|
675
723
|
`Start time: ${new Date(Number(details.startDate) * 1000).toString()}`,
|
|
676
724
|
`End time: ${new Date(Number(details.endDate) * 1000).toString()}`,
|
|
677
|
-
`Number of signups ${details.
|
|
725
|
+
`Number of signups ${details.totalSignups}`,
|
|
678
726
|
`State tree merged: ${details.isMerged}`,
|
|
679
|
-
`Mode: ${details.mode
|
|
727
|
+
`Mode: ${modeNames[details.mode]}`,
|
|
680
728
|
].join("\n")),
|
|
681
729
|
});
|
|
682
730
|
}
|
|
@@ -691,15 +739,15 @@ program
|
|
|
691
739
|
.requiredOption("-w, --address <address>", "the address to fund")
|
|
692
740
|
.option("-q, --quiet <quiet>", "whether to print values to the console", (value) => value === "true", false)
|
|
693
741
|
.option("-r, --rpc-provider <provider>", "the rpc provider URL")
|
|
694
|
-
.action(async (
|
|
742
|
+
.action(async (args) => {
|
|
695
743
|
try {
|
|
696
|
-
(0, utils_1.banner)(
|
|
744
|
+
(0, utils_1.banner)(args.quiet);
|
|
697
745
|
const signer = await getSigner();
|
|
698
|
-
const hash = await (0, sdk_1.fundWallet)({ amount:
|
|
699
|
-
(0, sdk_1.logYellow)({ quiet:
|
|
746
|
+
const hash = await (0, sdk_1.fundWallet)({ amount: args.amount, address: args.address, signer });
|
|
747
|
+
(0, sdk_1.logYellow)({ quiet: args.quiet, text: (0, sdk_1.info)(`Transaction hash: ${hash}`) });
|
|
700
748
|
(0, sdk_1.logGreen)({
|
|
701
|
-
quiet:
|
|
702
|
-
text: (0, sdk_1.success)(`Successfully funded ${
|
|
749
|
+
quiet: args.quiet,
|
|
750
|
+
text: (0, sdk_1.success)(`Successfully funded ${args.address} with ${args.amount} wei`),
|
|
703
751
|
});
|
|
704
752
|
}
|
|
705
753
|
catch (error) {
|
|
@@ -714,34 +762,34 @@ program
|
|
|
714
762
|
.option("-x, --maci-address <maciAddress>", "the MACI contract address")
|
|
715
763
|
.option("-q, --quiet <quiet>", "whether to print values to the console", (value) => value === "true", false)
|
|
716
764
|
.option("-r, --rpc-provider <provider>", "the rpc provider URL")
|
|
717
|
-
.action(async (
|
|
765
|
+
.action(async (args) => {
|
|
718
766
|
try {
|
|
719
|
-
(0, utils_1.banner)(
|
|
767
|
+
(0, utils_1.banner)(args.quiet);
|
|
720
768
|
const signer = await getSigner();
|
|
721
769
|
const network = await signer.provider?.getNetwork();
|
|
722
770
|
// read the tally file
|
|
723
|
-
const isTallyFileExists = fs_1.default.existsSync(
|
|
724
|
-
if (!
|
|
725
|
-
throw new Error(`Unable to open ${
|
|
771
|
+
const isTallyFileExists = fs_1.default.existsSync(args.tallyFile);
|
|
772
|
+
if (!args.tallyFile || !isTallyFileExists) {
|
|
773
|
+
throw new Error(`Unable to open ${args.tallyFile}`);
|
|
726
774
|
}
|
|
727
|
-
const tallyData = await (0, utils_1.readJSONFile)(
|
|
775
|
+
const tallyData = await (0, utils_1.readJSONFile)(args.tallyFile);
|
|
728
776
|
const [maciAddress] = (0, utils_1.readContractAddresses)({
|
|
729
777
|
contractNames: [sdk_1.EContracts.MACI],
|
|
730
778
|
network: network?.name,
|
|
731
|
-
defaultAddresses: [
|
|
779
|
+
defaultAddresses: [args.maciAddress],
|
|
732
780
|
});
|
|
733
|
-
const pollParams = await (0, sdk_1.getPollParams)({ pollId:
|
|
781
|
+
const pollParams = await (0, sdk_1.getPollParams)({ pollId: args.pollId, maciContractAddress: maciAddress, signer });
|
|
734
782
|
const tallyCommitments = (0, sdk_1.generateTallyCommitments)({
|
|
735
783
|
tallyData,
|
|
736
784
|
voteOptionTreeDepth: pollParams.voteOptionTreeDepth,
|
|
737
785
|
});
|
|
738
786
|
await (0, sdk_1.verify)({
|
|
739
787
|
tallyData,
|
|
740
|
-
pollId:
|
|
788
|
+
pollId: args.pollId,
|
|
741
789
|
maciAddress,
|
|
742
790
|
signer,
|
|
743
791
|
tallyCommitments,
|
|
744
|
-
|
|
792
|
+
totalVoteOptions: pollParams.totalVoteOptions,
|
|
745
793
|
voteOptionTreeDepth: pollParams.voteOptionTreeDepth,
|
|
746
794
|
});
|
|
747
795
|
}
|
|
@@ -750,34 +798,34 @@ program
|
|
|
750
798
|
}
|
|
751
799
|
});
|
|
752
800
|
program
|
|
753
|
-
.command("
|
|
801
|
+
.command("generateProofs")
|
|
754
802
|
.description("generate the proofs for a poll")
|
|
755
|
-
.option("-k, --
|
|
803
|
+
.option("-k, --private-key <privateKey>", "your serialized MACI private key")
|
|
756
804
|
.option("-x, --maci-address <maciAddress>", "the MACI contract address")
|
|
757
805
|
.requiredOption("-o, --poll-id <pollId>", "the poll id", BigInt)
|
|
758
806
|
.requiredOption("-t, --tally-file <tallyFile>", "the tally file with results, per vote option spent credits, spent voice credits total")
|
|
759
807
|
.option("-r, --rapidsnark <rapidsnark>", "the path to the rapidsnark binary")
|
|
760
|
-
.option("-g, --
|
|
761
|
-
.option("--
|
|
762
|
-
.option("--tally-
|
|
763
|
-
.option("--tally-
|
|
808
|
+
.option("-g, --message-processor-witness-generator <messageProcessorWitnessGenerator>", "the path to the process witness generation binary")
|
|
809
|
+
.option("--message-processor-witnessDat <messageProcessorWitnessDat>", "the path to the process witness dat file")
|
|
810
|
+
.option("--vote-tally-witness-generator <voteTallyWitnessGenerator>", "the path to the tally witness generation binary")
|
|
811
|
+
.option("--vote-tally-witnessDat <voteTallyWitnessDat>", "the path to the tally witness dat file")
|
|
764
812
|
.requiredOption("--poll-joining-zkey <processJoinZkey>", "the path to the poll join zkey")
|
|
765
|
-
.requiredOption("--
|
|
766
|
-
.requiredOption("--tally-zkey <
|
|
813
|
+
.requiredOption("--message-processor-zkey <messageProcessorZkey>", "the path to the process zkey")
|
|
814
|
+
.requiredOption("--vote-tally-zkey <voteTallyZkey>", "the path to the tally zkey")
|
|
767
815
|
.option("-q, --quiet <quiet>", "whether to print values to the console", (value) => value === "true", false)
|
|
768
816
|
.option("-p, --rpc-provider <provider>", "the rpc provider URL")
|
|
769
817
|
.requiredOption("-f, --output <outputDir>", "the output directory for proofs")
|
|
770
818
|
.option("--transaction-hash <transactionHash>", "transaction hash of MACI contract creation")
|
|
771
819
|
.option("-w, --wasm", "whether to use the wasm binaries")
|
|
772
|
-
.option("--
|
|
773
|
-
.option("--tally-wasm <
|
|
820
|
+
.option("--message-processor-wasm <messageProcessorWasm>", "the path to the process witness generation wasm binary")
|
|
821
|
+
.option("--vote-tally-wasm <voteTallyWasm>", "the path to the tally witness generation wasm binary")
|
|
774
822
|
.option("--state-file <stateFile>", "the path to the state file containing the serialized maci state")
|
|
775
823
|
.option("--start-block <startBlock>", "the block number to start looking for events from", parseInt)
|
|
776
824
|
.option("--end-block <endBlock>", "the block number to end looking for events from", parseInt)
|
|
777
825
|
.option("--blocks-per-batch <blockPerBatch>", "the number of blocks to process per batch", parseInt)
|
|
778
|
-
.option("-
|
|
826
|
+
.option("-m, --mode <mode>", "Voting mode (qv, non-qv, full)", (value) => constants_1.MODE_NAME_TO_ENUM[value], sdk_1.EMode.QV)
|
|
779
827
|
.option("-b, --ipfs-message-backup-files <ipfsMessageBackupFiles>", "Backup files for ipfs messages (name format: ipfsHash1.json, ipfsHash2.json, ..., ipfsHashN.json)", (value) => value?.split(/\s*,\s*/))
|
|
780
|
-
.action(async ({ quiet, maciAddress, pollId, ipfsMessageBackupFiles, stateFile, startBlock, endBlock, blocksPerBatch,
|
|
828
|
+
.action(async ({ quiet, maciAddress, pollId, ipfsMessageBackupFiles, stateFile, startBlock, endBlock, blocksPerBatch, privateKey, transactionHash, output, tallyFile, voteTallyZkey, voteTallyWitnessGenerator, voteTallyWasm, messageProcessorZkey, messageProcessorWitnessGenerator, messageProcessorWasm, mode, voteTallyWitnessDat, messageProcessorWitnessDat, wasm, rapidsnark, }) => {
|
|
781
829
|
try {
|
|
782
830
|
(0, utils_1.banner)(quiet);
|
|
783
831
|
const signer = await getSigner();
|
|
@@ -787,7 +835,7 @@ program
|
|
|
787
835
|
network: network?.name,
|
|
788
836
|
defaultAddresses: [maciAddress],
|
|
789
837
|
});
|
|
790
|
-
const coordinatorPrivateKey =
|
|
838
|
+
const coordinatorPrivateKey = privateKey || (await (0, utils_1.promptSensitiveValue)("Insert your MACI private key"));
|
|
791
839
|
await (0, sdk_1.generateProofs)({
|
|
792
840
|
maciAddress: maciContractAddress,
|
|
793
841
|
coordinatorPrivateKey,
|
|
@@ -801,15 +849,15 @@ program
|
|
|
801
849
|
signer,
|
|
802
850
|
outputDir: output,
|
|
803
851
|
tallyFile,
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
852
|
+
voteTallyZkey,
|
|
853
|
+
voteTallyWitnessGenerator,
|
|
854
|
+
voteTallyWasm,
|
|
855
|
+
messageProcessorZkey,
|
|
856
|
+
messageProcessorWitnessGenerator,
|
|
857
|
+
messageProcessorWasm,
|
|
858
|
+
mode,
|
|
859
|
+
voteTallyWitnessDatFile: voteTallyWitnessDat,
|
|
860
|
+
messageProcessorWitnessDatFile: messageProcessorWitnessDat,
|
|
813
861
|
useWasm: wasm,
|
|
814
862
|
rapidsnark,
|
|
815
863
|
});
|
|
@@ -819,12 +867,12 @@ program
|
|
|
819
867
|
}
|
|
820
868
|
});
|
|
821
869
|
program
|
|
822
|
-
.command("
|
|
870
|
+
.command("generateLocalState")
|
|
823
871
|
.description("generate a local MACI state from the smart contracts events")
|
|
824
872
|
.requiredOption("-o, --output <outputPath>", "the path where to write the state")
|
|
825
873
|
.requiredOption("-p, --poll-id <pollId>", "the id of the poll", BigInt)
|
|
826
874
|
.option("-x, --maci-address <maciAddress>", "the MACI contract address")
|
|
827
|
-
.option("-k, --
|
|
875
|
+
.option("-k, --private-key <privateKey>", "your serialized MACI private key")
|
|
828
876
|
.option("--start-block <startBlock>", "the start block number", parseInt)
|
|
829
877
|
.option("--end-block <endBlock>", "the end block number", parseInt)
|
|
830
878
|
.option("--blocks-per-batch <blockPerBatch>", "the blocks per batch", parseInt)
|
|
@@ -834,30 +882,30 @@ program
|
|
|
834
882
|
.option("-r, --rpc-provider <provider>", "the rpc provider URL")
|
|
835
883
|
.option("-b, --ipfs-message-backup-files <ipfsMessageBackupFiles>", "Backup files for ipfs messages (name format: ipfsHash1.json, ipfsHash2.json, ..., ipfsHashN.json)", (value) => value?.split(/\s*,\s*/))
|
|
836
884
|
.option("-l, --logs-output <logsOutputPath>", "the path where to save the logs for debugging and auditing purposes")
|
|
837
|
-
.action(async (
|
|
885
|
+
.action(async (args) => {
|
|
838
886
|
try {
|
|
839
887
|
const signer = await getSigner();
|
|
840
888
|
const network = await signer.provider?.getNetwork();
|
|
841
889
|
const [maciAddress] = (0, utils_1.readContractAddresses)({
|
|
842
890
|
contractNames: [sdk_1.EContracts.MACI],
|
|
843
891
|
network: network?.name,
|
|
844
|
-
defaultAddresses: [
|
|
892
|
+
defaultAddresses: [args.maciAddress],
|
|
845
893
|
});
|
|
846
|
-
const coordinatorPrivateKey =
|
|
894
|
+
const coordinatorPrivateKey = args.privateKey || (await (0, utils_1.promptSensitiveValue)("Insert your MACI private key"));
|
|
847
895
|
await (0, sdk_1.generateMaciState)({
|
|
848
|
-
outputPath:
|
|
849
|
-
pollId:
|
|
896
|
+
outputPath: args.output.toString(),
|
|
897
|
+
pollId: args.pollId,
|
|
850
898
|
maciAddress,
|
|
851
899
|
coordinatorPrivateKey,
|
|
852
|
-
provider:
|
|
853
|
-
endBlock:
|
|
854
|
-
startBlock:
|
|
855
|
-
blockPerBatch:
|
|
856
|
-
transactionHash:
|
|
857
|
-
ipfsMessageBackupFiles:
|
|
858
|
-
sleep:
|
|
900
|
+
provider: args.rpcProvider,
|
|
901
|
+
endBlock: args.endBlock,
|
|
902
|
+
startBlock: args.startBlock,
|
|
903
|
+
blockPerBatch: args.blocksPerBatch,
|
|
904
|
+
transactionHash: args.transactionHash,
|
|
905
|
+
ipfsMessageBackupFiles: args.ipfsMessageBackupFiles,
|
|
906
|
+
sleep: args.sleep,
|
|
859
907
|
signer,
|
|
860
|
-
logsOutputPath:
|
|
908
|
+
logsOutputPath: args.logsOutput,
|
|
861
909
|
});
|
|
862
910
|
}
|
|
863
911
|
catch (error) {
|
|
@@ -872,20 +920,20 @@ program
|
|
|
872
920
|
.option("-q, --quiet <quiet>", "whether to print values to the console", (value) => value === "true", false)
|
|
873
921
|
.option("-r, --rpc-provider <provider>", "the rpc provider URL")
|
|
874
922
|
.option("-x, --maci-address <maciAddress>", "the MACI contract address")
|
|
875
|
-
.requiredOption("-f, --proof-dir <proofDir>", "the proof output directory from the
|
|
876
|
-
.action(async (
|
|
923
|
+
.requiredOption("-f, --proof-dir <proofDir>", "the proof output directory from the generateProofs subcommand")
|
|
924
|
+
.action(async (args) => {
|
|
877
925
|
try {
|
|
878
926
|
const signer = await getSigner();
|
|
879
927
|
const network = await signer.provider?.getNetwork();
|
|
880
928
|
const [maciAddress] = (0, utils_1.readContractAddresses)({
|
|
881
929
|
contractNames: [sdk_1.EContracts.MACI],
|
|
882
930
|
network: network?.name,
|
|
883
|
-
defaultAddresses: [
|
|
931
|
+
defaultAddresses: [args.maciAddress],
|
|
884
932
|
});
|
|
885
933
|
await (0, sdk_1.proveOnChain)({
|
|
886
|
-
pollId:
|
|
887
|
-
tallyFile:
|
|
888
|
-
proofDir:
|
|
934
|
+
pollId: args.pollId,
|
|
935
|
+
tallyFile: args.tallyFile,
|
|
936
|
+
proofDir: args.proofDir,
|
|
889
937
|
maciAddress,
|
|
890
938
|
signer,
|
|
891
939
|
});
|