Skip to content

Commit

Permalink
feat: Output Admin Private Key (#71)
Browse files Browse the repository at this point in the history
This PR exposes `GS_ADMIN_PRIVATE_KEY` to enable owner-restricted
operations, such as management of implementations and bonds in
`DisputeGameFactory`.
  • Loading branch information
hashcashier authored Sep 11, 2024
1 parent 74b6417 commit 95abc10
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/contracts/contract_deployer.star
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ def deploy_l2_contracts(
"mv $DEPLOY_CONFIG_PATH /network-configs/getting-started.json",
"mv $DEPLOYMENT_OUTFILE /network-configs/kurtosis.json",
"mv $STATE_DUMP_PATH /network-configs/state-dump.json",
"echo -n $GS_ADMIN_PRIVATE_KEY > /network-configs/GS_ADMIN_PRIVATE_KEY",
"echo -n $GS_SEQUENCER_PRIVATE_KEY > /network-configs/GS_SEQUENCER_PRIVATE_KEY",
"echo -n $GS_BATCHER_PRIVATE_KEY > /network-configs/GS_BATCHER_PRIVATE_KEY",
"echo -n $GS_PROPOSER_PRIVATE_KEY > /network-configs/GS_PROPOSER_PRIVATE_KEY",
Expand All @@ -114,6 +115,13 @@ def deploy_l2_contracts(
wait="300s",
)

gs_admin_private_key = plan.run_sh(
name="read-gs-admin-private-key",
description="Getting the admin private key",
run="cat /network-configs/GS_ADMIN_PRIVATE_KEY ",
files={"/network-configs": op_genesis.files_artifacts[0]},
)

gs_sequencer_private_key = plan.run_sh(
name="read-gs-sequencer-private-key",
description="Getting the sequencer private key",
Expand Down Expand Up @@ -165,6 +173,7 @@ def deploy_l2_contracts(
)

private_keys = {
"GS_ADMIN_PRIVATE_KEY": gs_admin_private_key.output,
"GS_SEQUENCER_PRIVATE_KEY": gs_sequencer_private_key.output,
"GS_BATCHER_PRIVATE_KEY": gs_batcher_private_key.output,
"GS_PROPOSER_PRIVATE_KEY": gs_proposer_private_key.output,
Expand Down

0 comments on commit 95abc10

Please sign in to comment.