Skip to content

Commit

Permalink
sequence fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MissingNO57 committed May 21, 2024
1 parent b80f0f0 commit 1bdbee5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripts/prune_genesis_codes.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def main():
codes = wasm["codes"]
contracts = wasm["contracts"]


print("Building code hashes map")
# Create maps with code hashes and IDs
original_code_hash_to_code = OrderedDict()
Expand Down Expand Up @@ -91,6 +92,12 @@ def main():

contract["contract_info"]["code_id"] = new_code_id

# Replace code_id sequence
sequences = wasm["sequences"]
for sequence in sequences:
if sequence["id_key"] == "BGxhc3RDb2RlSWQ=":
sequence["value"] = str(next_code_id)

# Store pruned genesis file
print("Writing output json")
save_json_file(args.output_file, genesis)
Expand Down

0 comments on commit 1bdbee5

Please sign in to comment.