Skip to content

Commit

Permalink
fixing generation multiple contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
tutugordillo committed Jan 14, 2025
1 parent b948c5a commit ba9edd0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/solution_generation/reconstruct_bytecode.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,9 @@ def recursive_runtime_asm_from_cfg(cfg: CFG, asm_dicts: Dict[str, List[ASM_bytec
sub_object = cfg.get_subobject()
if sub_object is not None:
json_asm_subobjects = recursive_init_asm_from_cfg(sub_object, asm_dicts, tags_dict)
current_object_json[".data"] = {"0": json_asm_subobjects}

current_object_json[".data"] = {}
current_object_json[".data"]["0"] = json_asm_subobjects["0"]

return current_object_json


Expand All @@ -335,7 +336,7 @@ def recursive_init_asm_from_cfg(cfg: CFG, asm_dicts: Dict[str, List[ASM_bytecode

asm = traverse_cfg(obj, asm_dicts, tags)
current_object_json = {".code": asm}

sub_object = cfg.get_subobject()
assert sub_object is not None, "Init code must be followed by the runtime code"
json_asm_subobjects = recursive_runtime_asm_from_cfg(sub_object, asm_dicts, tags_dict, obj_name)
Expand Down

0 comments on commit ba9edd0

Please sign in to comment.