Skip to content

Commit

Permalink
feat: enable to load genesis artifact into pless pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
leovct committed Mar 20, 2024
1 parent 361369b commit bddd8ff
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions permissionless-node.star
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,17 @@ def run(plan, args):
name="node-config",
config={"node-config.toml": struct(template=node_config_template, data=args)},
)
genesis_file = read_file(src=args["genesis_file"])
genesis_artifact = plan.render_templates(
name="genesis", config={"genesis.json": struct(template=genesis_file, data={})}
)

genesis_artifact = ""
if "genesis_artifact" in args:
genesis_artifact = args["genesis_artifact"]
else:
genesis_file = read_file(src=args["genesis_file"])
genesis_artifact = plan.render_templates(
name="genesis",
config={"genesis.json": struct(template=genesis_file, data={})},
)

zkevm_node_package.start_synchronizer(
plan, args, node_config_artifact, genesis_artifact
)
Expand Down

0 comments on commit bddd8ff

Please sign in to comment.