updating ark cli

This commit is contained in:
Jaremy Creechley 2024-05-02 18:16:00 +03:00
parent cfd8059244
commit 8f7aec5451
No known key found for this signature in database
GPG Key ID: 4E66FB67B21D3300

View File

@ -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)