diff --git a/examples/notebooks/ezkl_demo.ipynb b/examples/notebooks/ezkl_demo.ipynb index 7ad7b8204..c5eea3199 100644 --- a/examples/notebooks/ezkl_demo.ipynb +++ b/examples/notebooks/ezkl_demo.ipynb @@ -681,13 +681,21 @@ "source": [ "onchain_input_array = []\n", "\n", - "for value in proof[\"instances\"]:\n", - " for field_element in value:\n", - " onchain_input_array.append(ezkl.vecu64_to_int(field_element))\n", + "# using a loop\n", + "# avoiding printing last comma\n", + "formatted_output = \"[\"\n", + "for i, value in enumerate(proof[\"instances\"]):\n", + " for j, field_element in enumerate(value):\n", + " onchain_input_array.append(ezkl.vecu64_to_felt(field_element))\n", + " formatted_output += str(onchain_input_array[-1])\n", + " if j != len(value) - 1:\n", + " formatted_output += \", \"\n", + " formatted_output += \"]\"\n", + "\n", "# This will be the values you use onchain\n", "# copy them over to remix and see if they verify\n", "# What happens when you change a value?\n", - "print(\"pubInputs: \", onchain_input_array)\n", + "print(\"pubInputs: \", formatted_output)\n", "print(\"proof: \", \"0x\" + proof[\"proof\"])" ] },