diff --git a/hydra/garaga/starknet/groth16_contract_generator/parsing_utils.py b/hydra/garaga/starknet/groth16_contract_generator/parsing_utils.py index c2a8374a..0901b1e7 100644 --- a/hydra/garaga/starknet/groth16_contract_generator/parsing_utils.py +++ b/hydra/garaga/starknet/groth16_contract_generator/parsing_utils.py @@ -1,3 +1,4 @@ +import codecs import dataclasses import hashlib import json @@ -328,14 +329,14 @@ def from_dict( proof = data try: - seal = io.to_hex_str(find_item_from_key_patterns(data, ["seal"])) - image_id = io.to_hex_str(find_item_from_key_patterns(data, ["image_id"])) - journal = io.to_hex_str(find_item_from_key_patterns(data, ["journal"])) + seal = find_item_from_key_patterns(data, ["seal"]) + image_id = find_item_from_key_patterns(data, ["image_id"]) + journal = find_item_from_key_patterns(data, ["journal"]) return Groth16Proof._from_risc0( - seal=bytes.fromhex(seal[2:]), - image_id=bytes.fromhex(image_id[2:]), - journal=bytes.fromhex(journal[2:]), + seal=codecs.decode(seal[2:].replace("\\x", ""), "hex"), + image_id=codecs.decode(image_id[2:].replace("\\x", ""), "hex"), + journal=codecs.decode(journal[2:].replace("\\x", ""), "hex"), ) except ValueError: pass