From 01e3f0d6807137fb01c085b88cfaf63661e4a946 Mon Sep 17 00:00:00 2001 From: Jordi Baylina Date: Sun, 9 Aug 2020 17:19:53 +0200 Subject: [PATCH] Poseidon genContract nInputs as parameters --- src/poseidon_printcontract.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/poseidon_printcontract.js b/src/poseidon_printcontract.js index 04b5cce..0ae977d 100644 --- a/src/poseidon_printcontract.js +++ b/src/poseidon_printcontract.js @@ -1,5 +1,13 @@ const poseidonGenContract = require("./poseidon_gencontract"); +if (process.argv.length != 3) { + console.log("Usage: node poseidon_gencontract.js [numberOfInputs]"); + process.exit(1); +} -console.log(poseidonGenContract.createCode(5)); +const nInputs = Number(process.argv[2]); + +console.log(nInputs); + +console.log(poseidonGenContract.createCode(nInputs));