From 8f7aec5451d0ee31055835a120c8e2eae8266c8f Mon Sep 17 00:00:00 2001 From: Jaremy Creechley Date: Thu, 2 May 2024 18:16:00 +0300 Subject: [PATCH] updating ark cli --- benchmarks/codex_ark_prover_cli.nim | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/benchmarks/codex_ark_prover_cli.nim b/benchmarks/codex_ark_prover_cli.nim index cd8ee6cd..688b3354 100644 --- a/benchmarks/codex_ark_prover_cli.nim +++ b/benchmarks/codex_ark_prover_cli.nim @@ -128,6 +128,20 @@ proc run*() = if files.inputs == "": files.inputs = dir / fmt"input.json" + var fileErrors = false + template checkFile(file, name: untyped) = + if file == "" or not file.fileExists(): + echo "\nERROR: must provide `" & name & "` file" + fileErrors = true + + checkFile files.inputs, "inputs.json" + checkFile files.r1cs, "r1cs" + checkFile files.wasm, "wasm" + checkFile files.zkey, "zkey" + + if fileErrors: + quit 1 + var inputData = files.inputs.readFile() inputs: JsonNode = !JsonNode.parse(inputData)